CN101216828A - Image file conversion method and apparatus - Google Patents

Image file conversion method and apparatus Download PDF

Info

Publication number
CN101216828A
CN101216828A CNA200710304443XA CN200710304443A CN101216828A CN 101216828 A CN101216828 A CN 101216828A CN A200710304443X A CNA200710304443X A CN A200710304443XA CN 200710304443 A CN200710304443 A CN 200710304443A CN 101216828 A CN101216828 A CN 101216828A
Authority
CN
China
Prior art keywords
file
image
view data
image file
information
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CNA200710304443XA
Other languages
Chinese (zh)
Other versions
CN101216828B (en
Inventor
殷延伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN200710304443XA priority Critical patent/CN101216828B/en
Publication of CN101216828A publication Critical patent/CN101216828A/en
Application granted granted Critical
Publication of CN101216828B publication Critical patent/CN101216828B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a image file conversion method and a device, for solving the low working efficiency of converting an image file into common circulating file in prior art. The method of the invention includes the following steps: obtaining the image information by analyzing the image file according to the image file format; and writing the image information into the target file meeting the format requirement according to the format requirement of the target file. The invention is used for coverting an image file into a common circulation file to improve the file conversion efficiency.

Description

A kind of image file conversion method and device
Technical field
The present invention relates to the electronic publishing technical field, relate in particular to a kind of image file conversion method and device.
Background technology
Concerning enterprise or tissue,, a large amount of papery archives electronizations need be realized online query and shared along with informationalized deep.Concerning the individual, along with popularizing of equipment such as domestic digital camera, increasing people wishes to convert electronic image information to conveniently browse and share file, as portable document format (PDF, Portable Document Format) file needs to convert large batch of saving file to general negotiable formatted file sometimes.So, prior art comprises the method that image file converts general negotiable file to:
Step 1, a virtual printer is set.
Step 2, open image file by picture browsing software, after receiving print command, as on true printer, printing, with the image in the image file by pixel be painted on virtual " paper ", formation sends to the data stream of virtual printer.
After step 3, virtual printer are received data stream, according to the information such as color space of image, select the proper compression algorithm, data stream is compressed, the data stream after will compressing then deposits in.
Image file, JPEG (Joint Photographic Experts Group for example, associating photo expert group) image file of form, file extent .jpg by name or .jpeg, it is the file that after overcompression, obtains, so in the above-mentioned steps 2, need decompress when opening image file, and the pdf document that obtains in the step 3 obtains after also data stream being compressed.This shows that prior art comprises compression, decompression that view data is carried out and the process of compressing once more with the process that image file converts negotiable formatted file to.Therefore, when the image data amount that will change was very big, the work efficiency of prior art can be very low.
Summary of the invention
The embodiment of the invention provides a kind of image file conversion method and device, when solving the general negotiable file of exist in the prior art image file is converted to, and ineffective problem.
A kind of image file conversion method that the embodiment of the invention provides comprises:
According to the form of image file, image file is resolved, obtain image information;
According to the call format of file destination, described image information is write in the file destination with described call format.
A kind of image file conversion equipment that the embodiment of the invention provides comprises:
Resolution unit is used for the form according to image file, and image file is resolved, and obtains image information;
Converting unit is used for the call format according to file destination, and described image information is write in the file destination with described call format.
The embodiment of the invention according to the form of image file, is resolved image file, obtains image information; According to the call format of file destination, described image information is write in the file destination with described call format.Thereby in the transfer process that realizes image file, avoided having improved the work efficiency of converted image file to the decompression of image file and to the compression process of image data stream.
Description of drawings
The image conversion method overall procedure synoptic diagram that Fig. 1 provides for the embodiment of the invention;
Fig. 2 for the embodiment of the invention provide when image file be the file of jpg form, the image file conversion method idiographic flow synoptic diagram when file destination is the file of PDF;
The image conversion apparatus structural representation that Fig. 3 provides for the embodiment of the invention.
Embodiment
The embodiment of the invention provides a kind of image file conversion method and device.By parsing, obtain image information, and, described image information is write in the file destination with described call format according to the call format of file destination to image file.Be that the embodiment of the invention directly utilizes the image information data of compression to realize that image file is converted to general negotiable file (is designated hereinafter simply as negotiable formatted file, the i.e. file destination that image file is converted to), thus reach the purpose of increasing work efficiency.
Below in conjunction with accompanying drawing, the specific implementation of the embodiment of the invention is introduced.
Referring to Fig. 1, the image file conversion method that the embodiment of the invention provides comprises:
S101, according to the call format of image file, resolve this image file, obtain the image information data of this image file.
S102, set up negotiable formatted file, and, described image information data is write in the described negotiable formatted file according to the call format of this negotiable formatted file.
S103, the file layout information of the call format of described negotiable formatted file is write in the described negotiable formatted file.
Wherein, described image information comprises:
The bit number that view data, picture traverse, picture altitude, color of image space, image sampling point take, view data length and Image Data Compression mode etc.
When resolving image file, according to the form of this image file, counter this image file of separating obtains picture traverse.
Described picture traverse is used to describe image sampling point number in the horizontal direction.
Described picture altitude is used to describe image sampling point number in vertical direction.
Described color of image space is used to describe the used color type of image sampling point.For example, three primary colors (RGB, Red Green Blue) color space, adopt red (R, RED), green (G, GREEN) and blueness (B, BLUE) three color components are described the image sampling point.
The figure place that the bit number that described image sampling point takies takies for the image sampling point for example, is described the image sampling point with the RGB color space, and each image sampling point has three components, and each component is described with 8 bits.
Described compression of images mode is used to describe the compression type that view data is adopted when deposit.
Described view data length is used to describe the bit number of image sampling point data after overcompression.
Described view data is for describing the bit stream of image sampling point.
Described image file can be some image files and/or some files that comprises image file.
Described parse operation comprises image file is read in internal memory, obtains the image information data of image file then.
Described negotiable formatted file is general negotiable formatted file, i.e. disclosed, reliable, the easy file of file layout standard.For example: pdf document; XML (Extensible Markup Language) file, it is a kind of file of describing with XML (extensible Markup Language); Hypertext Markup Language (HTML, HyperText Markup Language) file, it is a kind of file of describing with Hypertext Markup Language; PS (PostScript), it is a kind of file with the PostScript language description.
The file standard of PDF is open, and anyone can be according to its norm-setting pdf document arbitrarily, and this document is independent of operating system, application software and the hardware of creating it, and can make things convenient for, transmit reliably information.
Described negotiable formatted file call format is the storage rule of data on disk.
Described file layout information comprises as file header, file body (except that image information) and end-of-file information.
Described file header is for showing the information of file layout; Described file body comprises page object, father's page or leaf object, documentation root object, content object and resource object etc.; Described cross reference table is the structure of the address of writing down each object; Described documentation root is for describing the root node of tree-like file structure; Described end-of-file, the record cross-reference table position hereof and the root node of document.
Further, information such as the page size of image file, page number can also be write in the described negotiable formatted file.
Described image file has comprised all information of describing image, and these information are stored in the disk according to certain format.
When image file comprises the file of a plurality of file extent jpg by name, when the file layout that these image files are converted to was the file of PDF, referring to Fig. 2, the method that the embodiment of the invention provides specifically comprised:
S201, beginning.
S202, judge whether to open the jpg file that need be converted, if then carry out step S203; Otherwise, otherwise carry out step S211.
S203, according to the jpg file format requirements, resolve the jpg file that described needs are converted, obtain image information.
Described image information comprises: the figure place that the color space of the length of view data, picture traverse, picture altitude, view data, the compress mode of view data, image, each sampled point of image are shared and the sampling point data of image.
S204, set up and open pdf document.
The title of pdf document is the requirement of PDF according to the file output format of described foundation, appends the expansion PDF by name of described pdf document.
S205, according to the pdf document call format, write the file header data.
Described file header data are the pdf document format information.
S206, according to the pdf document call format, write the file body data.
Described file body data comprise described image information object, DocumentRoot object, father's page or leaf object, page or leaf object, content flow object and resource object.
S207, according to the pdf document call format, write the cross reference table data.
Described cross reference table data have write down the document misregistration position of each data object in the file body.
S208, according to the pdf document call format, write the end-of-file data.
Described end-of-file data, the document misregistration position of having write down DocumentRoot and cross reference table.
S209, close described pdf document.
S210, close described jpg file.
S211, according to user instruction, judge whether the jpg file that is not converted in addition, if then carry out step S202, otherwise carry out step S212.
S212, end.
Introduce the device that the embodiment of the invention provides below.
Referring to Fig. 3, the image conversion apparatus that the embodiment of the invention provides comprises:
Resolution unit 31 is used for the form according to image file, and image file is resolved, and obtains image information.
Converting unit 32 is used for the form according to negotiable formatted file, and described image information is write in the described negotiable formatted file.
File layout information writing unit 33 is used for the file layout information of negotiable formatted file is write described negotiable formatted file.
Described file layout information comprises: file header, file body and end-of-file information.
Described image information comprises: the bit number that view data, picture traverse, picture altitude, color of image space, image sampling point take, view data length and Image Data Compression mode etc.
Described resolution unit 31 according to the form of described image file, is resolved image file, obtains the view data position, and according to described view data position, obtains the view data of described image file.
In sum, the embodiment of the invention provides a kind of technical scheme that image file is directly changed, the technical scheme of utilizing the embodiment of the invention to provide can directly convert image file to negotiable file, and, image file is exported quickly and efficiently.Especially for the bigger image file of data volume, can greatly increase work efficiency.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (10)

1. an image file conversion method is characterized in that, this method comprises:
According to the form of image file, image file is resolved, obtain image information;
According to the call format of file destination, described image information is write in the file destination with described call format.
2. method according to claim 1 is characterized in that, described image information comprises:
The bit number that view data, picture traverse, picture altitude, color of image space, image sampling point take, view data length and Image Data Compression mode.
3. method according to claim 2 is characterized in that, the step that obtains described view data comprises:
According to the form of described image file, image file is resolved, obtain the view data position;
According to described view data position, obtain the view data of described image file.
4. method according to claim 1 is characterized in that, this method also comprises:
The file layout information of file destination is write in the described file destination.
5. method according to claim 4 is characterized in that, described file layout information comprises:
File header, file body and end-of-file information.
6. an image file conversion equipment is characterized in that, this device comprises:
Resolution unit is used for the form according to image file, and image file is resolved, and obtains image information;
Converting unit is used for the call format according to file destination, and described image information is write in the file destination with described call format.
7. device according to claim 6 is characterized in that, described image information comprises:
The bit number that view data, picture traverse, picture altitude, color of image space, image sampling point take, view data length and Image Data Compression mode.
8. device according to claim 7 is characterized in that, described resolution unit, according to the form of described image file, image file is resolved, obtain the view data position, and, obtain the view data of described image file according to described view data position.
9. device according to claim 6 is characterized in that, this device also comprises:
File layout information writing unit is used for the file layout information of file destination is write described file destination.
10. device according to claim 9 is characterized in that, described file layout information comprises:
File header, file body and end-of-file information.
CN200710304443XA 2007-12-27 2007-12-27 Image file conversion method and apparatus Expired - Fee Related CN101216828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710304443XA CN101216828B (en) 2007-12-27 2007-12-27 Image file conversion method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710304443XA CN101216828B (en) 2007-12-27 2007-12-27 Image file conversion method and apparatus

Publications (2)

Publication Number Publication Date
CN101216828A true CN101216828A (en) 2008-07-09
CN101216828B CN101216828B (en) 2012-01-11

Family

ID=39623260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710304443XA Expired - Fee Related CN101216828B (en) 2007-12-27 2007-12-27 Image file conversion method and apparatus

Country Status (1)

Country Link
CN (1) CN101216828B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678434A (en) * 2012-09-06 2014-03-26 虹光精密工业股份有限公司 Method for automatically converting format of scanned image document
CN105302775A (en) * 2014-06-30 2016-02-03 鸿合科技有限公司 File format converting method and apparatus
CN105308554A (en) * 2013-04-10 2016-02-03 惠普深蓝有限责任公司 Data transfer system, method of transferring data, and system
CN105488049A (en) * 2014-09-17 2016-04-13 腾讯科技(深圳)有限公司 Webpage image analysis method and apparatus and browser
CN107423338A (en) * 2017-04-28 2017-12-01 中国铁道科学研究院 A kind of railway combined detection data display method and device
CN109948123A (en) * 2018-11-27 2019-06-28 阿里巴巴集团控股有限公司 A kind of image combining method and device
CN111310415A (en) * 2018-11-23 2020-06-19 珠海金山办公软件有限公司 Document conversion method and device, computer storage medium and terminal

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678434A (en) * 2012-09-06 2014-03-26 虹光精密工业股份有限公司 Method for automatically converting format of scanned image document
CN105308554A (en) * 2013-04-10 2016-02-03 惠普深蓝有限责任公司 Data transfer system, method of transferring data, and system
US9727287B2 (en) 2013-04-10 2017-08-08 Hewlett-Packard Indigo B.V. Data transfer system, method of transferring data, and system
CN105308554B (en) * 2013-04-10 2019-08-06 惠普深蓝有限责任公司 Data transmission system, the method and system for transmitting data
CN105302775A (en) * 2014-06-30 2016-02-03 鸿合科技有限公司 File format converting method and apparatus
CN105488049A (en) * 2014-09-17 2016-04-13 腾讯科技(深圳)有限公司 Webpage image analysis method and apparatus and browser
CN107423338A (en) * 2017-04-28 2017-12-01 中国铁道科学研究院 A kind of railway combined detection data display method and device
CN111310415A (en) * 2018-11-23 2020-06-19 珠海金山办公软件有限公司 Document conversion method and device, computer storage medium and terminal
CN109948123A (en) * 2018-11-27 2019-06-28 阿里巴巴集团控股有限公司 A kind of image combining method and device

Also Published As

Publication number Publication date
CN101216828B (en) 2012-01-11

Similar Documents

Publication Publication Date Title
CN101216828B (en) Image file conversion method and apparatus
CN102131020B (en) Image processing apparatus and image processing method
US8493595B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP5743443B2 (en) Image processing apparatus, image processing method, and computer program
US20130238968A1 (en) Automatic Creation of a Table and Query Tools
JP3518304B2 (en) Information browsing system
JP2002132547A (en) Server for electronics information control, client therefor, method therefor and readable record medium recording program therefor
CN103268340B (en) Format reflowable file based on hierarchy type index is set up and method for drafting
WO2014073941A1 (en) Apparatus and method for converting electronic form
CN102541948A (en) Method and device for extracting document structure
KR100893829B1 (en) Object transfer method with format adaptation
JP2007025814A5 (en)
CN110232161A (en) A kind of online method for previewing of document based on browser
US8988692B2 (en) Information processing apparatus, information processing method, and storage medium
US7038802B2 (en) Flexible networked image processing
JP2009037558A (en) Image processing apparatus, image processing method, program of the same, and storage medium
JP6232736B2 (en) Document reading support device, document reading support system, document reading support method and program
JP4246531B2 (en) Processing method, computer-readable medium, and system related to ink information in image file
JP2003196270A (en) Document information processing method, document information processor, communication system, computer program and recording medium
JP2006216024A (en) Efficient conversion of interchange format message
KR20130080745A (en) Method of generating electronic documents using camera module of smart phones and ocr engine of remote server, and terminal device using the same
CN102541818B (en) Large version re-editing method and device
CN103853849B (en) Method for establishing and drawing high-compression reflowable file
US20040054971A1 (en) System and method for managing patent documents
CN101340649A (en) Mobile phone with scan recognition function

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120111

Termination date: 20191227

CF01 Termination of patent right due to non-payment of annual fee