The present invention relates to the field of image processing technologies, and more especially, to an apparatus and a method for processing extension information in an image file.
The image processing generally refers to digital image processing. A digital image is a two-dimensional array obtained after sampling or digitizing via equipment such as digital cameras, scanners etc., and an element in the array is called a pixel, and a array value thereof is an integer, which is known as a gray value. The image processing technology mainly comprises three parts: image compression, image enhancement and recovery, image matching and description, and image identification.
In existing image processing technologies, the method for processing image extension information mainly adopts Exif image file specification used by JPEG files, wherein, an Exif image file header is similar to a dictionary structure, and contains an index part and a content part. In general, the relatively important index information in tag type information (defined in the Exif standard) is put together as a first level dictionary. A second level dictionary and a supplementary dictionary are added at the end of the first level dictionary, wherein, the remaining index information is put into the supplementary dictionary. Each group of Exif tags has the same structure. The index information part is composed of characters with a specified length, and generally comprises the following contents: a tag type, such as a manufacture name and so on; a tag content type, such as ASCII and so on; a tag length, which is usually an integer; and an address where the tag content is located. Except for image compression data, all other extension information, such as photographic parameters of the equipment manufacture information, lenses, and apertures and so on, can be stored in corresponding tags.
Such method in the existing technologies can store the extension information of an image file; however there are also the following disadvantages: firstly, the problem of adding extension information for all image formats cannot be solved, and other image formats, such as BMP, GIF, WBMP and so on do not support the Exif format; secondly, users can implement extension information sections only if using a specialized imaging software which supports editing Exif information when needing to edit image extension information, and can only view the content of the extension information on the terminals supporting decoding the corresponding Exif extension information sections, thus being inconvenient to use; and thirdly, the method cannot support increasing the extension information sections by the users themselves, thus limiting the flexibility for the users to edit extension information.
The technical problem to be solved by the present invention is to provide an apparatus and a method for processing extension information in an image file, to realize editing the extension information for the image files in various formats, thus achieving the flexibility of editing extension information and guaranteeing the security of the extension information.
In order to solve the aforementioned technical problem, the present invention provides an apparatus for processing extension information in an image file, which comprises: an editing module, an encrypting module, and a decrypting module; wherein,
the editing module is configured to edit the extension information for the image file, and to send the edited extension information to the encrypting module;
the encrypting module is configured to encrypt the extension information edited by the editing module, and to additionally write the encrypted extension information into the image file; and
the decrypting module is configured to extract the extension information encrypted by the encrypting module from the needed image file, and to decrypt the encrypted extension information.
Preferably, the apparatus for processing extension information in an image file further comprises a display module, which is configured to decode and display the extension information decrypted by the decrypting module.
Preferably, in the apparatus for processing extension information in an image file, the extension information comprises a group of extension information sections; and the extension information section comprises an extension information section title and extension information section contents.
Preferably, in the apparatus for processing extension information in an image file, the encrypting module is further configured to add section header information of the extension information section to the encrypted extension information.
Preferably, in the apparatus for processing extension information in an image file, the decrypting module is configured to extract the extension information encrypted by the encrypting module from the needed image file, to extract the encrypted extension information section from the image file according to the section header information, and to decrypt the encrypted extension information section.
Preferably, in the apparatus for processing extension information in an image file, the display module is further configured to decode and display the extension information edited by the editing module.
In order to solve the aforementioned technical problem, the present invention further provides a method for processing extension information in an image file, which comprises:
editing the extension information for the image file;
encrypting the edited extension information, and additionally writing the encrypted extension information into the image file; and
extracting the encrypted extension information from the needed image file, and decrypting the encrypted extension information.
Preferably, after the step of decrypting the encrypted extension information, the method for processing extension information in an image file further comprises:
decoding and displaying the decrypted extension information.
Preferably, in the method for processing extension information in an image file, the extension information comprises a group of extension information sections; and the extension information section comprises an extension information section title and extension information section contents.
Preferably, after the step of encrypting the edited extension information and before the step of additionally writing the encrypted extension information into the image file, the method for processing extension information in an image file further comprises:
adding section header information of the extension information section to the encrypted extension information.
Preferably, in the method for processing extension information in an image file, the step of extracting the encrypted extension information from the needed image file comprises: extracting the encrypted extension information section from the needed image file according to the section header information in the encrypted extension information extracted from the needed image file; and the step of decrypting the encrypted extension information comprises: decrypting the encrypted extension information section.
Preferably, the method for processing extension information in an image file further comprises: decoding and displaying the edited extension information.
For the apparatus and the method for processing extension information in an image file in accordance with the present invention, the apparatus is configured to with anset the editing module which is used to edit the extension information for the image file, and the an encrypting module and the a decrypting module which are used to encrypt and decrypt the edited extension information, thus realizing editing the extension information for the image files in various formats, and guaranteeing the security of the extension information; and at the same time the method for processing extension information in an image file in accordance with the present invention, achieves the purpose of editing the extension information of the image in various formats, and can ensure the security of the extension information as well, by means of editing the extension information for the image file and encrypting and decrypting the edited extension information.
The implementation of the purpose, functional characteristics and advantages of the present invention will be illustrated in further detail in combination with the embodiments and with reference to the aforementioned accompanying drawings.
In order to implement editing extension information in image files in all formats, the present invention provides an apparatus for processing the image. The apparatus is configured with an editing module which is used to edit the extension information; an encrypting module which is used to encrypt the extension information; a decrypting module which is used to decrypt the encrypted extension information; and a display module which is used to decode and display the extension information.
A structural diagram of an apparatus for processing extension information in an image file of in accordance with the present invention is as shown in
The apparatus for processing extension information in an image file in accordance with the present invention can be widely used in a variety of terminal equipment, for example the apparatus can be applied to various types of mobile phone terminals, image browsing apparatuses and so on.
The apparatus of the present invention is set at an equipment terminal, which provides an editing interface for the extension information, and the editing interface can be a window interface. A user takes advantage of the editing module 10 in the apparatus of the present invention to edit extension information in the image file. The extension information comprises one or more groups of extension information sections. The user can use the editing module 10 to input the extension information sections of the image file on the editing interface, and each group of the extension information sections comprises an extension information section title and extension information section contents.
In the apparatus for processing extension information in an image file in accordance with the present invention, the encrypting module 20 additionally writes the encrypted extension information into the original image file, without affecting decoding the images in the original image file, and a user can browse the images, without being subject to an impact of the extension information.
In the apparatus in accordance with the present invention, under instructions of a user, the decrypting module 30 reads the encrypted extension information in the original image file, decrypts it and restores various extension information sections, which are analyzed and decoded by the display module 40 so as to be displayed in a friendly interactive way. Each group of the extension information sections comprises an extension information title and the extension information section contents.
A flow chart of a first embodiment of a method for processing extension information in an image file in accordance with the present invention is shown in
In step 201, an image file of which extension information is needed to be edited is selected, and the extension information of the image file is edited.
Wherein, editing the extension information comprises: adding the extension information of the image file, deleting the extension information in the image file, and modifying the extension information in the image file.
In step 202, each edited extension information section is encrypted, and section header information of the extension information section is added to the encrypted extension information, and then the encrypted extension information section is additionally written into the corresponding original image file.
Encrypting the extension information in the step adopts two kinds of encryption algorithms, i.e., DES and MD5, but is not limited to these two kinds of encryption algorithms.
The section header information of the extension information section comprises information such as a tag (namely ZteImageExTag), a number of the information sections, an encryption mode indication field (DES, MD5 or other encryption algorithms), a total length of all the original extension information sections, a total length of the encrypted extension information and so on.
In step 203, the encrypted extension information is extracted from the original image file, and the section header information of the extension information is searched for, and then the encrypted extension information sections are read according to the section header information; and the extension information is decrypted to be restored as the extension information before being encrypted.
In step 204, the decrypted extension information is decoded and displayed.
A flow chart of a second embodiment of a method for processing extension information in an image file in accordance with the present invention is shown in
In step 301, the user edits and increases an extension information section title and extension information section contents of the image file in the editing interface.
In step 302, the edited and increased extension information section title and extension information section contents are encrypted.
In step 303, the encrypted extension information section title and extension information section contents are additionally written into the original image file.
Wherein, a structure of the image information in the original image file is ensured not to be destroyed during the additionally writing.
In step 304, the encrypted extension information sections are decrypted under instructions of the user, so as to be restored as the extension information sections before being encrypted.
In step 305, the decrypted extension information sections are decoded and displayed.
A flow chart of a third embodiment of a method for processing extension information in an image file in accordance with the present invention is shown in
In step 401, the user selects an image file of which extension information is needed to be edited.
In step 402, the user edits the extension information for the image file.
The editing process comprises: adding extension information sections, inputting a corresponding extension information section title and extension information section contents in various extension information sections, and confirming an end of the editing after completing the editing, wherein, there are a plurality of extension information sections. A diagram of a format of an extension information section in an image file in accordance with the present invention is as shown in
In step 403, the extension information edited by the user is obtained, section header information is added to each extension information section in the extension information, and all the extension information sections are combined; wherein, the extension information comprises one or more groups of extension information sections, and each extension information section comprises an extension information title and extension information section contents. The embodiment illustrates the format of the extension information section by example of two extension information sections of a time extension information section and a location extension information section. A diagram of a format of an extension information section combination in an image file in accordance with the present invention is as shown in
In step 404, the extension information section combination is encrypted, wherein, the present step adopts DES, MD5 or other encryption methods to encrypt the combined extension information.
In step 405, a total extension information section header is added to the encrypted extension information section combination, and the total extension information section header comprises a tag (namely ZteImageExTag), a number of information sections, an encryption mode indication field (DES, MD5 or other encryption algorithms), a total length of all the original extension information sections, a total length of the encrypted extension information; the encrypted extension information to which the total extension information section header is added is obtained, and then the encrypted extension information is additionally written into the original image file in a binary mode. A diagram of a format of an encrypted extension information section to which an extension information section header is added in an image file in accordance with the present invention is as shown in
Wherein, the method for encrypting the extension information in the step 405 can adopt any currently available security encryption algorithm with high security, and is not limited to the encryption algorithms of DES, MD5; and the tag is used to identify a starting point of the extended information.
A flow chart of a fourth embodiment of a method for processing extension information in an image file in accordance with the present invention is shown in
In step 501, a user selects an image file of which extension information is needed to be displayed.
In step 502, the content of the selected image file is searched for, and section header information of various extension information sections in the extension information of the image file is looked for in the content.
In step 503, a length of the corresponding encrypted extension information contents is searched for and read according to the section header information, and then the corresponding encrypted extension information contents are read.
In step 504, encryption mode information is read, and the encrypted extension information is decrypted using a corresponding decryption method according to the encryption mode information.
In step 505, number information of the extension information sections is read, various extension information sections are read one by one from the decrypted extension information content according to a format of an encrypted extension information section after being added with an extension information section header in an image file in accordance with the present invention, a diagram of which is shown in
In step 506, the extension information section titles and the extension information section contents of various extension information sections which are analyzed out, are decoded and displayed.
Wherein, the encryption algorithm adopted in the step 504 can be any available security encryption algorithm with high security, and is not limited to the encryption algorithms of DES and MD5.
For the apparatus and the method for processing extension information in an image file in accordance with the present invention, the apparatus is configured with an editing module which is used to edit the extension information for the image file, an encrypting module and a decrypting module which are used to encrypt and decrypt the edited extension information, and a display module which is used to display the extension information; thus realizing editing the extension information for the image files in various formats, and guaranteeing the security of the extension information; even if the image information of an image file is leaked, it does not have to be worried about the leakage of the extended information in the image file, and a user can view the content of the extended information as required at any time, and meanwhile, the application fields are wide, and the apparatus and the method can be applied to a variety of terminal equipment, such as mobile phone terminals, image browser apparatuses and so on.
The above disclosure is only the specific embodiments of the present invention, and is not intended to limit the present invention. All modifications, which can be thought of by the skilled in the art, should belong to the protection scope of the present invention.
For the apparatus and the method for processing extension information in an image file in accordance with the present invention, the apparatus is configured with an editing module which is used to edit the extension information for the image file, an encrypting module and a decrypting module which are used to encrypt and decrypt the edited extension information, and a display module which is used to display the extension information; thus realizing editing the extension information for the image files in various formats, and guaranteeing the security of the extension information; and even if the image information of an image file is leaked, there is no need to worry about the leakage of the extended information in the image file, and a user can view the content of the extended information as required at any time, and meanwhile, the application fields are wide.
Number | Date | Country | Kind |
---|---|---|---|
2009 1 0189321 | Dec 2009 | CN | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN2010/078086 | 10/25/2010 | WO | 00 | 5/10/2012 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2011/076037 | 6/30/2011 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
6493028 | Anderson et al. | Dec 2002 | B1 |
7546334 | Redlich et al. | Jun 2009 | B2 |
8516366 | Hicks et al. | Aug 2013 | B2 |
20050108540 | Kusnoto et al. | May 2005 | A1 |
20080069540 | Takagi et al. | Mar 2008 | A1 |
20080148056 | Ginter et al. | Jun 2008 | A1 |
20080218805 | Dokuni | Sep 2008 | A1 |
20080270792 | Liu | Oct 2008 | A1 |
20090103789 | Danner et al. | Apr 2009 | A1 |
20090187604 | Guo et al. | Jul 2009 | A1 |
20110019816 | Inami et al. | Jan 2011 | A1 |
Number | Date | Country |
---|---|---|
1652113 | Aug 2005 | CN |
101202641 | Jun 2008 | CN |
101763397 | Jun 2010 | CN |
1760612 | Jul 2007 | EP |
2006260242 | Sep 2006 | JP |
0208945 | Jan 2002 | WO |
Entry |
---|
International Search Report for PCT/CN2010/078086 dated Jan. 19, 2011. |
“Exifer for Windows”, http://web.archive.org/web/20040829035504/http://www.friedemann-schmidt.com/software/exifer/; XP-002717556; See pp. 1-5. |
Number | Date | Country | |
---|---|---|---|
20120218275 A1 | Aug 2012 | US |