CN111222303A - Method, system, terminal and medium for obtaining size of picture converted from document - Google Patents

Method, system, terminal and medium for obtaining size of picture converted from document Download PDF

Info

Publication number
CN111222303A
CN111222303A CN201811410266.8A CN201811410266A CN111222303A CN 111222303 A CN111222303 A CN 111222303A CN 201811410266 A CN201811410266 A CN 201811410266A CN 111222303 A CN111222303 A CN 111222303A
Authority
CN
China
Prior art keywords
picture
size
converted
image quality
document
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.)
Withdrawn
Application number
CN201811410266.8A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology 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 Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201811410266.8A priority Critical patent/CN111222303A/en
Publication of CN111222303A publication Critical patent/CN111222303A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Abstract

The invention discloses a method, a system, a terminal and a medium for obtaining the size of a picture converted from a document, wherein the method comprises the following steps: calculating a predicted value of the size of the picture after conversion according to the selected image quality before converting the document into the picture; and displaying the estimated value. The invention can know the size of the converted picture before converting the document into the picture.

Description

Method, system, terminal and medium for obtaining size of picture converted from document
Technical Field
The present invention relates to a document conversion picture technology, and more particularly, to a method, system, terminal and storage medium for obtaining a size of a picture converted from a document.
Background
Currently, the size of a converted picture is not usually displayed before a document (such as a PDF document) is converted into a picture, and only after the conversion is completed, a user can know the size of the converted picture. However, in some cases, a user may want to know the size of a converted picture before converting a document into a picture, for example, if a picture uploading function provided by a website is limited by the size of the picture, if the user knows the size of the converted picture before converting the document into the picture, the user may select whether to upload the picture according to the size value of the picture to be converted, or select another picture coding algorithm to convert the picture again, so as to avoid the user performing an invalid picture uploading operation.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a method, system, terminal and storage medium for obtaining a size of a picture converted from a document, which enables a converted picture size to be known before converting the document into the picture.
In order to achieve the object of the present invention, the present invention provides a method for obtaining a size of a picture converted from a document, comprising:
calculating a predicted value of the size of the picture after conversion according to the selected image quality before converting the document into the picture;
and displaying the estimated value.
As one implementation, the calculating an estimated value of the picture size after the conversion according to the selected image quality includes:
calculating the corresponding average compression ratio after converting the pictures according to each image quality;
and dividing the size of the document to be converted by the average compression ratio corresponding to the selected image quality to obtain a predicted value of the size of the picture converted according to the selected image quality.
As an implementation manner, the calculating an average compression ratio corresponding to each image quality after the picture is converted includes:
for each image quality:
after image coding is carried out on a set number of documents, the compression ratio of each picture is calculated to obtain the compression ratios of the set number;
and calculating the average value of the set number of compression ratios to obtain the average compression ratio.
As one implementation, the calculating an estimated value of the picture size after the conversion according to the selected image quality includes:
calculating the size of the converted picture according to the selected image quality;
using the size as the estimate.
The embodiment of the present invention further provides a system for obtaining the size of a picture converted from a document, including:
a calculation module for calculating a predicted value of the size of the converted picture according to the selected image quality before converting the document into the picture;
and the display module is used for displaying the estimated value.
As one implementation, a calculation module for calculating an estimated value of picture size after conversion according to a selected image quality includes:
calculating the corresponding average compression ratio after converting the pictures according to each image quality;
and dividing the size of the document to be converted by the average compression ratio corresponding to the selected image quality to obtain a predicted value of the size of the picture converted according to the selected image quality.
As an implementation manner, the calculating module is configured to calculate an average compression ratio corresponding to each image quality after the image is converted, and includes:
for each image quality:
after image coding is carried out on a set number of documents, the compression ratio of each picture is calculated to obtain the compression ratios of the set number;
and calculating the average value of the set number of compression ratios to obtain the average compression ratio.
As one implementation, a calculation module for calculating an estimated value of picture size after conversion according to a selected image quality includes:
calculating the size of the converted picture according to the selected image quality;
using the size as the estimate.
Embodiments of the present invention also provide a computer-readable storage medium, which stores computer-executable instructions, and when executed by a processor, implement the steps of the method for obtaining the size of a picture converted from a document as described above.
An embodiment of the present invention further provides a program installation terminal, including:
a memory for storing computer executable instructions;
a processor for executing the computer-executable instructions to implement the steps of the method for obtaining a picture size converted from a document as previously described.
Compared with the prior art, the method comprises the steps of calculating the estimated value of the size of the picture after conversion according to the selected image quality before converting the document into the picture; and displaying the estimated value. The invention can know the size of the converted picture before converting the document into the picture.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flowchart of a method for obtaining a size of a picture converted from a document according to an embodiment of the present invention;
fig. 2 is a diagram of a system for obtaining a size of a picture converted from a document according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
An embodiment of the present invention provides a method for obtaining a size of a picture converted from a document, as shown in fig. 1, where the method includes:
s101, before converting a document into a picture, calculating a predicted value of the size of the picture converted according to the selected image quality; the image quality is commonly described as: high, medium and low options, or the highest, high, medium, low and lowest five options;
as one implementation, the calculating an estimated value of the picture size after the conversion according to the selected image quality includes:
calculating the corresponding average compression ratio after converting the pictures according to each image quality;
and dividing the size of the document to be converted by the average compression ratio corresponding to the selected image quality to obtain a predicted value of the size of the picture converted according to the selected image quality.
Wherein the calculating of the average compression ratio corresponding to the converted picture according to each image quality includes:
for each image quality: after picture coding is carried out on a set number of documents, the compression ratio of each picture is calculated to obtain the compression ratios of the set number; and calculating the average value of the set number of compression ratios to obtain the average compression ratio. For example, 1000 documents are set, JPEG encoding is performed using 3 image qualities of high, medium, and low, respectively, and the compression ratio of the 1000 documents at each image quality, that is, the ratio of the document size before encoding to the picture size after encoding is obtained; averaging 1000 compression ratios under each image quality to obtain a required average compression ratio;
the estimation algorithm of the scheme has high operation speed.
As another implementation, the calculating an estimated value of the picture size after the conversion according to the selected image quality includes:
calculating the size of the converted picture according to the selected image quality; using the size as the estimate. Since the program is actually converted in the background, the comparison is time-consuming, but the obtained size value is accurate.
S102, displaying the estimated value.
The embodiment of the invention can know the size of the converted picture before converting the document into the picture, thereby providing convenience for users.
An embodiment of the present invention further provides a system for obtaining a size of a picture converted from a document, as shown in fig. 2, the system includes:
a calculation module 201, configured to calculate a predicted value of the size of the converted picture according to the selected image quality before converting the document into the picture; the image quality is commonly described as: high, medium and low options, or the highest, high, medium, low and lowest five options;
as an implementation manner, the calculating module 201 is configured to calculate an estimated value of the converted picture size according to the selected image quality, and includes:
calculating the corresponding average compression ratio after converting the pictures according to each image quality;
and dividing the size of the document to be converted by the average compression ratio corresponding to the selected image quality to obtain a predicted value of the size of the picture converted according to the selected image quality.
The calculating module 201 is configured to calculate an average compression ratio corresponding to each image quality after the image is converted, and includes:
for each image quality: after image coding is carried out on a set number of documents, the compression ratio of each picture is calculated to obtain the compression ratios of the set number; and calculating the average value of the set number of compression ratios to obtain the average compression ratio. For example, 1000 documents are set, JPEG encoding is performed using 3 image qualities of high, medium, and low, respectively, and the compression ratio of the 1000 documents at each image quality, that is, the ratio of the document size before encoding to the picture size after encoding is obtained; averaging 1000 compression ratios under each image quality to obtain a required average compression ratio;
the estimation algorithm of the scheme has high operation speed.
As another implementation, the calculating module 201 is configured to calculate an estimated value of the picture size after the conversion according to the selected image quality, and includes:
calculating the size of the converted picture according to the selected image quality; using the size as the estimate. Since the program is actually converted in the background, the comparison is time-consuming, but the obtained size value is accurate.
A display module 201, configured to display the estimated value.
The embodiment of the invention can know the size of the converted picture before converting the document into the picture, thereby providing convenience for users.
Embodiments of the present invention further provide a computer-readable storage medium, which stores computer-executable instructions, and when executed by a processor, the computer-executable instructions implement the steps of the method for obtaining the size of the picture converted from the document according to the foregoing embodiments.
An embodiment of the present invention further provides a terminal for obtaining a size of a picture converted from a document, including:
a memory for storing computer executable instructions;
a processor for executing the computer-executable instructions to implement the steps of the method for obtaining the size of a picture converted from a document as described in the previous embodiment.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A method for obtaining the size of a picture converted from a document, comprising:
calculating a predicted value of the size of the picture after conversion according to the selected image quality before converting the document into the picture;
and displaying the estimated value.
2. The method of claim 1, wherein said calculating an estimate of the converted picture size according to the selected image quality comprises:
calculating the corresponding average compression ratio after converting the pictures according to each image quality;
and dividing the size of the document to be converted by the average compression ratio corresponding to the selected image quality to obtain a predicted value of the size of the picture converted according to the selected image quality.
3. The method of claim 2, wherein said calculating an average compression ratio corresponding to each image quality after converting the picture comprises:
for each image quality:
after image coding is carried out on a set number of documents, the compression ratio of each picture is calculated to obtain the compression ratios of the set number;
and calculating the average value of the set number of compression ratios to obtain the average compression ratio.
4. The method of claim 1, wherein said calculating an estimate of the converted picture size according to the selected image quality comprises:
calculating the size of the converted picture according to the selected image quality;
using the size as the estimate.
5. A system for obtaining a picture size converted from a document, comprising:
a calculation module for calculating a predicted value of the size of the converted picture according to the selected image quality before converting the document into the picture;
and the display module is used for displaying the estimated value.
6. The system for obtaining the size of a picture converted from a document according to claim 5,
a calculation module for calculating an estimate of the size of the converted picture according to the selected image quality, comprising:
calculating the corresponding average compression ratio after converting the pictures according to each image quality;
and dividing the size of the document to be converted by the average compression ratio corresponding to the selected image quality to obtain a predicted value of the size of the picture converted according to the selected image quality.
7. The system for obtaining the size of a picture converted from a document according to claim 6,
the calculation module is used for calculating the corresponding average compression ratio after the pictures are converted according to each image quality, and comprises the following steps:
for each image quality:
after image coding is carried out on a set number of documents, the compression ratio of each picture is calculated to obtain the compression ratios of the set number;
and calculating the average value of the set number of compression ratios to obtain the average compression ratio.
8. The system for obtaining the size of a picture converted from a document according to claim 5,
a calculation module for calculating an estimate of the size of the converted picture according to the selected image quality, comprising:
calculating the size of the converted picture according to the selected image quality;
using the size as the estimate.
9. A computer-readable storage medium, having stored thereon computer-executable instructions which, when executed by a processor, carry out the steps of the method of obtaining a picture size converted from a document according to any one of claims 1 to 4.
10. A terminal for obtaining a picture size converted from a document, comprising:
a memory for storing computer executable instructions;
a processor for executing the computer-executable instructions to implement the steps of the method of obtaining a picture size converted from a document according to any one of claims 1 to 4.
CN201811410266.8A 2018-11-23 2018-11-23 Method, system, terminal and medium for obtaining size of picture converted from document Withdrawn CN111222303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811410266.8A CN111222303A (en) 2018-11-23 2018-11-23 Method, system, terminal and medium for obtaining size of picture converted from document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811410266.8A CN111222303A (en) 2018-11-23 2018-11-23 Method, system, terminal and medium for obtaining size of picture converted from document

