CN103793928A - Self-adaptive image scaling method and device of mobile platform information - Google Patents

Self-adaptive image scaling method and device of mobile platform information Download PDF

Info

Publication number
CN103793928A
CN103793928A CN201410056616.0A CN201410056616A CN103793928A CN 103793928 A CN103793928 A CN 103793928A CN 201410056616 A CN201410056616 A CN 201410056616A CN 103793928 A CN103793928 A CN 103793928A
Authority
CN
China
Prior art keywords
image
compression
queue
annex
file
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
CN201410056616.0A
Other languages
Chinese (zh)
Other versions
CN103793928B (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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201410056616.0A priority Critical patent/CN103793928B/en
Publication of CN103793928A publication Critical patent/CN103793928A/en
Application granted granted Critical
Publication of CN103793928B publication Critical patent/CN103793928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a self-adaptive image scaling method and device of mobile platform information. The method comprises the steps that when an information editing interface is opened to add files, whether a current file can be added or not is judged according to the maximum capacity of an attachment; when the file is added, scaling processing of a corresponding compression level is conducted on all images in the attachment according to the types, the number, the size and the maximum capacity of the attachment of the added files; the surplus capacity of the attachment is detected, a user is prompted to add files continuously when the surplus capacity is available, and when the surplus capacity is insufficient, the user is prompted to delete the file. According to the self-adaptive image scaling method and device of the mobile platform information, self-adaptive compression of the corresponding compression level can be chosen according to the capacity, finite space is completely used, meanwhile, the maximum image accuracy can be maintained, and the demand of users is met.

Description

A kind of adaptive image scaling method of mobile platform information and device thereof
Technical field
The present invention relates to Image Compression, particularly a kind of adaptive image scaling method of mobile platform information and device thereof.
Background technology
In information application in operating system, the compression mechanism of (as note, multimedia message) interpolation image is very simple at present, causes attachment content very limited.The attachment content of adding in general multimedia message has three kinds of forms: audio frequency, video and image.For Voice & Video, in process of transmitting, usually do not do and compress, be therefore the main contents of multimedia message accessory compression for the compression of image.But in existing operating system, be all in the time adding piece image, to trigger compression, adding audio frequency and video file and do not do any processing, it lacks customization and reversibleization operation, thereby there will be following problem:
1, add when attachment content, if while first selecting image, conventionally select larger coefficient compression (as carrying out one-level compression) in order to ensure the precision of images, then add audio frequency and will be subject to very much the restriction of residual capacity.And if in annex, added the audio frequency of certain capacity, then while adding image for image can be added, can automatically select less coefficient compression (as carrying out two-stage compression).Same like this content may not normally be added under the first order, the second but can, existing compression method is received the restriction of order of addition.
Suppose that annex max cap. (representing take limitation) is 300K.If first add image in annex, preserve the precision of images and compressed (as one-level compression, the size after the compression of Vresized presentation video, Vresized≤0.4 × limitation) with a larger coefficient, the compression of images of 300K is in 120K.Then while adding audio or video, can again not trigger compression, if audio frequency is 200K, the capacity of audio frequency together with image and the annex max cap. (300K) that (320K) will exceed setting, now prompting is added unsuccessfully.If but first add audio frequency (200K), add again image (300K), can carry out two-stage compression (Vresized≤0.2 × limitation) to image, the compression of images of 300K is in 60K, now the capacity of audio frequency together with image and (being not more than 260K), are just less than annex max cap. (300K), can normally add, can not point out failure.
2, existing compression method does not have customizable operation.For example certain image is less than annex max cap. limitation, and user does not wish compressed, sends with former figure.Once but existing compression method has triggered the condition (content of adding is image) of compression, in annex, all images all compress with identical coefficient, can not retain original image according to user's demand, and the precision of the image sending is lost greatly.
3, while deleting some attachment content, make annex active volume increase, in existing compression method still with the residual image in original coefficient Encapsulated PostScript, cause image supercompression and remainder accessory capabilities, can not rationally adjust compressibility coefficient, can not make image return to suitable precision, can not make full use of remaining space.
Thereby prior art need to improve.
Summary of the invention
In view of above-mentioned the deficiencies in the prior art part, the object of the present invention is to provide a kind of adaptive image scaling method and device thereof of mobile platform information, can not suitably adjust the problem of compressibility coefficient to solve existing compression method.
In order to achieve the above object, the present invention has taked following technical scheme:
An adaptive image scaling method for mobile platform information, it comprises:
A, open information editing interface and add when file, judge according to annex max cap. whether current file can be added;
B, in the time that this file can be added, according to type, number, size and the annex max cap. of file adding, all images in annex are carried out to the convergent-divergent processing of corresponding hierarchy compression;
The size of the residual capacity of C, detection accessory points out user can continue to add file in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.
The adaptive image scaling method of described mobile platform information, wherein, described steps A specifically comprises:
A1, the compressed queue of initialization and queue to be amplified while opening information editing interface; Described compressed queue is the queue of file after compressed, for showing annex All Files and sending the interim storage of annex; Queue described to be amplified is the document queue without any processing, for deleting zoomed image after the file of annex, or calls when specify image hierarchy compression;
When A2, interpolation file, judge whether the total volume of annex is less than default annex max cap.: if so, this file can add, execution step B; Otherwise this file can not add, the off-capacity of prompting annex; The total volume of described annex is the big or small sum of All Files in annex.
The adaptive image scaling method of described mobile platform information, wherein, described step B specifically comprises:
B1, file is stored in compressed queue and queue to be amplified;
B2, judge add file type whether be image, if perform step B3, otherwise execution step B4;
B3, judge that the number of image is greater than 1, or the total volume of annex is while being greater than annex max cap., compresses the image in compressed queue according to the first compression algorithm;
B4, judge that the total volume of annex is greater than annex max cap., and file is can also compress time, compresses the image in compressed queue according to the second compression algorithm.
The adaptive image scaling method of described mobile platform information, wherein, described step B4 specifically comprises:
B41, judge whether the total volume of annex is greater than annex max cap., if perform step B42, otherwise prompting user can continue to add file;
B42, judge whether the hierarchy compression of current annex is afterbody, if point out user's accessory capabilities deficiency, suggestion deletion file; Otherwise compress the image in compressed queue according to the second compression algorithm.
The adaptive image scaling method of described mobile platform information wherein, also comprises after described step C:
D, in the time of deletion file, adjust hierarchy compression according to the total volume of current annex and annex max cap., make image keep the maximum precision of images that can deposit.
The adaptive image scaling method of described mobile platform information, wherein, described step D specifically comprises:
D1, in the time of deletion file, from compressed queue and queue to be amplified, delete corresponding file;
D2, judge in remaining file whether have image, perform step D3 if having; Otherwise prompting user can add file;
D3, judge that whether the hierarchy compression of present image is at the highest level; If image is not amplified, otherwise according to the 3rd compression algorithm zoomed image.
The adaptive image scaling method of described mobile platform information, wherein, described step B also comprises: the hierarchy compression that the image that user is selected is selected according to user, by the 4th compression algorithm compression.
The adaptive image scaling method of described mobile platform information, wherein, described hierarchy compression comprises: zero level compression, one-level compression and two-stage compression, and described zero level compression or not, and the formula of described one-level compression is: Vresized≤0.4 × limitation; The formula of described two-stage compression is: Vresized≤0.2 × limitation;
Wherein, Vresized represents the size of compressed images, and limitation represents annex max cap..
The adaptive image scaling method of described mobile platform information, wherein, described the first compression algorithm specifically comprises:
S11, scan compressed queue, extract the image of all not specified compression grades and be stored in image queue;
Whether S12, the number that judges described image are less than 3 and be greater than 0; If so, carry out S13; Otherwise, carry out S14;
S13, the compression of employing one-level, and the compression limit of each image is 0.4 times of annex max cap.;
S14, employing two-stage compression, and the compression limit of each image is 0.2 times of annex max cap.;
S15, the image in image queue is compressed according to corresponding hierarchy compression, and the image size after compression is controlled in compression limit; Upgrade image corresponding in compressed queue with the compression result in image queue.
The adaptive image scaling method of described mobile platform information, wherein, described the second compression algorithm specifically comprises:
S21, scan compressed queue, extract the image of all not specified compression grades and be stored in image queue;
S22, judge whether the number of described image is greater than 0; If carry out S23, otherwise finish;
The hierarchy compression of image in S23, detected image queue;
S24, to the image in next hierarchy compression compressed image queue, upgrade compressed queue with the compression result in image queue;
Whether S25, the hierarchy compression that judges image in compressed queue are whether the total volume of two-stage compression or current annex is less than annex max cap.; If finish while being less than annex max cap. for the total volume of two-stage compression or current annex; Otherwise return to S24.
The adaptive image scaling method of described mobile platform information, wherein, described the 3rd compression algorithm specifically comprises:
S31, scan queue to be compressed, extract the image of all not specified compression grades and be stored in image queue;
S32, judge whether the number of image is greater than 0; If carry out S33, otherwise finish;
The hierarchy compression of image in S33, detected image queue;
S34, by a upwards hierarchy compression compression of the image in image column, upgrade compressed queue with the compression result in image queue;
S35, judge whether the total volume of annex is greater than annex max cap.; If carry out S37, otherwise carry out S36;
S36, judge that whether hierarchy compression in image queue is zero level compression, if finish, otherwise returns to S34;
S37, by the image in image queue to the compression of next hierarchy compression, upgrade the correspondence image in compressed queue with compression result.
The adaptive image scaling method of described mobile platform information, wherein, described the 4th compression algorithm specifically comprises:
S41, scan queue to be amplified, extract the image of specified compression grade and be stored in image queue, described hierarchy compression of having specified is L1; And in compressed queue, obtaining the hierarchy compression of this image, the hierarchy compression obtaining in described compressed queue is L2;
S42, judge that whether the hierarchy compression of L1 and L2 is identical, carry out S44 if identical, otherwise carry out S43;
S43, the image of the grade of specified compression of taking out in queue to be amplified is compressed to the hierarchy compression L1 that direct boil down to has been specified from zero level, upgrade the correspondence image in compressed queue with compression result;
S44, judge whether the total volume of current annex is greater than default annex max cap.: if so, point out the compression failure of specify image, by the hierarchy compression L2 obtaining in compressed original image boil down to queue; Otherwise prompting specify image compresses successfully.
An adaptive image scaling device for mobile platform information, it comprises:
Judge module, adds when file for opening information editing interface, judges according to annex max cap. whether current file can be added;
Compression module, in the time that this file can be added, according to type, number, size and the annex max cap. of the file adding, carries out the convergent-divergent processing of corresponding hierarchy compression to all images in annex;
Reminding module for detection of the size of the residual capacity of annex, points out user can continue to add file in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.
Compared to prior art, the adaptive image scaling method of mobile platform information provided by the invention and device thereof, in the time opening information editing interface interpolation file, first judge according to annex max cap. whether current file can be added.In the time that this file can add, then according to add file type, number size and annex max cap., all images in annex are carried out to the convergent-divergent processing of corresponding hierarchy compression.The size of the residual capacity of last detection accessory points out user can continue to add file in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.The present invention can select corresponding hierarchy compression self-adapting compressing image according to annex max cap., has solved existing compression method and can not suitably adjust the problem of compressibility coefficient.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the adaptive image scaling method of embodiment of the present invention mobile platform information.
Fig. 2 is the process flow diagram of the first compression algorithm in the step 203 of adaptive image scaling method of embodiment of the present invention mobile platform information.
Fig. 3 is the process flow diagram of the second compression algorithm in the step 204 of adaptive image scaling method of embodiment of the present invention mobile platform information.
Fig. 4 is the process flow diagram of the 3rd compression algorithm in the step 403 of adaptive image scaling method of embodiment of the present invention mobile platform information.
Fig. 5 is the process flow diagram of the 4th compression algorithm in the S200 of adaptive image scaling method of embodiment of the present invention mobile platform information.
Fig. 6 is the structured flowchart of the adaptive image scaling device of embodiment of the present invention mobile platform information.
Embodiment
The invention provides a kind of adaptive image scaling method and device thereof of mobile platform information, for making object of the present invention, technical scheme and effect clearer, clear and definite, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The adaptive image scaling method of the mobile platform information that the embodiment of the present invention provides is applicable to various systems, take Firefox OS system as example, the adaptive image scaling method of this mobile platform information is on the basis of compressing according to the number of image, add again according to capacity and carried out adaptive convergent-divergent process, when to make in annex the less and image of image ratio be not very large, according to higher hierarchy compression (being that compressed images size variation is little or very little), keep as much as possible the original precision of image.More when image ratio in annex, or image ratio is when larger, by lower hierarchy compression compression (being that compressed images size becomes less), deposits as much as possible more image in the situation that keeping certain precision.In the present embodiment, hierarchy compression comprises: zero level compression (not compressing), one-level compression (Vresized≤0.4 × limitation) and two-stage compression (Vresized≤0.2 × limitation), wherein, Vresized represents the size of compressed images, and limitation represents annex max cap.; The grade of zero level compression is the highest, and the grade of two-stage compression is minimum.
That is to say, the adaptive image scaling method that the present embodiment provides is in the time judging that the total volume of current annex (being the big or small sum of All Files in annex) exceedes annex max cap., just sequentially select next hierarchy compression compression, until the total volume of annex is less than annex max cap. or has sequentially chosen lowest compression grade at present.Meanwhile, can change to higher or lower hierarchy compression to compressed image, adjust adaptively compression result, utilize as far as possible the finite space to keep the maximum precision of images, to meet the compression requirements that user is different simultaneously.
Refer to Fig. 1, the adaptive image scaling method of described mobile platform information comprises:
S100, open information editing interface and add when file, judge according to annex max cap. whether current file can be added.
S200, in the time that this file can be added, according to type, number, size and the annex max cap. of file adding, all images in annex are carried out to the convergent-divergent processing of corresponding hierarchy compression.
The size of the residual capacity of S300, detection accessory points out user can continue to add file in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.
Take Firefox OS system as example, open the sms application of Firefox OS, a newly-built note starts to add file in annex.The improvements of the present embodiment are, before compression, need two queues of initialization to deposit the image that needs compression.Described step S100 specifically comprises: the compressed queue of initialization and queue to be amplified while opening information editing interface.While adding file, judge whether the total volume of current annex is less than default annex max cap.: if so, this file can add, execution step B; Otherwise this file can not add, the off-capacity of prompting annex.
Wherein, described compressed queue is: the compressed later queue of file, and for showing the All Files and the interim storage that sends annex of annex, and further compression below.Queue to be amplified is: be the document queue without any processing, and zoomed image after the file of deleting in annex, or call while specifying certain compression of images grade.File in queue to be amplified and compressed queue may comprise one or more in image, Audio and Video.These two kinds of queues are in fact that same file is carried out to the path of depositing after different disposal, and wherein, the file in queue to be amplified can be thought the duplicate of source file (being source document), with source file striking resemblances, for subsequent calls.File in compressed queue is the equal of the file of source file compressed rear (video, audio frequency conventionally can be not compressed).In the present embodiment, compressed queue user is visible, and queue user to be amplified is invisible.
In the time that the file adding can compress, perform step S200, it specifically comprises:
Step 201, file is stored in compressed queue and queue to be amplified.
Step 202, judge add file type whether be image, if perform step 203, otherwise execution step 204.
Because sound, video do not compress only compression of images, therefore, different types of attachment is taked different compress modes.
Step 203, judge that the number of image is greater than 1, or the total volume of annex is while being greater than annex max cap., compresses the image in compressed queue according to the first compression algorithm.
Refer to Fig. 2, described the first compression algorithm is:
S11, scan compressed queue, extract the image of all not specified compression grades and be stored in image queue.In these all images, do not comprise the image of having specified hierarchy compression, compression is processed and is carried out in image queue.So independent extraction (being equivalent to copy) needs the image of compression can avoid affecting alternative document in compressed queue (as sound, video, specified the image of hierarchy compression) to be compressed simultaneously.
Whether S12, the number that judges described image are less than 3 and be greater than 0; If so, carry out S13; Otherwise, carry out S14;
S13, the compression of employing one-level, and the compression limit of each image is 0.4 times of annex max cap.;
S14, employing two-stage compression, and the compression limit of each image is 0.2 times of annex max cap.;
S15, the image in image queue is compressed according to corresponding hierarchy compression, and the image size after compression is controlled in compression limit; Upgrade compressed queue with the compression result in image queue.Be that image in compressed queue is according to the size storage after compressing.
When concrete enforcement, the annex max cap. of giving tacit consent in Firefox OS system is 300K.If the file adding is not image (being that annex is sound, video), also need to perform step 204, judge that the total volume of annex is greater than annex max cap., and file is can also compress time, compresses the image in compressed queue according to the second compression algorithm.Be specially:
Whether the total volume that first judges current annex is greater than annex max cap., if not point out user can continue to add file.Whether the hierarchy compression that if so, judges current annex is afterbody, if point out user's accessory capabilities deficiency, and suggestion deletion file; Otherwise compress the image in compressed queue according to the second compression algorithm.Refer to Fig. 3, described the second compression algorithm is:
S21, scan compressed queue, extract the image of all not specified compression grades and be stored in image queue.
S22, judge whether the number of described image is greater than 0; If carry out S23, if not finish.
The hierarchy compression of image in S23, detected image queue.Detecting current hierarchy compression L is zero level compression, one-level compression or two-stage compression.
S24, to the image in next hierarchy compression compressed image queue, upgrade compressed queue with the compression result in image queue.Even L=L+1, and upgrade the correspondence image in compressed queue by compression result.
Whether S25, the hierarchy compression that judges image in compressed queue are whether the total volume of two-stage compression or current annex is less than annex max cap.; If finish while being less than annex max cap. for the total volume of two-stage compression or current annex; Otherwise return to S24.
In the specific implementation, after described step 203, the image compressing in compressed queue according to the first compression algorithm also comprises afterwards: whether the total volume that judges current annex is greater than annex max cap., if so, need again compress the image in compressed queue according to the second compression algorithm.Otherwise point out user can continue to add file.
After having compressed, in above-mentioned steps 204 by after the second compression algorithm compression, the size of residual capacity that can detection accessory points out user to continue to add file in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.
In the time that user deletes one or more file, can adjust hierarchy compression according to the total volume of current annex and annex max cap., make image keep the maximum precision of images (being that the size maximum of image and the big or small sum of image do not exceed annex max cap.) that can deposit; It specifically comprises:
Step 401, in the time of deletion file, from compressed queue and queue to be amplified, delete corresponding file;
Step 402, judge in remaining file whether have image, perform step 403 if having; Otherwise prompting user can add file.
Step 403, judge that whether the hierarchy compression of present image is (being zero level compression) at the highest level; If image is not amplified, otherwise according to the 3rd compression algorithm zoomed image.Adjust the hierarchy compression of image, make image keep the maximum precision of images that can deposit.
Refer to Fig. 4, described the 3rd compression algorithm is:
S31, scan queue to be compressed, extract the image of all not specified compression grades and be stored in image queue.
S32, judge whether the number of image is greater than 0; If carry out S33, otherwise finish.
The hierarchy compression of image in S33, detected image queue.Detecting current hierarchy compression L is zero level compression, one-level compression or two-stage compression.
S34, by a upwards hierarchy compression compression of the image in image column, upgrade compressed queue with the compression result in image queue.Even L=L-1, selects a hierarchy compression, and upgrade the correspondence image in compressed queue by compression result.
S35, judge whether the total volume of annex is greater than annex max cap.; If carry out S37, otherwise carry out S36.
S36, judge that whether hierarchy compression in image queue is zero level compression, if finish, otherwise returns to S34.
S37, by the image in image queue to the compression of next hierarchy compression, upgrade the correspondence image in compressed queue with compression result.Even L=L+1.Convergent-divergent finishes.
Should be understood that, in the time that user deletes one or more file, the total volume of annex must reduce.Now capable of dynamic is adjusted the hierarchy compression of image, makes the size of image become large or diminish, and acquired compression result is above changed, and can utilize more fully the residual capacity of annex, makes the precision of images keep carrying out optimal compression in best situation; Avoid image supercompression to cause the situation of residual capacity waste, solved and in prior art, cannot rationally adjust compressibility coefficient, can not make full use of the problem of remaining space.
In the specific implementation, if user need guarantee the sharpness of certain image, do not need certain image to compress, or need to significantly compress certain image.Can carry out orientation compression to this image,, in step S200, further comprise, the hierarchy compression that the image that user is selected is selected according to user, by the 4th compression algorithm compression.Be specially: the total volume that judges annex is less than annex max cap. and image number is greater than at 0 o'clock, ejects compressed queue, show All Files.In the time that user selects a file (the present embodiment middle finger image), eject hierarchy compression list.In described hierarchy compression list, show: zero level compression (not compressing), one-level compression (size after compression of images is less than or equal to 0.4 times of annex max cap.) and two-stage compression (size after compression of images is less than or equal to 0.2 times of annex max cap.).When user selects after a certain hierarchy compression, carry out the 4th compression algorithm, judge whether selecteed image meets the contractive condition of this hierarchy compression, can carry out convergent-divergent by selected hierarchy compression to this image if meet.
The Fig. 5 that refers to, states the 4th compression algorithm and is specially:
S41, scan queue to be amplified, extract the image of specified compression grade and be stored in image queue, described hierarchy compression of having specified is L1; And in compressed queue, obtaining the hierarchy compression of this image, the hierarchy compression obtaining in described compressed queue is L2.
Should be understood that, because queue to be amplified is the document queue without any processing, wherein the hierarchy compression of all images of storage is zero level compression.Hierarchy compression in compressed queue can be changed.When user specifies the hierarchy compression of certain image, only this hierarchy compression L1 is marked in corresponding image, now can change the hierarchy compression in queue to be amplified and compressed queue.
S42, judge that whether L1 is identical with L2, carry out S44 if identical, otherwise carry out S43.
Can be clear and definite by said method, when compression, in image queue, carry out, the hierarchy compression in compressed queue can be changed, and the hierarchy compression of the image in queue to be amplified remains zero level compression.Judge that whether the hierarchy compression L2 in compressed queue is identical with the hierarchy compression L1 of user's appointment, if the same do not need compression, the not identical hierarchy compression L1 that needs to change to user's appointment.
S43, the image of the grade of specified compression of taking out in queue to be amplified is compressed to the hierarchy compression L1 that direct boil down to has been specified from zero level, upgrade the correspondence image in compressed queue with compression result.
Due to the compressed mistake of the image in compressed queue, again compress and may affect the precision of images as benchmark.The present embodiment, take the hierarchy compression of the image that extracts in queue to be amplified as benchmark, is compressed into the hierarchy compression that user specifies, and is equivalent to image to carry out initial compression, and the compression effectiveness of its acquisition is better, and can not affect the precision of image.
S44, judge whether the total volume of current annex is greater than default annex max cap.: if so, point out the compression failure of specify image, by the hierarchy compression L2 obtaining in compressed original image boil down to queue; Otherwise prompting specify image compresses successfully.
The hierarchy compression of specifying according to user compresses, and has more reasonably considered user's different demands, can retain according to user's demand the size of specify image, avoid the loss of significance of specify image.
The adaptive image scaling method of the mobile platform information based on above-mentioned, the embodiment of the present invention is also corresponding provides a kind of image compressing device, and as shown in Figure 6, it comprises: the judge module 10, compression module 20 and the reminding module 30 that connect successively.When described judge module 10 adds file for opening information editing interface, judge according to annex max cap. whether current file can be added; Compression module 20, in the time that this file can be added, according to type, number, size and the annex max cap. of the file adding, carries out the convergent-divergent processing of corresponding hierarchy compression to all images in annex; Reminding module 30, for detection of the size of the residual capacity of annex, points out user can continue to add annex in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.
In sum, the adaptive image scaling method of mobile platform information provided by the invention and device thereof, the number of combining image and the total volume of annex, in the time that the total volume that judges current annex exceedes annex max cap., just sequentially select next hierarchy compression compression, until the total volume of annex is less than annex max cap. or has sequentially chosen lowest compression grade at present.Meanwhile, can change to higher or lower hierarchy compression to compressed image, adjust adaptively compression result, utilize as far as possible the finite space to keep the maximum precision of images, to meet the compression requirements that user is different simultaneously.This adaptive image scaling method can effectively improve to a certain extent the precision of image or increase the ability of depositing of image, has also increased customization and reversible compression simultaneously, more hommization met the changeable demand of user.
Be understandable that, for those of ordinary skills, can be equal to replacement or change according to technical scheme of the present invention and inventive concept thereof, and all these changes or replacement all should belong to the protection domain of the appended claim of the present invention.

Claims (13)

1. an adaptive image scaling method for mobile platform information, is characterized in that, comprising:
A, open information editing interface and add when file, judge according to annex max cap. whether current file can be added;
B, in the time that this file can be added, according to type, number, size and the annex max cap. of file adding, all images in annex are carried out to the convergent-divergent processing of corresponding hierarchy compression;
The size of the residual capacity of C, detection accessory points out user can continue to add file in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.
2. the adaptive image scaling method of mobile platform information according to claim 1, is characterized in that, described steps A specifically comprises:
A1, the compressed queue of initialization and queue to be amplified while opening information editing interface; Described compressed queue is the queue of file after compressed, for showing annex All Files and sending the interim storage of annex; Queue described to be amplified is the document queue without any processing, for deleting zoomed image after the file of annex, or calls when specify image hierarchy compression;
When A2, interpolation file, judge whether the total volume of annex is less than default annex max cap.: if so, this file can add, execution step B; Otherwise this file can not add, the off-capacity of prompting annex; The total volume of described annex is the big or small sum of All Files in annex.
3. the adaptive image scaling method of mobile platform information according to claim 2, is characterized in that, described step B specifically comprises:
B1, file is stored in compressed queue and queue to be amplified;
B2, judge add file type whether be image, if perform step B3, otherwise execution step B4;
B3, judge that the number of image is greater than 1, or the total volume of annex is while being greater than annex max cap., compresses the image in compressed queue according to the first compression algorithm;
B4, judge that the total volume of annex is greater than annex max cap., and file is can also compress time, compresses the image in compressed queue according to the second compression algorithm.
4. the adaptive image scaling method of mobile platform information according to claim 3, is characterized in that, described step B4 specifically comprises:
B41, judge whether the total volume of annex is greater than annex max cap., if perform step B42, otherwise prompting user can continue to add file;
B42, judge whether the hierarchy compression of current annex is afterbody, if point out user's accessory capabilities deficiency, suggestion deletion file; Otherwise compress the image in compressed queue according to the second compression algorithm.
5. the adaptive image scaling method of mobile platform information according to claim 2, is characterized in that, after described step C, also comprises:
D, in the time of deletion file, adjust hierarchy compression according to the total volume of current annex and annex max cap., make image keep the maximum precision of images that can deposit.
6. the adaptive image scaling method of mobile platform information according to claim 5, is characterized in that, described step D specifically comprises:
D1, in the time of deletion file, from compressed queue and queue to be amplified, delete corresponding file;
D2, judge in remaining file whether have image, perform step D3 if having; Otherwise prompting user can add file;
D3, judge that whether the hierarchy compression of present image is at the highest level; If image is not amplified, otherwise according to the 3rd compression algorithm zoomed image.
7. the adaptive image scaling method of mobile platform information according to claim 1, is characterized in that, described step B also comprises: the hierarchy compression that the image that user is selected is selected according to user, and by the 4th compression algorithm compression.
8. the adaptive image scaling method of mobile platform information according to claim 1, it is characterized in that, described hierarchy compression comprises: zero level compression, one-level compression and two-stage compression, described zero level compression or not, and the formula of described one-level compression is: Vresized≤0.4 × limitation; The formula of described two-stage compression is: Vresized≤0.2 × limitation;
Wherein, Vresized represents the size of compressed images, and limitation represents annex max cap..
9. the adaptive image scaling method of mobile platform information according to claim 3, is characterized in that, described the first compression algorithm specifically comprises:
S11, scan compressed queue, extract the image of all not specified compression grades and be stored in image queue;
Whether S12, the number that judges described image are less than 3 and be greater than 0; If so, carry out S13; Otherwise, carry out S14;
S13, the compression of employing one-level, and the compression limit of each image is 0.4 times of annex max cap.;
S14, employing two-stage compression, and the compression limit of each image is 0.2 times of annex max cap.;
S15, the image in image queue is compressed according to corresponding hierarchy compression, and the image size after compression is controlled in compression limit; Upgrade image corresponding in compressed queue with the compression result in image queue.
10. the adaptive image scaling method of mobile platform information according to claim 3, is characterized in that, described the second compression algorithm specifically comprises:
S21, scan compressed queue, extract the image of all not specified compression grades and be stored in image queue;
S22, judge whether the number of described image is greater than 0; If carry out S23, otherwise finish;
The hierarchy compression of image in S23, detected image queue;
S24, to the image in next hierarchy compression compressed image queue, upgrade compressed queue with the compression result in image queue;
Whether S25, the hierarchy compression that judges image in compressed queue are whether the total volume of two-stage compression or current annex is less than annex max cap.; If finish while being less than annex max cap. for the total volume of two-stage compression or current annex; Otherwise return to S24.
The adaptive image scaling method of 11. mobile platform information according to claim 6, is characterized in that, described the 3rd compression algorithm specifically comprises:
S31, scan queue to be compressed, extract the image of all not specified compression grades and be stored in image queue;
S32, judge whether the number of image is greater than 0; If carry out S33, otherwise finish;
The hierarchy compression of image in S33, detected image queue;
S34, by a upwards hierarchy compression compression of the image in image column, upgrade compressed queue with the compression result in image queue;
S35, judge whether the total volume of annex is greater than annex max cap.; If carry out S37, otherwise carry out S36;
S36, judge that whether hierarchy compression in image queue is zero level compression, if finish, otherwise returns to S34;
S37, by the image in image queue to the compression of next hierarchy compression, upgrade the correspondence image in compressed queue with compression result.
The adaptive image scaling method of 12. mobile platform information according to claim 7, is characterized in that, described the 4th compression algorithm specifically comprises:
S41, scan queue to be amplified, extract the image of specified compression grade and be stored in image queue, described hierarchy compression of having specified is L1; And in compressed queue, obtaining the hierarchy compression of this image, the hierarchy compression obtaining in described compressed queue is L2;
S42, judge that whether L1 is identical with L2, carry out S44 if identical, otherwise carry out S43;
S43, the image of the grade of specified compression of taking out in queue to be amplified is compressed to the hierarchy compression L1 that direct boil down to has been specified from zero level, upgrade the correspondence image in compressed queue with compression result;
S44, judge whether the total volume of current annex is greater than default annex max cap.: if so, point out the compression failure of specify image, by the hierarchy compression L2 obtaining in compressed original image boil down to queue; Otherwise prompting specify image compresses successfully.
The adaptive image scaling device of 13. 1 kinds of mobile platform information, is characterized in that, comprising:
Judge module, adds when file for opening information editing interface, judges according to annex max cap. whether current file can be added;
Compression module, in the time that this file can be added, according to type, number, size and the annex max cap. of the file adding, carries out the convergent-divergent processing of corresponding hierarchy compression to all images in annex;
Reminding module for detection of the size of the residual capacity of annex, points out user can continue to add file in the time having residual capacity, points out the user can deleted file when residual capacity is not enough.
CN201410056616.0A 2014-02-20 2014-02-20 A kind of adaptive image scaling method and its device of mobile platform information Active CN103793928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410056616.0A CN103793928B (en) 2014-02-20 2014-02-20 A kind of adaptive image scaling method and its device of mobile platform information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410056616.0A CN103793928B (en) 2014-02-20 2014-02-20 A kind of adaptive image scaling method and its device of mobile platform information

Publications (2)

Publication Number Publication Date
CN103793928A true CN103793928A (en) 2014-05-14
CN103793928B CN103793928B (en) 2018-03-16

Family

ID=50669551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410056616.0A Active CN103793928B (en) 2014-02-20 2014-02-20 A kind of adaptive image scaling method and its device of mobile platform information

Country Status (1)

Country Link
CN (1) CN103793928B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045846A (en) * 2015-06-30 2015-11-11 广东欧珀移动通信有限公司 Image storage method and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004364200A (en) * 2003-06-09 2004-12-24 Matsushita Electric Ind Co Ltd Image pickup data file storage management method in solid-state image pickup device
CN1798238A (en) * 2004-12-09 2006-07-05 Lg电子株式会社 Transmitting image using mobile terminal
CN1832609A (en) * 2005-03-07 2006-09-13 Lg电子株式会社 Method and apparatus for converting photo slides into motion pictures in a mobile terminal
CN101572740A (en) * 2008-04-28 2009-11-04 三星电子株式会社 Method for adjusting picture size in multimedia message
CN103369313A (en) * 2012-03-31 2013-10-23 百度在线网络技术(北京)有限公司 Image compression method, apparatus and device
CN103533518A (en) * 2013-10-22 2014-01-22 东莞市东信网络技术有限公司 Multimedia message compression method and terminal equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004364200A (en) * 2003-06-09 2004-12-24 Matsushita Electric Ind Co Ltd Image pickup data file storage management method in solid-state image pickup device
CN1798238A (en) * 2004-12-09 2006-07-05 Lg电子株式会社 Transmitting image using mobile terminal
CN1832609A (en) * 2005-03-07 2006-09-13 Lg电子株式会社 Method and apparatus for converting photo slides into motion pictures in a mobile terminal
CN101572740A (en) * 2008-04-28 2009-11-04 三星电子株式会社 Method for adjusting picture size in multimedia message
CN103369313A (en) * 2012-03-31 2013-10-23 百度在线网络技术(北京)有限公司 Image compression method, apparatus and device
CN103533518A (en) * 2013-10-22 2014-01-22 东莞市东信网络技术有限公司 Multimedia message compression method and terminal equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045846A (en) * 2015-06-30 2015-11-11 广东欧珀移动通信有限公司 Image storage method and terminal

Also Published As

Publication number Publication date
CN103793928B (en) 2018-03-16

Similar Documents

Publication Publication Date Title
CN103761306B (en) A kind of intelligent terminal file clean-up method and device
US20200393954A1 (en) Apparatus and method for displaying notification in electronic device
US20130222629A1 (en) Methods, apparatuses, and computer program products for facilitating concurrent video recording and still image capture
CN102866913B (en) Task switching on mobile device
US7953393B2 (en) Method and apparatus for message management in portable communication system
CN107885458B (en) Disk fragment sorting method, terminal and computer-readable storage medium
CN104317952B (en) The scan method and device of memory space in mobile terminal
CN110457235A (en) Memory compression methods, device, terminal and storage medium
US20060248154A1 (en) Method of displaying data in wireless terminal and wireless terminal adapted to display data
CN105142004B (en) Multimedia file read method and device
CN105282416B (en) A kind of terminal device and its shooting processing method and system
CN108073346A (en) A kind of record screen method, terminal and computer readable storage medium
US8558849B2 (en) Method and apparatus for processing a user interface in an image processor
CN105893471B (en) Data processing method and electronic equipment
CN103929576A (en) Method For Compressing Image Data Collected By Camera And Electronic Device For Supporting The Method
CN109272917A (en) Screen luminance adjustment method, device, storage medium and electronic equipment
CN106131287A (en) Call recording method, device and communication terminal
CN107231283B (en) Message management method and device and message pre-reading method and device
CN103793928A (en) Self-adaptive image scaling method and device of mobile platform information
CN105760226B (en) A kind of method, device and mobile terminal of quick start mobile terminal camera
CN110166696A (en) Image pickup method, device, terminal device and computer readable storage medium
CN109582187B (en) File sending method and device, computer equipment and storage medium
KR20100083305A (en) Apparatus and method for managing data in portable terminal
US20130093799A1 (en) Apparatus and method for controlling screen brightness in portable terminal
JP2013143776A (en) Method and device for saving image picked up by camera

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant