WO2017049761A1 - 复制/粘贴图片的方法、装置、系统、设备及存储介质 - Google Patents

复制/粘贴图片的方法、装置、系统、设备及存储介质 Download PDF

Info

Publication number
WO2017049761A1
WO2017049761A1 PCT/CN2015/095778 CN2015095778W WO2017049761A1 WO 2017049761 A1 WO2017049761 A1 WO 2017049761A1 CN 2015095778 W CN2015095778 W CN 2015095778W WO 2017049761 A1 WO2017049761 A1 WO 2017049761A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
path
copy
path information
text
Prior art date
Application number
PCT/CN2015/095778
Other languages
English (en)
French (fr)
Inventor
尚会波
高杰军
Original Assignee
百度在线网络技术(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百度在线网络技术(北京)有限公司 filed Critical 百度在线网络技术(北京)有限公司
Publication of WO2017049761A1 publication Critical patent/WO2017049761A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/184Distributed file systems implemented as replicated file system
    • G06F16/1844Management specifically adapted to replicated file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Definitions

  • the present invention relates to the field of computer application technologies, and in particular, to a picture copying and pasting method, device, system, device and storage medium across applications.
  • an existing operating system of an intelligent terminal such as Android usually uses the following two schemes for copying and pasting pictures:
  • the application implements copy and paste internally.
  • An intent is a run-time binding mechanism that connects two different components while the program is running.
  • the program can express some kind of request or willingness to Android, and Android will select the appropriate component to complete the request according to the content of the will.
  • Option 1 can only implement internal copy and paste of the application, and cannot be used across applications.
  • Solution 2 uses an intent. You need to specify the application that receives the image. If you do not specify an application that receives the image, the system will provide a list of images that can be processed for the user to select, and the application that receives the image can only be used in a specific location.
  • the above-mentioned cross-application image delivery method is not flexible in operation and cannot satisfactorily meet user requirements.
  • the present invention provides a method, apparatus and system for copying/pasting pictures in order to facilitate picture transfer across applications.
  • a method for copying a picture comprising:
  • the picture copy protocol text is written to the clipboard.
  • the determining the image path information of the to-be-copied picture comprises: obtaining and parsing an attribute of the to-be-copied picture, and obtaining the picture path information of the to-be-copied picture from the attribute.
  • the picture classification information is further determined according to the picture path information, and when the picture copy protocol text is generated based on the picture path information, the picture classification information is further combined.
  • the picture copy protocol text comprises a protocol header of a picture copy protocol.
  • the picture classification includes: an online picture located on the network, a local picture saved in the local storage, or a memory picture that has been parsed into the memory; the picture path includes: pointing to the online The URL path of the picture, the file path to the local picture, or the picture data path to the memory picture.
  • the generating a picture copy protocol text includes: encoding the picture path information, and generating a picture copy protocol text by using the encoded picture path information.
  • encoding the picture path information includes: if the picture path is a URL path pointing to an online picture or a file path pointing to a local picture, URL encoding the URL or the file path; If the picture path is a picture data path that points to a memory picture, base64 encoding the picture data path, and then performing URL encoding.
  • a method for pasting a picture comprising:
  • determining whether the clipboard is a picture copy protocol text comprises: determining whether the text in the clipboard includes a protocol header of a picture copy protocol, and if yes, determining the clipboard Copy the protocol text for the picture; otherwise it is determined that the clipboard is not the picture copy protocol text.
  • parsing the picture copy protocol text further includes: determining picture classification information according to the obtained picture path information.
  • the picture classification includes: an online picture located on the network, a local picture saved in the local storage, or a memory picture that has been parsed into the memory; the picture path includes: pointing to the online The URL path of the picture, the file path to the local picture, or the picture data path to the memory picture.
  • the parsing the picture copy protocol text comprises: decoding the picture path information in the picture copy protocol text.
  • decoding the picture path information includes: The image path is a URL path pointing to an online picture or a file path pointing to a local picture, and performing URL decoding on the URL or file path; if the picture path is a picture data path pointing to a memory picture, the picture is The data path is first decoded by the URL and then decoded by base64.
  • the content in the clipboard is directly displayed.
  • An apparatus for copying a picture characterized in that the apparatus comprises:
  • a determining module configured to determine image path information of the picture to be copied
  • a generating module configured to generate a picture copy protocol text based on the picture path information
  • a write module for writing the picture copy protocol text to the clipboard.
  • the determining module is specifically configured to acquire and parse an attribute of a to-be-copied picture, and obtain picture path information of the to-be-copied picture from the attribute.
  • the determining module is further configured to determine picture classification information according to the picture path information; and the generating module further combines the picture when generating a picture copy protocol text based on the picture path information Classified information.
  • the picture copy protocol text comprises a protocol header of a picture copy protocol.
  • the picture classification includes: an online picture located on the network, a local picture saved in the local storage, or a memory picture that has been parsed into the memory; the picture path includes: pointing to the online The URL path of the picture, the file path to the local picture, or the picture data path to the memory picture.
  • the generating module is further configured to: The information is encoded, and the picture copy protocol text is generated using the encoded picture path information.
  • the specific execution is: if the image path is a URL path pointing to an online picture or a file path pointing to a local picture, the URL is Or the file path is URL-encoded; if the picture path is a picture data path pointing to the memory picture, the picture data path is base64-encoded, and then the URL is encoded.
  • a device for pasting a picture characterized in that the device comprises:
  • a judging module configured to determine whether the clipboard is a picture copy protocol text
  • a parsing module configured to parse the picture copy protocol text to obtain image path information
  • a loading module configured to load a picture according to the picture path information.
  • the determining module is specifically configured to determine whether the text in the clipboard includes a protocol header of a picture copy protocol, and if yes, determine that the clipboard is a picture copy protocol text; Otherwise it is determined that the clipboard is not a picture copy protocol text.
  • the parsing module is further configured to determine the image classification information according to the obtained image path information.
  • the picture classification includes: an online picture located on the network, a local picture saved in the local storage, or a memory picture that has been parsed into the memory; the picture path includes: pointing to the online The URL path of the picture, the file path to the local picture, or the picture data path to the memory picture.
  • the parsing module is further configured to decode the picture path information in the picture copy protocol text.
  • the parsing module is decoding the picture path information. Specifically, if the picture path is a URL path pointing to an online picture or a file path pointing to a local picture, performing URL decoding on the URL or file path; if the picture path is a picture data path pointing to a memory picture Then, the image data path is first subjected to URL decoding, and then base64 decoding is performed.
  • the content in the clipboard is directly displayed.
  • a method of copying and pasting a picture comprising any one of the copy picture methods described above and the pasting picture method described above.
  • a system for copying and pasting pictures characterized in that the system comprises any one of the copy picture devices described above and any of the pasting picture devices described above.
  • the method, device and system provided by the present invention make up for copying and pasting by using the image copying protocol, which makes up for the fact that the clipboard in the prior art cannot store the image file format which is not supported by the clipboard.
  • the insufficiency of passing images across applications is not possible, effectively enabling image copying and pasting across applications.
  • FIG. 1 is a flowchart of a method for copying pictures according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of a picture copy protocol of the present invention
  • FIG. 3 is a flowchart of a method for pasting pictures according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of a copy picture device according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of a device for pasting pictures according to Embodiment 5 of the present invention.
  • FIG. 1 is a flowchart of a method for copying pictures provided by the present invention. As shown in FIG. 1 , the copy method may specifically include the following processes:
  • the copy instruction is monitored.
  • the copy instruction can be monitored by receiving a user's selection and copy operation of the picture. For example, when a user needs to copy a picture in a webpage, a picture browser, or other location and application, use the left mouse button to long press the image to be copied, and when clicking the copy in the pop-up copy option, the user is received. The copy operation of the picture, thereby listening to the copy instruction.
  • the user can perform the copy operation of the picture by other operations, such as the user right-clicking the picture by clicking the mouse and clicking the copy option from the pop-up submenu, or the like, and is no longer exhaustive.
  • image path information of the picture to be copied is determined.
  • the picture attribute of the selected picture may be first obtained according to the user's selection of the picture; then, the picture path information of the picture is parsed from the obtained attribute, and the picture path information is used to point to the picture storage of the selected picture.
  • the location may further determine the classification information of the image according to the image path information.
  • the URL path information of the picture can be obtained from the attribute of the picture:
  • the URL is usually used as the network path of the picture carried by the web page, but is not limited thereto.
  • the URL can also be identified according to the URL.
  • the classification of the picture belongs to an online picture carried by the webpage, wherein the online picture can use the web as the category name.
  • the pictures that can be copied by the present invention may also include various types of pictures such as local pictures and memory pictures.
  • an online picture generally refers to a picture carried by a webpage, and the category name may be a web, and the corresponding picture path may be a URL pointing to the picture;
  • local images usually refer to pictures saved on a local storage device. Taking mobile phone storage as an example, it can be accessed through a file path such as %2fsdcard%2ftest.jpg pointing to the mobile phone memory card, and the local image can be classified as file;
  • a memory picture usually refers to picture data that has been parsed into memory for display, such as by
  • the image data path access to the memory, the classification name of the memory picture can be data;
  • the corresponding picture classification can also be identified according to the respective path information.
  • a picture copy protocol text is generated based on the parsed picture path information.
  • the picture copy protocol text is generated according to the picture path information obtained from the picture attribute, and the picture copy protocol text is a file format supported by the clipboard.
  • a picture copy protocol text can uniquely identify data of a picture, which may include picture path information, and may further include a protocol header or picture classification information.
  • 2 is a text copy protocol text provided by an embodiment of the present invention Schematic diagram.
  • the protocol header is used to identify the picture copy protocol, and the protocol header of the picture copy protocol may be represented by imgcontent, but is not limited thereto.
  • the picture classification of the picture copy protocol is used to identify the category of the picture, such as online pictures, local pictures, and memory pictures.
  • the picture path information is used to identify a specific path to the picture. See the previous section for a detailed description of the picture classification and picture path of the picture copy protocol.
  • the picture copy protocol for online pictures can be expressed as:
  • the picture copy protocol of the local picture can be expressed as:
  • the picture copy protocol of the memory picture can be expressed as:
  • the content is:
  • Image replication protocol as an example, which represents the path stored in the URL
  • the picture copying protocol involved in the embodiment of the present invention also supports extension, and other picture categories can be added later to support more picture applications.
  • the path information may be encoded, and the picture copy protocol text is generated by using the encoded picture path information.
  • the picture copy protocol text is generated by using the encoded picture path information.
  • the ambiguous character must be escaped, that is, It is encoded.
  • Different encoding methods may be used for different path information, such as URL encoding for a URL path or a file path, or base64 encoding for a picture data path, followed by URL encoding.
  • the generated picture copy protocol text is written to the clipboard.
  • the picture itself copied to the clipboard is not to be copied, but contains the picture copy protocol text that can identify the picture to be copied, because the picture copy protocol text is cut.
  • the text format supported by the board compensates for the insufficiency of the prior art clipboard because it cannot store the image file format that it does not support, which results in the inability to transfer pictures across applications. If it is a text copy of the file format supported by the clipboard, the text is stored directly in the clipboard.
  • FIG. 3 is a flowchart of a method for pasting pictures according to the present invention. As shown in FIG. 3, the pasting method may specifically include the following processes:
  • the paste command is monitored.
  • the pasting instruction can also be monitored by other operations of the user, for example, the user directly drags the image to be pasted from the current position to the position to be pasted, or uses a shortcut key, etc., by dragging. This is no longer exhaustive.
  • text information is stored in the clipboard, and the text information may be a text copy protocol text that can uniquely identify a picture, or a text content that can be directly displayed, in order to distinguish the text in the clipboard.
  • Which kind of information belongs to first can determine whether the text in the clipboard contains the protocol header of the image copy protocol text, and if the protocol header is identified, for example, by imgcontent, it is determined that the text content pasted in the clipboard is the image copy protocol text. The process proceeds to the process 204; otherwise, the text content that is not the picture copy protocol text but can be directly displayed in the clipboard is determined, and the process proceeds to the process 203.
  • the picture copy protocol text is parsed to obtain picture path information.
  • the image copy protocol text in the clipboard is obtained, and the image copy protocol text is obtained.
  • the path information of the picture can be first parsed from the picture copy protocol text, thereby determining the location where the picture to be pasted is stored according to the picture path information.
  • the URL network path information identified by the URL can be parsed from the text copy protocol text, for example:
  • the network path information may further determine that the classification information of the picture is an online picture located on the network;
  • the file data path pointing to the locally stored file path or performing the memory storage may be parsed from the picture copy protocol text, and may be respectively determined according to the file path. Or the picture data path to determine whether the classification information of the picture is a local picture or a memory picture.
  • the detailed description of the picture path information and the picture classification information is the same as the technical content expressed by the same term in the first embodiment.
  • the encoded picture path information may also need to be decoded.
  • the corresponding URL or file path is URL-decoded; if the picture path is a picture data path, the corresponding picture data path is first subjected to URL decoding, and then base64 decoding is performed. Thereby ensuring the accuracy of the image path information.
  • the picture is loaded according to the picture path information.
  • the URL path can be based on the parsed URL.
  • Http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728b4710b912a895a5b6c1fdfc0392452225.jpg directly determine the storage location of the online image on the network, and load the image from the corresponding storage location according to the above path, and The loaded image is displayed in the location that the user wants to paste, such as the input box to be pasted.
  • the method for copying and pasting pictures across the application of the third embodiment is formed by combining the copying and pasting methods of the first embodiment and the second embodiment.
  • the method of the embodiment includes various technical details of the first and second embodiments. No longer list them one by one.
  • Embodiments 1 to 3 are detailed descriptions of the methods provided by the present invention, and the apparatus provided by the present invention will be described in detail below by Embodiments 4 to 6.
  • the copy device may include: a listening module 300, a determining module 310, a generating module 320, and a writing module 330.
  • the listening module 300 is configured to monitor the copy instruction according to the copy operation of the user.
  • the triggering module is triggered to receive the user's The operation signal is copied to monitor the copy instruction.
  • the determining module 310 is configured to determine picture path information of the picture to be copied.
  • the determining module 310 may first obtain a picture attribute of the selected picture according to the user's selection of the picture; and then parse the picture path path of the picture from the obtained attribute.
  • the image path information is used to point to the picture storage location of the selected picture, and the classification information of the picture may be further determined according to the picture path information.
  • the determining module may obtain the URL path information of the image from the attributes of the image:
  • the URL is usually used as the network path of the picture carried by the web page, but is not limited thereto.
  • the determining module is further configured to identify, according to the URL, the online image that is classified by the webpage, wherein the online image may use the web as the category name.
  • the copying device of the copying apparatus of the present invention may further include various types of pictures such as a local picture and a memory picture.
  • an online picture generally refers to a picture carried by a webpage, and the category name may be a web, and the corresponding picture path may be a URL pointing to the picture;
  • local images usually refer to pictures saved on a local storage device. Taking a mobile phone as an example, it can be accessed by a file path pointing to a mobile phone memory card, and the category name can be file;
  • the memory picture usually refers to the picture data that has been parsed into the memory for display, and can be accessed through the picture data path pointing to the memory, and the category name can be data;
  • the determining module 310 can also identify the corresponding picture classification according to the respective path information.
  • the generating module 320 is configured to generate a picture copy protocol text based on the picture path information obtained by the determining module.
  • the generating module 320 generates a picture copy protocol text according to the picture path information obtained by the determining module 310 from the picture attribute, where the picture copy protocol text is a file format supported by the clipboard.
  • a picture copy protocol text can uniquely identify data of a picture, which may include picture path information, protocol header schema, or picture classification information. And as shown in FIG. 2, the protocol header, picture classification information, or picture path information may exist in the form of a picture copy protocol.
  • the path information may be encoded by the generating module 320, and the picture copy is generated by using the encoded picture path information.
  • Agreement text For example, for a URL, when generating a picture protocol text from a URL, since some characters in the URL may cause ambiguity, the device receiving the UUL may parse the error, so the ambiguous character must be escaped, that is, It is encoded. Different encoding methods may be used for different path information, such as URL encoding for a URL path or a file path, or base64 encoding for a picture data path, followed by URL encoding.
  • the write module 330 is configured to write the picture copy protocol text to the clipboard.
  • the picture itself copied to the clipboard is not to be copied, but includes a picture copy protocol text capable of identifying the picture to be copied, because the write module writes the clipboard
  • the picture copy protocol text in the picture is the text format supported by it, which makes up for the insufficiency of the clip board in the prior art that cannot be stored in the picture file format which is not supported by the clip board. If it is a text copy of the file format supported by the clipboard, the text is stored directly in the clipboard.
  • FIG. 5 is a structural diagram of a pasting picture device provided by the present invention.
  • the pasting device may include: a listening module 400, a determining module 410, a parsing module 420, and a loading module 430.
  • the listening module 400 is configured to listen for pasting instructions.
  • the trigger module 400 is triggered to receive the paste image, thereby monitoring the paste command.
  • the determining module 410 is configured to determine whether the clipboard is a picture copy protocol text.
  • the text information since the text information is already stored in the clipboard, the text information may be a text copy protocol text that can uniquely identify a picture, or may be a text content that can be directly displayed. Therefore, the determining module 410 is required to distinguish the cut. Which type of text information is in the board, the judging module may first determine whether the text in the clipboard contains a protocol header of the text copy protocol text, and if the protocol header is identified, for example, by imgcontent, the judging module determines to paste in the clipboard The text content is a picture copy protocol text, so that the picture copy protocol text is passed to the parsing module 420 to continue processing; otherwise, the judging module determines that the text in the clipboard is not the picture copy protocol text but can be directly displayed, thereby directly texting The content output is displayed to implement the paste function.
  • the parsing module 420 is configured to parse the picture copy protocol text to obtain picture path information.
  • the parsing module 420 obtains the picture copy protocol text in the clipboard from the determining module 410, and parses the picture copy protocol text, and the parsing includes parsing the path information of the picture from the picture copy protocol text, thereby obtaining the path information according to the picture path. Determine the image to be pasted The location stored.
  • the parsing module may further determine, according to the network path information, that the classification information of the image is an online image located on the network;
  • the parsing module may parse the file path pointing to the locally stored file path or performing the memory storage from the picture copy protocol text, and may respectively follow the file path or The picture data path determines whether the classification information of the picture is a local picture or a memory picture.
  • the encoded picture path information needs to be decoded. If the picture path is a URL path or a file path, the corresponding URL or file path is URL-decoded; if the picture path is a picture data path, the corresponding picture data path is first subjected to URL decoding, and then base64 decoding is performed. Thereby ensuring the accuracy of the image path information.
  • the loading module 430 is configured to load a picture according to the picture path information.
  • the loading module 430 obtains the image path information of the image to be pasted from the parsing module, loads the corresponding image stored in the path location according to the image path information, and displays the loaded image in a location to be pasted by the user, for example, The input box to be pasted.
  • the system for copying and pasting pictures across the application of the sixth embodiment is formed by combining the copying and pasting apparatus of the fourth embodiment and the fifth embodiment.
  • the system of the embodiment includes the details of each module of the fourth and fifth embodiments. This is no longer listed one by one.
  • the above method, device, or system provided by the embodiment of the present invention can be used for, but not limited to, an application scenario of picture search.
  • an application scenario of picture search For example, when the user drags by mouse, any application
  • the copy/paste method, apparatus or system of the present invention is invoked to copy the picture to the input box of the search engine in the case of cross-application to achieve a search for the picture.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种复制/粘贴图片的方法、装置、系统、设备及存储介质,其中复制方法包括:监听复制指令(101);确定图片路径信息(102);生成图片复制协议文本(103);将图片复制协议文本写入剪切板(104)。粘贴方法包括:监听粘贴指令(201);判断剪切板中是否为图片复制协议文本(202);如果是,解析所述图片复制协议文本得到图片路径信息(204);根据所述图片路径信息加载图片(205)。通过该复制/粘贴图片的方法、装置和系统,弥补了现有技术中剪切板由于无法存储其不支持的图片文件格式,从而导致不能跨应用传递图片的不足,有效地实现跨应用的图片复制和粘贴。

Description

复制/粘贴图片的方法、装置、系统、设备及存储介质
本申请要求了申请日为2015年09月25日,申请号为201510623376.2发明名称为“一种复制/粘贴图片的方法、装置和系统”的中国专利申请的优先权。
技术领域
本发明涉及计算机应用技术领域,尤其涉及一种跨应用的图片复制、粘贴方法、装置、系统、设备及存储介质。
背景技术
现有的诸如安卓(android)等智能终端的操作系统为了实现图片传递,通常采用如下两种方案进行图片的复制粘贴:
1.应用内部实现复制粘贴。
2.通过android intent机制实现跨应用的图片传递。Intent是一种运行时绑定(run-time binding)机制,它能在程序运行过程中连接两个不同的组件。通过Intent,所述程序可以向Android表达某种请求或者意愿,Android会根据意愿的内容选择适当的组件来完成请求。
然而上述两种方案存在如下缺陷:
方案1只能实现应用内部的复制粘贴,无法跨应用使用。
方案2使用intent,需要指定接收图片的应用,如不指定接收图片的应用,则系统会提供可处理图片的列表供用户选择,且接收图片的应用只能在特定位置使用。上述跨应用的图片传递方式在操作上不灵活,无法很好的满足用户的要求。
发明内容
有鉴于此,本发明提供了一种复制/粘贴图片的方法、装置和系统,以便于实现跨应用的图片传递。
具体技术方案如下:
一种复制图片的方法,其特征在于,该方法包括:
监听复制指令;
确定待复制图片的图片路径信息;
基于所述图片路径信息生成图片复制协议文本;
将所述图片复制协议文本写入剪切板。
根据本发明一优选实施例,所述确定待复制图片的图片路径信息包括:获取并解析待复制图片的属性,从所述属性获得所述待复制图片的图片路径信息。
根据本发明一优选实施例,进一步依据所述图片路径信息确定图片分类信息,在基于所述图片路径信息生成图片复制协议文本时,进一步结合所述图片分类信息。
根据本发明一优选实施例,所述图片复制协议文本包含图片复制协议的协议头。
根据本发明一优选实施例,所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
根据本发明一优选实施例,所述生成图片复制协议文本包括:对所述图片路径信息进行编码,利用编码后的图片路径信息生成图片复制协议文本。
根据本发明一优选实施例,对所述图片路径信息进行编码包括:若所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL编码;若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径进行base64编码后,再进行URL编码。
一种粘贴图片的方法,其特征在于,该方法包括:
监听粘贴指令;
判断剪切板中是否为图片复制协议文本;
如果是,解析所述图片复制协议文本得到图片路径信息;
根据所述图片路径信息加载图片。
根据本发明一优选实施例,判断所述剪切板中是否为图片复制协议文本包括:判断所述剪切板中文本是否包含图片复制协议的协议头,如果是,则确定所述剪切板中为图片复制协议文本;否则确定所述剪切板中不是图片复制协议文本。
根据本发明一优选实施例,解析所述图片复制协议文本还包括:依据所述得到的图片路径信息确定图片分类信息。
根据本发明一优选实施例,所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
根据本发明一优选实施例,所述解析图片复制协议文本包括:解码所述图片复制协议文本中的所述图片路径信息。
根据本发明一优选实施例,对所述图片路径信息进行解码包括:若 所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL解码;若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径先进行URL解码,再进行base64解码。
根据本发明一优选实施例,如果判断所述剪切板中不是图片复制协议文本,则直接显示所述剪切板中的内容。
一种复制图片的装置,其特征在于,该装置包括:
监听模块,用于监听复制指令;
确定模块,用于确定待复制图片的图片路径信息;
生成模块,用于基于所述图片路径信息生成图片复制协议文本;
写入模块,用于将所述图片复制协议文本写入剪切板。
根据本发明一优选实施例,所述确定模块,具体用于获取并解析待复制图片的属性,从所述属性获得所述待复制图片的图片路径信息。
根据本发明一优选实施例,所述确定模块进一步用于依据所述图片路径信息确定图片分类信息;并且所述生成模块在基于所述图片路径信息生成图片复制协议文本时,进一步结合所述图片分类信息。
根据本发明一优选实施例,所述图片复制协议文本包含图片复制协议的协议头。
根据本发明一优选实施例,所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
根据本发明一优选实施例,所述生成模块,还用于对所述图片路径 信息进行编码,利用编码后的图片路径信息生成所述图片复制协议文本。
根据本发明一优选实施例,所述生成模块对所述图片路径信息进行编码时,具体执行:若所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL编码;若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径进行base64编码后,再进行URL编码。
一种粘贴图片的装置,其特征在于,该装置包括:
监听模块,用于监听粘贴指令;
判断模块,用于判断剪切板中是否为图片复制协议文本;
解析模块,用于解析所述图片复制协议文本得到图片路径信息;
加载模块,用于根据所述图片路径信息加载图片。
根据本发明一优选实施例,所述判断模块,具体用于判断所述剪切板中文本是否包含图片复制协议的协议头,如果是,则确定所述剪切板中为图片复制协议文本;否则确定所述剪切板中不是图片复制协议文本。
根据本发明一优选实施例,解析模块还用于依据所述得到的图片路径信息确定图片分类信息。
根据本发明一优选实施例,所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
根据本发明一优选实施例,所述解析模块,还用于解码所述图片复制协议文本中的所述图片路径信息。
根据本发明一优选实施例,所述解析模块在解码所述图片路径信息 时,具体执行:若所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL解码;若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径先进行URL解码,再进行base64解码。
根据本发明一优选实施例,如果判断所述剪切板中不是图片复制协议文本,则直接显示所述剪切板中的内容。
一种复制粘贴图片的方法,其特征在于,该方法包括以上所述的复制图片方法中的任一项和以上所述的粘贴图片方法中的任一项。
一种复制粘贴图片的系统,其特征在于,该系统包括以上所述的复制图片装置中的任一项和以上所述的粘贴图片装置中的任一项。
由以上技术方案可以看出,本发明提供的方法、装置和系统,通过使用图片复制协议进行复制和粘贴,弥补了现有技术中剪切板由于无法存储其不支持的图片文件格式,从而导致不能跨应用传递图片的不足,有效地实现跨应用的图片复制和粘贴。
附图说明
图1为本发明实施例一提供的复制图片方法的流程图;
图2为本发明的图片复制协议示意图;
图3为本发明实施例二提供的粘贴图片方法的流程图;
图4为本发明实施例四提供的复制图片装置的结构示意图;
图5为本发明实施例五提供的粘贴图片装置的结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。
实施例一、
下面通过实施例一对本发明提供的复制图片的方法进行详细描述。
图1为本发明提供的复制图片方法的流程图,如图1所示,该复制方法可以具体包括以下流程:
在101中、监听复制指令。
在本流程中,可以通过接收用户对图片的选择和复制操作而监听到复制指令。例如,当用户需要对网页中、图片浏览器或者其他位置和应用中的图片进行复制,其使用鼠标左键长按需复制的图片,并在弹出的复制选项中点击复制时,则接收用户对该图片的复制操作,从而监听到复制指令。当然,用户可以通过其他操作,例如用户通过鼠标右键点击图片并从弹出的子菜单中点击复制选项,或者使用快捷键等,来实现对图片的复制操作,在此不再一一穷举。
在102中、确定待复制图片的图片路径信息。
在本流程中,可以根据用户对图片的选择,首先获取所选择图片的图片属性;然后,从获取的属性中解析得到图片的图片路径信息,该图片路径信息用于指向所选择图片的图片存储位置,还可以进一步依据图片路径信息确定图片的分类信息。
例如当用户选择存在于网页中的待复制图片时,则从该图片的属性中能够得到图片的URL路径信息:
http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728b4710b912a895a5b6c1fdfc0392452225.jpg
通常以URL作为由网页所承载的图片的网络路径,但并不限于此。
可选地,在得到URL网络路径信息后,还能够根据该URL识别出 该图片的分类属于由网页所承载的在线图片,其中,在线图片可以以web作为分类名。
本发明可以进行复制的图片除上述在线图片外,还可以包括本地图片和内存图片等多种类型的图片。
如前所述,在线图片通常指通过网页承载的图片,分类名可以为web,其对应的图片路径可以为指向该图片的URL;
另外,本地图片通常指保存在本地存储设备中的图片。以手机存储为例,其可通过诸如%2fsdcard%2ftest.jpg的指向手机存储卡的文件路径访问,本地图片的分类名可以为file;
内存图片通常指已经解析到内存中以供显示的图片数据,其可通过诸如
6L%2bZ5Y%2bq5piv5LiA5Liq56S65L6L77yM5Zu%2b54mH5Lmf5Y%2b v5Lul57yW56CB5oiQYmFzZTY0的指向内存的图片数据路径访问,内存图片的分类名可以为data;
并且,与在线图片一样,在得到本地图片的文件路径或者内存图片的图片数据路径后,还可以根据其各自的路径信息识别出相应的图片分类。
在103中,基于所解析的图片路径信息生成图片复制协议文本。
在本流程中,根据从图片属性中获取的图片路径信息来生成图片复制协议文本,该图片复制协议文本是剪切板可支持的文件格式。
在本实施例中,一个图片复制协议文本能够唯一标识一张图片的数据,其可以包含图片路径信息,还可以进一步包含协议头(schema)或者图片分类信息。图2为本发明实施例提供的一种图片复制协议文本的 格式示意图。
其中,协议头用以标识图片复制协议,标识图片复制协议的协议头可以采用imgcontent来表示,但不限于此。
图片复制协议的图片分类用以标识图片的类别,例如在线图片、本地图片、以及内存图片等。图片路径信息用以标识指向图片的具体路径。对图片复制协议的图片分类和图片路径的具体描述参见前述部分。
以下分别举例说明在线图片、本地图片、内存图片的图片复制协议表示方式,以供参考:
在线图片的图片复制协议可以表示为:
imgcontent://web/
http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728b4710b912a895a5b6c1fdfc0392452225.jpg
本地图片的图片复制协议可以表示为:
imgcontent://file/%2fsdcard%2ftest.jpg
内存图片的图片复制协议可以表示为:
imgcontent://data/
6L%2bZ5Y%2bq5piv5LiA5Liq56S65L6L77yM5Zu%2b54mH5Lmf5Y%2b v5Lul57yW56CB5oiQYmFzZTY0
其中,“//”之前代表协议的头部,“//”与“/”之间代表图片分类,“/”之后代表图片路径。
以内容为:
imgcontent://web/
http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728 b4710b912a895a5b6c1fdfc0392452225.jpg
的图片复制协议为例,其代表了存储在URL路径
http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728b4710b912a895a5b6c1fdfc0392452225.jpg下的,分类名为“web”的,且支持图片复制的在线图片。
本发明实施例所涉及的图片复制协议还支持扩展,后续可以加入其他图片分类,从而支持更多的图片应用。
可选地,为了防止路径信息在生成图片复制协议文本的过程中发生语义的转变,还可以对路径信息进行编码,利用编码后的图片路径信息生成图片复制协议文本。例如对于URL来说,在将URL生成图片协议文本时,由于URL中有些字符可能会引起歧义,从而造成接收URL的设备对其解析错误,因此必须将引起歧义的字符进行转义,也就是对其进行编码。而针对不同的路径信息可以使用不同的编码方式,例如针对URL路径或文件路径进行URL编码,或者针对图片数据路径进行base64编码后,再进行URL编码。
在104中,将生成的所述图片复制协议文本写入到剪切板中。
本流程中,如果是针对图片的复制操作,则复制到剪切板中的并非待复制的图片本身,而是包含了能够识别待复制图片的图片复制协议文本,由于图片复制协议文本是剪切板所支持的文本格式,从而弥补了现有技术中剪切板由于无法存储其不支持的图片文件格式,从而导致不能跨应用传递图片的不足。如果是针对剪切板所支持的文件格式的文本复制,则将该文本直接存储到剪切板中。
实施例二、
下面通过实施例二对本发明提供的粘贴图片的方法进行详细描述。
图3为本发明提供的粘贴图片方法的流程图,如图3所示,该粘贴方法可以具体包括以下流程:
在201中、监听粘贴指令。
在本流程中,当用户在待粘贴的位置,例如待粘贴的输入框中点击右键,在弹出的粘贴选项中选择粘贴时,则接收到粘贴图片的操作,从而监听到粘贴指令。
可选地,粘贴指令也可以通过用户的其他操作从而被监听到,例如用户通过拖动的方式,直接将待粘贴的图片从当前位置拖动到欲粘贴的位置,或者使用快捷键等,在此不再一一穷举。
在202中、判断所述剪切板中的文本是否为图片复制协议文本
在本流程中,剪切板中已存储有文本信息,该文本信息可以是能够唯一标识一张图片的图片复制协议文本,也可以是能够直接显示的文本内容,为了区分剪切板中的文本信息属于哪一种,可以首先判断剪切板中的文本是否包含图片复制协议文本的协议头,如果包含例如由imgcontent标识的协议头,则确定剪切板中粘贴的文本内容是图片复制协议文本,进入流程204;否则确定剪切板中不是图片复制协议文本而是可以直接显示的文本内容,进入流程203。
在203中、直接显示所述剪切板中的内容,结束粘贴操作。
在本流程中,在用户所指示的欲粘贴位置直接将剪贴板存储的内容进行显示。本流程中的复制粘贴过程属于现有技术,在此不再赘述。
在204中、解析所述图片复制协议文本得到图片路径信息。
本流程中,获取剪切板中的图片复制协议文本,对图片复制协议文 本进行解析操作,可以首先从图片复制协议文本中解析得到图片的路径信息,由此能够根据图片路径信息确定待粘贴图片所存储的位置。
例如,可以从图片复制协议文本中解析出以URL标识的URL网络路径信息,例如:
http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728b4710b912a895a5b6c1fdfc0392452225.jpg
进一步地,还可以依据该网络路径信息进一步确定图片的分类信息是位于网络上的在线图片;
本实施例除了能够从图片复制协议文本中解析出网络路径信息外,还可以从图片复制协议文本中解析出指向本地存储的文件路径或者执行内存存储的图片数据路径,并且可以分别依据该文件路径或者图片数据路径以确定出图片的分类信息是本地图片,或者是内存图片。对于图片路径信息和图片分类信息的详细描述与实施例一中使用同一术语表示的技术内容相同。
对应于实施例一所描述的对图片复制协议文本中图片路径信息的编码过程,在解析获取的图片复制协议文本时,还可能需要对编码的图片路径信息进行解码。
如果图片路径为URL路径或者文件路径,则相应的对该URL或文件路径进行URL解码;若图片路径为图片数据路径,则相应的对该图片数据路径先进行URL解码,再进行base64解码。从而保证图片路径信息的准确性。
在205中、根据图片路径信息加载图片。
在本流程中,以在线图片为例,可以根据解析出的URL网络路径信 息
http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728b4710b912a895a5b6c1fdfc0392452225.jpg直接确定该在线图片在网络上的存储位置,并且依据上述路径从对应的存储位置中加载图片,并将加载的图片显示在用户欲粘贴的位置,例如欲粘贴的输入框中。
实施例三、
结合上述实施例一和二的复制、粘贴方法从而形成了本实施例三的一种跨应用的复制粘贴图片的方法,本实施例的方法包含了实施例一、二的各个技术细节,在此不再一一列举。
以上的实施例一至三是对本发明所提供的方法进行的详细描述,下面通过实施例四至六对本发明所提供的装置进行详细描述。
实施例四、
图4为本发明实施例四提供的复制图片装置的结构图,如图4所示,该复制装置可以包括:监听模块300、确定模块310、生成模块320以及写入模块330。
监听模块300用于根据用户的复制操作而监听复制指令。
具体的,当用户需要对网页中、图片浏览器或者其他位置的图片进行复制,其使用鼠标左键长按需复制的图片,并在弹出的复制选项中点击复制时,触发监听模块接收用户的复制操作信号,从而监听到复制指令。
确定模块310用于确定待复制图片的图片路径信息。
具体的,确定模块310可以根据用户对图片的选择,首先获取所选择图片的图片属性;然后,从获取的属性中解析得到图片的图片路径信 息,该图片路径信息用于指向所选择图片的图片存储位置,还可以进一步依据图片路径信息确定图片的分类信息。
例如当用户在网页中选择待复制图片时,则确定模块可以从图片的属性中得到图片的URL路径信息:
http%3a%2f%2fa.hiphotos.baidu.com%2fimage%2fpic%2fitem%2fcc11728b4710b912a895a5b6c1fdfc0392452225.jpg
通常以URL作为由网页所承载的图片的网络路径,但并不限于此。
可选地,在得到URL网络路径信息后,确定模块还能够根据该URL识别出该图片的分类为由网页所承载的在线图片,其中,在线图片可以以web作为分类名。
本发明的复制装置可以进行复制的图片除上述在线图片外,还可以包括本地图片和内存图片等多种类型的图片。
如前所述,在线图片通常指通过网页承载的图片,分类名可以为web,其对应的图片路径可以为指向该图片的URL;
另外,本地图片通常指保存在本地存储设备中的图片。以手机为例,其可通过指向手机存储卡的文件路径访问,分类名可以为file;
内存图片通常指已经解析到内存中以供显示的图片数据,其可通过指向内存的图片数据路径访问,分类名可以为data;
并且,与在线图片一样,在得到本地图片的文件路径或者内存图片的图片数据路径后,确定模块310还可以根据其各自的路径信息识别出相应的图片分类。
生成模块320用于基于确定模块获得的图片路径信息生成图片复制协议文本。
具体地,生成模块320根据确定模块310从图片属性中获取的图片路径信息来生成图片复制协议文本,该图片复制协议文本是剪切板可支持的文件格式。
在本实施例中,一个图片复制协议文本能够唯一标识一张图片的数据,其可以包含图片路径信息、协议头schema或者图片分类信息。并且如图2所示,协议头、图片分类信息、或者图片路径信息可以以图片复制协议的形式存在。
在生成图片复制协议文本的过程中,为了防止路径信息在生成图片复制协议文本的过程中发生语义的转变,还可以通过生成模块320对路径信息进行编码,利用编码后的图片路径信息生成图片复制协议文本。例如对于URL来说,在将URL生成图片协议文本时,由于URL中有些字符可能会引起歧义,从而造成接收UUL的设备对其解析错误,因此必须将引起歧义的字符进行转义,也就是对其进行编码。而针对不同的路径信息可以使用不同的编码方式,例如针对URL路径或文件路径进行URL编码,或者针对图片数据路径进行base64编码后,再进行URL编码。
写入模块330用于将所述图片复制协议文本写入剪切板。
具体地,如果是针对图片的复制操作,则复制到剪切板中的并非待复制的图片本身,而是包含了能够识别待复制图片的图片复制协议文本,由于写入模块写入剪切板中的图片复制协议文本是其所支持的文本格式,从而弥补了现有技术中剪切板由于无法存储其不支持的图片文件格式,因此导致不能跨应用传递图片的不足。如果是针对剪切板所支持的文件格式的文本复制,则将该文本直接存储到剪切板中。
实施例五、
下面通过实施例五对本发明提供的粘贴图片的装置进行详细描述。
图5为本发明提供的粘贴图片装置的结构图,如图5所示,该粘贴装置可以包括:监听模块400、判断模块410、解析模块420、以及加载模块430。
监听模块400用于监听粘贴指令。
具体的,当用户在待粘贴的位置,例如待粘贴的输入框中点击右键,在弹出的粘贴选项中选择粘贴时,则触发监听模块400接收到粘贴图片的操作,从而监听到粘贴指令。
判断模块410用于判断剪切板中是否为图片复制协议文本。
具体地,由于剪切板中已存储有文本信息,该文本信息可以是能够唯一标识一张图片的图片复制协议文本,也可以是能够直接显示的文本内容,因此需要判断模块410来区分剪切板中的文本信息属于哪一种,判断模块可以首先判断剪切板中的文本是否包含图片复制协议文本的协议头,如果包含例如由imgcontent标识的协议头,则判断模块确定剪切板中粘贴的文本内容是图片复制协议文本,从而将图片复制协议文本交由解析模块420继续进行处理;否则判断模块确定剪切板中不是图片复制协议文本而是可以直接显示的文本内容,从而直接将文本内容输出显示,实现粘贴功能。
解析模块420用于解析所述图片复制协议文本得到图片路径信息。
具体地,解析模块420从判断模块410获取剪切板中的图片复制协议文本,对图片复制协议文本进行解析,该解析包括从图片复制协议文本中解析得到图片的路径信息,从而根据图片路径信息确定待粘贴图片 所存储的位置。
进一步地,解析模块还可以依据该网络路径信息进一步确定图片的分类信息是位于网络上的在线图片;
解析模块除了能够从图片复制协议文本中解析出网络路径信息外,还可以从图片复制协议文本中解析出指向本地存储的文件路径或者执行内存存储的图片数据路径,并且可以分别依据该文件路径或者图片数据路径以确定出图片的分类信息是本地图片,或者是内存图片。
对应于实施例四所描述的对图片复制协议文本中图片路径信息进行的编码,在解析模块在解析获取的图片复制协议文本时,还需要对编码的图片路径信息进行解码。如果图片路径为URL路径或者文件路径,则相应的对该URL或文件路径进行URL解码;若图片路径为图片数据路径,则相应的对该图片数据路径先进行URL解码,再进行base64解码。从而保证图片路径信息的准确性。
加载模块430用于根据图片路径信息加载图片。
具体的,加载模块430从解析模块中得到待粘贴图片的图片路径信息,则依据该图片路径信息而加载存储在该路径位置的相应图片,并将加载的图片显示在用户欲粘贴的位置,例如欲粘贴的输入框中。
实施例六、
结合上述实施例四和五的复制、粘贴装置从而形成了本实施例六的一种跨应用的复制、粘贴图片的系统,本实施例的系统包含了实施例四、五的各个模块细节,在此不再一一列举。
采用本发明实施例提供的上述方法、装置、或系统,可以用于但不限于图片搜索的应用场景。例如当用户通过鼠标拖曳的方式将任意应用 中的图片拖曳到搜索引擎的输入框时,则调用本发明的复制/粘贴的方法、装置或系统,从而在跨应用的情况下将图片复制到搜索引擎的输入框以实现对于图片的搜索。
在本发明所提供的几个实施例中,应该理解到,所揭露的方法,装置和系统,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡 在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。

Claims (34)

  1. 一种复制图片的方法,其特征在于,该方法包括:
    监听复制指令;
    确定待复制图片的图片路径信息;
    基于所述图片路径信息生成图片复制协议文本;
    将所述图片复制协议文本写入剪切板。
  2. 如权利要求1所述的方法,其特征在于,所述确定待复制图片的图片路径信息包括:获取并解析待复制图片的属性,从所述属性获得所述待复制图片的图片路径信息。
  3. 如权利要求1所述的方法,其特征在于,进一步依据所述图片路径信息确定图片分类信息,在基于所述图片路径信息生成图片复制协议文本时,进一步结合所述图片分类信息。
  4. 如权利要求1-3任一项所述的方法,其特征在于,所述图片复制协议文本包含图片复制协议的协议头。
  5. 如权利要求3所述的方法,其特征在于,
    所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;
    所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
  6. 如权利要求1所述的方法,其特征在于,所述生成图片复制协议文本包括:对所述图片路径信息进行编码,利用编码后的图片路径信息生成图片复制协议文本。
  7. 如权利要求6所述的方法,其特征在于,对所述图片路径信息进 行编码包括:若所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL编码;
    若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径进行base64编码后,再进行URL编码。
  8. 一种粘贴图片的方法,其特征在于,该方法包括:
    监听粘贴指令;
    判断剪切板中是否为图片复制协议文本;
    如果是,解析所述图片复制协议文本得到图片路径信息;
    根据所述图片路径信息加载图片。
  9. 如权利要求8所述的方法,其特征在于,判断所述剪切板中是否为图片复制协议文本包括:判断所述剪切板中文本是否包含图片复制协议的协议头,如果是,则确定所述剪切板中为图片复制协议文本;否则确定所述剪切板中不是图片复制协议文本。
  10. 如权利要求8所述的方法,其特征在于,解析所述图片复制协议文本还包括:依据所述得到的图片路径信息确定图片分类信息。
  11. 如权利要求10所述的方法,其特征在于,
    所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;
    所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
  12. 如权利要求8所述的方法,其特征在于,所述解析图片复制协议文本包括:解码所述图片复制协议文本中的所述图片路径信息。
  13. 如权利要求12所述的方法,其特征在于,对所述图片路径信息 进行解码包括:若所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL解码;若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径先进行URL解码,再进行base64解码。
  14. 如权利要求9所述的方法,其特征在于,如果判断所述剪切板中不是图片复制协议文本,则直接显示所述剪切板中的内容。
  15. 一种复制图片的装置,其特征在于,该装置包括:
    监听模块,用于监听复制指令;
    确定模块,用于确定待复制图片的图片路径信息;
    生成模块,用于基于所述图片路径信息生成图片复制协议文本;
    写入模块,用于将所述图片复制协议文本写入剪切板。
  16. 如权利要求15所述的装置,其特征在于,所述确定模块,具体用于获取并解析待复制图片的属性,从所述属性获得所述待复制图片的图片路径信息。
  17. 如权利要求15所述的装置,其特征在于,所述确定模块进一步用于依据所述图片路径信息确定图片分类信息;并且所述生成模块在基于所述图片路径信息生成图片复制协议文本时,进一步结合所述图片分类信息。
  18. 如权利要求15-17任一项所述的装置,其特征在于,所述图片复制协议文本包含图片复制协议的协议头。
  19. 如权利要求17所述的装置,其特征在于,
    所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;
    所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
  20. 如权利要求15所述的装置,其特征在于,所述生成模块,还用于对所述图片路径信息进行编码,利用编码后的图片路径信息生成所述图片复制协议文本。
  21. 如权利要求20所述的装置,其特征在于,所述生成模块对所述图片路径信息进行编码时,具体执行:
    若所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL编码;若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径进行base64编码后,再进行URL编码。
  22. 一种粘贴图片的装置,其特征在于,该装置包括:
    监听模块,用于监听粘贴指令;
    判断模块,用于判断剪切板中是否为图片复制协议文本;
    解析模块,用于解析所述图片复制协议文本得到图片路径信息;
    加载模块,用于根据所述图片路径信息加载图片。
  23. 如权利要求22所述的装置,其特征在于,所述判断模块,具体用于判断所述剪切板中文本是否包含图片复制协议的协议头,如果是,则确定所述剪切板中为图片复制协议文本;否则确定所述剪切板中不是图片复制协议文本。
  24. 如权利要求22所述的装置,其特征在于,解析模块还用于依据所述得到的图片路径信息确定图片分类信息。
  25. 如权利要求24所述的装置,其特征在于,
    所述图片分类包括:位于网络上的在线图片,保存在本地存储器中的本地图片,或者已经解析到内存中的内存图片;
    所述图片路径包括:指向所述在线图片的URL路径,指向所述本地图片的文件路径,或指向所述内存图片的图片数据路径。
  26. 如权利要求22所述的装置,其特征在于,所述解析模块,还用于解码所述图片复制协议文本中的所述图片路径信息。
  27. 如权利要求26所述的装置,其特征在于,所述解析模块在解码所述图片路径信息时,具体执行:
    若所述图片路径为指向在线图片的URL路径或者指向本地图片的文件路径,则对所述URL或文件路径进行URL解码;若所述图片路径为指向内存图片的图片数据路径,则对所述图片数据路径先进行URL解码,再进行base64解码。
  28. 如权利要求23所述的装置,其特征在于,如果判断所述剪切板中不是图片复制协议文本,则直接显示所述剪切板中的内容。
  29. 一种复制粘贴图片的方法,其特征在于,该方法包括如权利要求1-7任一项所述的复制图片的方法和如权利要求8-14任一项所述的粘贴图片的方法。
  30. 一种复制粘贴图片的系统,其特征在于,该系统包括如权利要求15-21任一项所述的复制图片的装置和如权利要求22-28任一项所述的粘贴图片的装置。
  31. 一种设备,包括:
    一个或多个处理器;
    存储器;
    一个或多个程序,所述一个或多个程序存储在所述存储器中,当被所述一个或多个处理器执行时,执行以下操作:
    监听复制指令;
    确定待复制图片的图片路径信息;
    基于所述图片路径信息生成图片复制协议文本;
    将所述图片复制协议文本写入剪切板。
  32. 一种设备,包括:
    一个或多个处理器;
    存储器;
    一个或多个程序,所述一个或多个程序存储在所述存储器中,当被所述一个或多个处理器执行时,执行以下操作:
    监听粘贴指令;
    判断剪切板中是否为图片复制协议文本;
    如果是,解析所述图片复制协议文本得到图片路径信息;
    根据所述图片路径信息加载图片。
  33. 一种非易失性计算机存储介质,所述计算机存储介质存储有一个或多个程序,当所述一个或多个程序被一个设备执行时,使得所述设备执行以下操作:
    监听复制指令;
    确定待复制图片的图片路径信息;
    基于所述图片路径信息生成图片复制协议文本;
    将所述图片复制协议文本写入剪切板。
  34. 一种非易失性计算机存储介质,所述计算机存储介质存储有一个 或多个程序,当所述一个或多个程序被一个设备执行时,使得所述设备执行以下操作:
    监听粘贴指令;
    判断剪切板中是否为图片复制协议文本;
    如果是,解析所述图片复制协议文本得到图片路径信息;
    根据所述图片路径信息加载图片。
PCT/CN2015/095778 2015-09-25 2015-11-27 复制/粘贴图片的方法、装置、系统、设备及存储介质 WO2017049761A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510623376.2A CN105160018A (zh) 2015-09-25 2015-09-25 一种复制/粘贴图片的方法、装置和系统
CN201510623376.2 2015-09-25

Publications (1)

Publication Number Publication Date
WO2017049761A1 true WO2017049761A1 (zh) 2017-03-30

Family

ID=54800874

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095778 WO2017049761A1 (zh) 2015-09-25 2015-11-27 复制/粘贴图片的方法、装置、系统、设备及存储介质

Country Status (2)

Country Link
CN (1) CN105160018A (zh)
WO (1) WO2017049761A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020993A (zh) * 2016-05-04 2016-10-12 珠海市魅族科技有限公司 一种复制粘贴数据的方法以及终端
CN106095743B (zh) * 2016-06-21 2019-01-29 武汉斗鱼网络科技有限公司 一种富文本编辑方法及装置
CN106354387A (zh) * 2016-08-31 2017-01-25 江苏中威科技软件系统有限公司 一种基于输入法的实用云剪切板
CN106657641B (zh) * 2016-12-26 2019-10-25 北京安云世纪科技有限公司 一种优化分享方式的方法及相关设备
CN107231415B (zh) * 2017-05-25 2018-09-07 腾讯科技(深圳)有限公司 图片的网络存储方法和装置
CN111241439B (zh) * 2018-11-29 2024-04-16 北京京东尚科信息技术有限公司 网页内容的复制方法、装置、电子设备及介质
CN117411847B (zh) * 2023-12-14 2024-03-08 彩讯科技股份有限公司 一种邮件外链图片转存方法、系统和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996165A (zh) * 2009-08-28 2011-03-30 中国移动通信集团公司 智能终端上网页信息的拷贝处理方法、装置及设备
CN102799501A (zh) * 2012-06-21 2012-11-28 北京奇虎科技有限公司 一种用于计算机系统的资料复制方法及装置
CN103064829A (zh) * 2011-10-19 2013-04-24 王国臣 一种基于互联网的复制粘贴方法和系统
CN103514147A (zh) * 2012-06-29 2014-01-15 腾讯科技(深圳)有限公司 复制粘贴网页内容的方法和系统
US20140095673A1 (en) * 2012-09-25 2014-04-03 Tencent Technology (Shenzhen) Company Limited Systems and methods for transmitting and receiving data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7109985B2 (en) * 2001-12-14 2006-09-19 Liquidpixels, Inc. System and method for dynamically generating on-demand digital images
CN104580297B (zh) * 2013-10-17 2019-02-01 腾讯科技(深圳)有限公司 图片发送、接收方法及装置
CN104657038A (zh) * 2015-02-06 2015-05-27 深圳市艾优尼科技有限公司 一种处理内容的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996165A (zh) * 2009-08-28 2011-03-30 中国移动通信集团公司 智能终端上网页信息的拷贝处理方法、装置及设备
CN103064829A (zh) * 2011-10-19 2013-04-24 王国臣 一种基于互联网的复制粘贴方法和系统
CN102799501A (zh) * 2012-06-21 2012-11-28 北京奇虎科技有限公司 一种用于计算机系统的资料复制方法及装置
CN103514147A (zh) * 2012-06-29 2014-01-15 腾讯科技(深圳)有限公司 复制粘贴网页内容的方法和系统
US20140095673A1 (en) * 2012-09-25 2014-04-03 Tencent Technology (Shenzhen) Company Limited Systems and methods for transmitting and receiving data

Also Published As

Publication number Publication date
CN105160018A (zh) 2015-12-16

Similar Documents

Publication Publication Date Title
WO2017049761A1 (zh) 复制/粘贴图片的方法、装置、系统、设备及存储介质
US10956652B2 (en) Support for non-native file types in web application environment
US10713434B2 (en) Transfer of content between documents of different storage types
US8843858B2 (en) Optimization schemes for controlling user interfaces through gesture or touch
JP6154005B2 (ja) ホスト・コンパチブルのダウンロード可能なアプリケーションの識別
WO2015196954A1 (zh) 网页元素的显示方法以及浏览器装置
JP5385373B2 (ja) ビューアクライアントにおける文書の高忠実度レンダリング
US20150128017A1 (en) Enabling interactive screenshots within collaborative applications
US20130326371A1 (en) Methods And Apparatuses For Sharing Information
US20160342449A1 (en) Data exchange across multiple computing devices through a proactive intelligent clipboard
US8954894B2 (en) Gesture-initiated symbol entry
WO2023093673A1 (zh) 一种信息处理方法、装置、系统及存储介质
US20170083490A1 (en) Providing collaboration communication tools within document editor
JP2013528859A (ja) クライアントアプリケーションとウェブページの統合
KR20210111294A (ko) 전자 콘텐츠에서 실행 가능한 주석을 위한 확장 가능한 프레임워크
US10506017B2 (en) Manipulation of PDF file content through HTTP requests
US20130081010A1 (en) Template and server content download using protocol handlers
US11729248B2 (en) Web application component migration to a cloud computing system
US20160315889A1 (en) Rich attachment regeneration
US9785724B2 (en) Secondary queue for index process
US9536252B2 (en) Method and apparatus for enabling targeted messages based on usage of a document accessed within an internet browser
EP3341917B1 (en) Smart flip operation for grouped objects
US20180335899A1 (en) Digital Asset Association with Search Query Data
US10171687B2 (en) Providing content and attachment printing for communication
US11475458B2 (en) In-app lead nurturing within an electronic document

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15904636

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15904636

Country of ref document: EP

Kind code of ref document: A1