Publications (1)

Publication Number Publication Date
CN111222303A true CN111222303A (en) 2020-06-02

Family

ID=70813532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811410266.8A Withdrawn CN111222303A (en) 2018-11-23 2018-11-23 Method, system, terminal and medium for obtaining size of picture converted from document

Country Status (1)

Country Link
CN (1) CN111222303A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651215A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 Document matching determination method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427341A (en) * 2013-08-28 2015-03-18 腾讯科技(深圳)有限公司 Image processing method and apparatus, and terminal
CN107592553A (en) * 2017-09-01 2018-01-16 清华大学 A kind of compression of images agency balance processing method and processing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427341A (en) * 2013-08-28 2015-03-18 腾讯科技(深圳)有限公司 Image processing method and apparatus, and terminal
CN107592553A (en) * 2017-09-01 2018-01-16 清华大学 A kind of compression of images agency balance processing method and processing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
温鑫工作室, 兵器工业出版社 北京希望电子出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651215A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 Document matching determination method and device, electronic equipment and storage medium
CN112651215B (en) * 2020-12-31 2023-11-03 中国农业银行股份有限公司 Method and device for determining document map, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11138707B2 (en) Electronic device and method for processing multiple images
CN109729353B (en) Video coding method, device, system and medium
CN110930467A (en) Image processing method, electronic device and readable storage medium
CN110609911A (en) Graph data processing method and device and computer readable storage medium
CN110505523B (en) Video transcoding priority order control method and processing terminal
US20120308147A1 (en) Image processing device, image processing method, and program
WO2019007241A1 (en) Method for allocating frequency-domain bandwidth resources, terminal, and computer-readable storage medium
CN111222303A (en) Method, system, terminal and medium for obtaining size of picture converted from document
US8681860B2 (en) Moving picture compression apparatus and method of controlling operation of same
CN112365401A (en) Image generation method, device, equipment and storage medium
US9525818B2 (en) Automatic tuning of images based on metadata
CN105468706A (en) Page display method and device
CN107431809A (en) The method and apparatus of image procossing
CN114760529B (en) Transmission method and device of multichannel video data and computer equipment
US20180152709A1 (en) Classes of Tables for Use in Image Compression
CN114051144A (en) Video compression method and device, computer equipment and storage medium
CN112449209B (en) Video storage method and device, cloud server and computer readable storage medium
US8373801B1 (en) Video source resolution detection
CN111405293A (en) Video transmission method and device
CN115209185A (en) Video frame insertion method and device and readable storage medium
CN112399196B (en) Image processing method and device
CN111708502B (en) Screen adaptation method and device
CN111083416A (en) Data processing method and device, electronic equipment and readable storage medium
CN112492250B (en) Method and device for adapting resolution of transmitting and receiving ends of image transmission system
CN111754387B (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200602

WW01 Invention patent application withdrawn after publication