CN105957011A - Picture processing method and device - Google Patents

Picture processing method and device Download PDF

Info

Publication number
CN105957011A
CN105957011A CN201610355530.7A CN201610355530A CN105957011A CN 105957011 A CN105957011 A CN 105957011A CN 201610355530 A CN201610355530 A CN 201610355530A CN 105957011 A CN105957011 A CN 105957011A
Authority
CN
China
Prior art keywords
memory
memory block
target sizes
virtual memory
application program
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
CN201610355530.7A
Other languages
Chinese (zh)
Other versions
CN105957011B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610355530.7A priority Critical patent/CN105957011B/en
Publication of CN105957011A publication Critical patent/CN105957011A/en
Application granted granted Critical
Publication of CN105957011B publication Critical patent/CN105957011B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4092Image resolution transcoding, e.g. by using client-server architectures

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to a picture processing method and a device. The method comprises steps that to-be-displayed original pictures in a pre-determined area on an application program interface are acquired; original sizes of the original pictures and target sizes after reduction are calculated; a first memory block is acquired from a non-virtual memory of an application program according to the original sizes, and the original pictures are decoded to the first memory block; according to the target sizes, the original pictures after decoding are reduced to a second memory block in a virtual memory of the application program satisfying the target sizes, and target pictures satisfying the target sizes are acquired. According to the method, generation of memory fragments during picture decoding in the virtual memory can be avoided, moreover, frequency of applying memory blocks from the virtual memory of the application program can be reduced, so frequency of generation of a garbage recovery mechanism is reduced, the stuck phenomenon of the application program can be avoided, and the application program is made to operate more smoothly.

Description

Image processing method and device
Technical field
It relates to picture Processing Technique field, particularly relate to a kind of image processing method and device.
Background technology
In correlation technique, in application development based on Android platform, picture is committed memory all the time One of the biggest factor.When certain region on Application Program Interface needs to show picture, majority of case Under, the size of this viewing area is inconsistent with picture, and this is accomplished by application program and generates in internal memory Meet the picture of dimensional requirement.When generating the picture meeting dimensional requirement, it is necessary first at application program The a interim memory block of application in internal memory, in order to decode original image, a new internal memory of application the most again Block, zooms to decoded original image, in new memory block, finally give the figure meeting dimensional requirement Sheet, and show on the viewing area of application program.But, when the interim memory block of application is more, just Can cause containing substantial amounts of memory fragmentation in the virtual memory at application program place, and then cause virtual memory Increase comparatively fast utilization rate decline.
Summary of the invention
Disclosure embodiment provides a kind of image processing method and device.Described technical scheme is as follows:
First aspect according to disclosure embodiment, it is provided that a kind of image processing method, including:
Obtain original image to display in the presumptive area on Application Program Interface;
Calculate described original image original size and scaling after target sizes;
In the non-virtual internal memory of described application program, the first memory block is obtained according to described original size, will Described original image is decoded in described first memory block;
According to described target sizes, described decoded original image is zoomed to the void of described application program Plan internal memory meets in the second memory block of described target sizes, it is thus achieved that meet the target of described target sizes Picture.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect:
Technique scheme, by decoding original image, and by former in the non-virtual internal memory of application program Beginning picture zooms in the virtual memory of application program, it is possible to avoid producing during decoding picture in virtual memory The situation of raw memory fragmentation, reduces the number of times applying for memory block in the virtual memory of application program simultaneously, Thus reducing the frequency of garbage reclamation mechanism, it is to avoid utility card pauses, and makes the operation of application program More smooth.
In one embodiment, described method also includes:
Judge whether described virtual memory comprises the second memory block meeting described target sizes;
When comprising the second memory block meeting described target sizes in described virtual memory, execution is by described Decoded original image zooms to meet the of described target sizes in the virtual memory of described application program Step in two memory blocks;
When described virtual memory does not comprise the second memory block meeting described target sizes, in described void Intend application in internal memory and meet the second memory block of described target sizes.
In this embodiment, before scaling original image, need to first determine whether whether virtual memory comprises symbol Close the second memory block of target sizes, and in only not comprising meet target sizes second in virtual memory During counterfoil, just application is used for scaling the memory block of original image so that without applying for every time during scaling pictures Virtual memory, thus reduce the workload of terminal.
In one embodiment, described method also includes:
Judge whether described virtual memory exists remaining space;
When described virtual memory exists remaining space, retain described second memory block.
In this embodiment, by retaining the second memory block so that during application program scaling pictures again, as Really the target sizes of this picture matches with the second memory block, then new without applying in virtual memory again Memory block, thus reduce the workload of terminal, avoid virtual memory repeating apply for formed objects simultaneously Memory block.
In one embodiment, described method also includes:
When described virtual memory does not exists remaining space, obtain described virtual memory meets and preset bar 3rd memory block of part;
Discharge described 3rd memory block, and retain described second memory block;
Described pre-conditioned include following at least one:
Access times are less than predetermined threshold value;
Use frequency less than predeterminated frequency;
Duration between the last time and the current time used is more than preset duration.
In this embodiment, in the case of there is no remaining space in virtual memory, by release the 3rd internal memory Block retains the second memory block so that the memory block that in virtual memory, utilization rate is relatively low can be released in time, Thus avoid useless memory block to take the situation of virtual memory, improve the utilization rate of virtual memory.
In one embodiment, described judge whether described virtual memory comprises to meet described target sizes The second memory block, including:
All memory blocks in described virtual memory are mated with described target sizes;
According to described matching result, it is judged that whether described virtual memory comprises and meets described target sizes Second memory block.
This embodiment enables the terminal to judge whether to comprise in virtual memory the second memory block exactly, from And avoid the memory block repeating to apply for formed objects in virtual memory.
In one embodiment, described method also includes:
In described Target Photo is shown the presumptive area on described Application Program Interface.
Second aspect according to disclosure embodiment, it is provided that a kind of picture processing device, including:
First acquisition module, to display original in obtaining the presumptive area on Application Program Interface Picture;
Computing module, for calculating original size and the contracting of the original image that described first acquisition module obtains Target sizes after putting;
Decoder module, for non-at described application program of the original size that calculates according to described computing module Virtual memory obtains the first memory block, described original image is decoded in described first memory block;
Zoom module, for according to described target sizes, by decoded for described decoder module original image Zoom to the virtual memory of described application program meets in the second memory block of described target sizes, it is thus achieved that Meet the Target Photo of described target sizes.
In one embodiment, described device also includes:
Whether the first judge module, for judging to comprise in described virtual memory to meet described target sizes Second memory block;
Perform module, described in judging described virtual memory comprises meet when described first judge module During the second memory block of target sizes, perform described decoded original image is zoomed to described application journey The virtual memory of sequence meets the step in the second memory block of described target sizes;
Application module, does not comprise in judging described virtual memory when described judge module and meets described mesh When marking the second memory block of size, in described virtual memory, application meets the second of described target sizes Counterfoil.
In one embodiment, described device also includes:
Second judge module, is used for judging whether there is remaining space in described virtual memory;
Reservation module, for judging to there is remaining space in described virtual memory when described second judge module Time, retain described second memory block.
In one embodiment, described device also includes:
Second acquisition module, for surplus when not existing in the described second judge module described virtual memory of judgement During complementary space, obtain and described virtual memory meets the 3rd pre-conditioned memory block;
Release/reservation module, for discharging the 3rd memory block that described second acquisition module obtains, and retains Described second memory block;
Described pre-conditioned include following at least one:
Access times are less than predetermined threshold value;
Use frequency less than predeterminated frequency;
Duration between the last time and the current time used is more than preset duration.
In one embodiment, described first judge module includes:
Matched sub-block, for carrying out all memory blocks in described virtual memory with described target sizes Coupling;
Judge submodule, for the matching result according to described matched sub-block, it is judged that described virtual memory In whether comprise the second memory block meeting described target sizes.
In one embodiment, described device also includes:
Display module, for showing the presumptive area on described Application Program Interface by described Target Photo In.
The third aspect according to disclosure embodiment, it is provided that a kind of picture processing device, including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Obtain original image to display in the presumptive area on Application Program Interface;
Calculate described original image original size and scaling after target sizes;
In the non-virtual internal memory of described application program, the first memory block is obtained according to described original size, will Described original image is decoded in described first memory block;
According to described target sizes, described decoded original image is zoomed to the void of described application program Plan internal memory meets in the second memory block of described target sizes, it is thus achieved that meet the target of described target sizes Picture.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe , the disclosure can not be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet these public affairs The embodiment opened, and for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart according to a kind of image processing method shown in an exemplary embodiment.
Fig. 2 is the flow chart according to a kind of image processing method shown in an exemplary embodiment.
Fig. 3 is the flow chart according to a kind of image processing method shown in an exemplary embodiment.
Fig. 4 is the block diagram according to a kind of picture processing device shown in an exemplary embodiment.
Fig. 5 is the block diagram according to a kind of picture processing device shown in an exemplary embodiment.
Fig. 6 is the block diagram according to a kind of picture processing device shown in an exemplary embodiment.
Fig. 7 is the block diagram according to a kind of picture processing device shown in an exemplary embodiment.
Fig. 8 is according to the first judge module in a kind of picture processing device shown in an exemplary embodiment Block diagram.
Fig. 9 is the block diagram according to a kind of device being applicable to picture processing shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Following When description relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous Key element.Embodiment described in following exemplary embodiment does not represent the institute consistent with the disclosure There is embodiment.On the contrary, they only with as appended claims describes in detail, the one of the disclosure The example of the apparatus and method that a little aspects are consistent.
Fig. 1 is the flow chart according to a kind of image processing method shown in an exemplary embodiment, this picture Processing method is in the terminal, wherein, terminal can be mobile phone, computer, digital broadcast terminal, Messaging devices, game console, tablet device, armarium, body-building equipment, individual digital help Reason etc..As it is shown in figure 1, the method comprises the following steps S11-S14.
In step s 11, original image to display in the presumptive area on Application Program Interface is obtained.
In step s 12, calculate original image original size and scaling after target sizes.
Wherein, the Target Photo after scaling can calculate according to the size of presumptive area.An embodiment In, the size of presumptive area is the target sizes after original image scaling.
In step s 13, in the non-virtual internal memory of application program, the first internal memory is obtained according to original size Block, is decoded to original image in the first memory block.
In one embodiment, the memory size of the first memory block should meet the original size of original image, That is, the memory size of the first memory block should be at least equal to the original size of original image.By original image solution Code can use existing picture decoding process to the decoding process in the first memory block, does not repeats them here.
In step S14, according to target sizes, decoded original image is zoomed to application program Virtual memory meets in the second memory block of target sizes, it is thus achieved that meet the Target Photo of target sizes.
In one embodiment, after performing step S14, said method is further comprising the steps of: by mesh In sheet of marking on a map shows the presumptive area on Application Program Interface.
Use the technical scheme that disclosure embodiment provides, by solving in the non-virtual internal memory of application program Code original image, and original image is zoomed in the virtual memory of application program, it is possible to avoid virtual Internal memory produces during decoding picture the situation of memory fragmentation, reduces simultaneously in the virtual memory of application program The number of times of application memory block, thus reduce the frequency of garbage reclamation mechanism, it is to avoid utility card pauses, The operation making application program is more smooth.
In one embodiment, as in figure 2 it is shown, said method also can be embodied as following steps S21-S27:
In the step s 21, original image to display in the presumptive area on Application Program Interface is obtained.
Target sizes in step S22, after the original size of calculating original image and scaling.
In step S23, in the non-virtual internal memory of application program, obtain the first internal memory according to original size Block, is decoded to original image in the first memory block.
In step s 24, it is judged that whether virtual memory comprises the second memory block meeting target sizes. If virtual memory comprises the second memory block meeting target sizes, then perform step S25;If it is empty Intend internal memory does not comprise the second memory block meeting target sizes, then perform step S27.
When performing this step, can judge as follows whether virtual memory comprises to meet target sizes The second memory block: all memory blocks in virtual memory are mated with target sizes;According to coupling Result, it is judged that whether comprise the second memory block meeting target sizes in virtual memory.If in virtual The memory block meeting target sizes can be matched in depositing, then can determine that in virtual memory and comprise the second internal memory Block, otherwise, it determines do not comprise the second memory block in virtual memory.
In step s 25, according to target sizes, decoded original image is zoomed to application program Virtual memory meets in the second memory block of target sizes, it is thus achieved that meet the Target Photo of target sizes.
In step S26, in Target Photo is shown the presumptive area on Application Program Interface.
In step s 27, in virtual memory, application meets the second memory block of target sizes.Return step Rapid S25.
In this embodiment, before scaling original image, need to first determine whether whether virtual memory comprises symbol Close the second memory block of target sizes, and in only not comprising meet target sizes second in virtual memory During counterfoil, just application is used for scaling the memory block of original image so that without applying for every time during scaling pictures Virtual memory, thus reduce the workload of terminal.
In one embodiment, after performing step S25, as it is shown on figure 3, said method also includes Following steps S31-S34.
In step S31, it is judged that whether virtual memory exists remaining space.If virtual memory is deposited At remaining space, then perform step S32;If virtual memory does not exist remaining space, then perform step Rapid S33.
In step s 32, the second memory block is retained.
In step S33, obtain in virtual memory and meet the 3rd pre-conditioned memory block.
Wherein, pre-conditioned include following at least one: access times less than predetermined threshold value, use frequency Less than the duration between predeterminated frequency, the last time and the current time used more than preset duration.
In step S34, discharge the 3rd memory block, and retain the second memory block.
In this embodiment, by retaining the second memory block so that during application program scaling pictures again, as Really the target sizes of this picture matches with the second memory block, then new without applying in virtual memory again Memory block, thus reduce the workload of terminal, avoid virtual memory repeating apply for formed objects simultaneously Memory block.Additionally, in the case of there is no remaining space in virtual memory, by release the 3rd memory block Retain the second memory block so that the memory block that in virtual memory, utilization rate is relatively low can be released in time, Thus avoid useless memory block to take the situation of virtual memory, improve the utilization rate of virtual memory.
In any of the above-described embodiment, after original image is zoomed in virtual memory, releasable non-void Intend for decoding the first memory block of original image in internal memory, so that the first internal memory in non-virtual internal memory Block can be cleared up in time, it is to avoid useless memory block takies the situation of non-virtual internal memory.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.
Fig. 4 is the block diagram according to a kind of picture processing device shown in an exemplary embodiment, and this device can With by software, hardware or both be implemented in combination with become the some or all of of electronic equipment.Reference Fig. 4, this picture processing device includes the first acquisition module 401, computing module 402, decoder module 403 With Zoom module 404;Wherein:
First acquisition module 401 to show in being configured to obtain the presumptive area on Application Program Interface Original image.
Computing module 402 be configured to calculate the original image that the first acquisition module 401 obtains original greatly Little and scaling after target sizes.
Wherein, the Target Photo after scaling can calculate according to the size of presumptive area.An embodiment In, the size of presumptive area is the target sizes after original image scaling.
Decoder module 403 is configured to the original size according to computing module 402 calculating at application program Non-virtual internal memory obtains the first memory block, original image is decoded in the first memory block.
In one embodiment, the memory size of the first memory block should meet the original size of original image, That is, the memory size of the first memory block should be at least equal to the original size of original image.Decoder module 403 Original image is decoded to the decoding process in the first memory block and can use existing picture decoding process, This repeats no more.
Zoom module 404 is configured to according to target sizes, by decoded for decoder module 403 original graph Sheet zooms to meet in the virtual memory of application program in the second memory block of target sizes, it is thus achieved that meet mesh The Target Photo of mark size.
Use the device that disclosure embodiment provides, by decoder module 403 in the non-virtual of application program Internal memory decodes original image, and by Zoom module 404, original image is zoomed to the void of application program Intend in internal memory, it is possible to avoid producing during decoding picture in virtual memory the situation of memory fragmentation, subtract simultaneously Few number of times applying for memory block in the virtual memory of application program, thus reduce sending out of garbage reclamation mechanism Raw number of times, it is to avoid utility card pauses, and the operation making application program is more smooth.
In one embodiment, as it is shown in figure 5, said apparatus also includes the first judge module 405, holds Row module 406 and application module 407;Wherein:
Whether the first judge module 405 is configured to judge to comprise in virtual memory meet the of target sizes Two memory blocks.
Execution module 406 is configured as the first judge module 405 and judges to comprise in virtual memory to meet mesh When marking the second memory block of size, perform decoded original image zooms to the virtual interior of application program Deposit the step in the second memory block meeting target sizes.
Application module 407 is configured as the first judge module 405 and judges not comprise in virtual memory to meet During the second memory block of target sizes, in virtual memory, application meets the second memory block of target sizes.
In this embodiment, before scaling original image, the first judge module 405 need to first determine whether virtual Whether internal memory comprise the second memory block meeting target sizes, and does not only comprise in virtual memory and meet Just the internal memory for scaling original image is applied for by application module 407 during the second memory block of target sizes Block so that without applying for virtual memory every time during scaling pictures, thus reduce the workload of terminal.
In one embodiment, as shown in Figure 6, said apparatus also includes the second judge module 408 and protects Stay module 409;Wherein:
Second judge module 408 is configured to judge whether there is remaining space in virtual memory.
Reservation module 409 is configured as the second judge module 408 and judges to there is residue sky in virtual memory Between time, retain the second memory block.
In this embodiment, retain the second memory block by reservation module 409 so that application program contracts again When putting picture, if the target sizes of this picture matches with the second memory block, then without again in virtual Deposit the memory block that middle application is new, thus reduce the workload of terminal, avoid virtual memory repeats Shen simultaneously Please the memory block of formed objects.
In one embodiment, as it is shown in fig. 7, said apparatus also includes the second acquisition module 410 and releases Put/reservation module 411;Wherein:
Second acquisition module 410 is configured as the second judge module 408 and judges not exist in virtual memory During remaining space, obtain in virtual memory and meet the 3rd pre-conditioned memory block.
Release/reservation module 411 is configured to discharge the 3rd memory block that the second acquisition module 410 obtains, And retain the second memory block;
Wherein, pre-conditioned include following at least one:
Access times are less than predetermined threshold value;
Use frequency less than predeterminated frequency;
Duration between the last time and the current time used is more than preset duration.
In this embodiment, in the case of there is no remaining space in virtual memory, by release/reservation module 411 release the 3rd memory blocks retain the second memory block so that the internal memory that in virtual memory, utilization rate is relatively low Block can be released in time, thus avoids useless memory block to take the situation of virtual memory, improves virtual The utilization rate of internal memory.
In one embodiment, as shown in Figure 8, the first judge module 405 includes matched sub-block 4051 With judge submodule 4052;Wherein:
Matched sub-block 4051 is configured to carry out all memory blocks in virtual memory with target sizes Coupling.
Judge that submodule 4052 is configured to the matching result according to matched sub-block 4051, it is judged that virtual Whether internal memory comprises the second memory block meeting target sizes.
If matched sub-block 4051 can match the memory block meeting target sizes in virtual memory, Then can determine that in virtual memory and comprise the second memory block, otherwise, it determines in virtual memory does not comprises second Counterfoil.
In one embodiment, said apparatus also includes display module, and this display module is configured to mesh In sheet of marking on a map shows the presumptive area on Application Program Interface.
In the exemplary embodiment, it is provided that a kind of picture processing device, including:
Processor;
For storing the memorizer of processor executable;
Wherein, processor is configured to:
Obtain original image to display in the presumptive area on Application Program Interface;
Calculate described original image original size and scaling after target sizes;
In the non-virtual internal memory of described application program, the first memory block is obtained according to described original size, will Described original image is decoded in described first memory block;
According to described target sizes, described decoded original image is zoomed to the void of described application program Plan internal memory meets in the second memory block of described target sizes, it is thus achieved that meet the target of described target sizes Picture.
Above-mentioned processor is also configured to:
Judge whether described virtual memory comprises the second memory block meeting described target sizes;
When comprising the second memory block meeting described target sizes in described virtual memory, execution is by described Decoded original image zooms to meet the of described target sizes in the virtual memory of described application program Step in two memory blocks;
When described virtual memory does not comprise the second memory block meeting described target sizes, in described void Intend application in internal memory and meet the second memory block of described target sizes.
Above-mentioned processor is also configured to:
Judge whether described virtual memory exists remaining space;
When described virtual memory exists remaining space, retain described second memory block.
Above-mentioned processor is also configured to:
When described virtual memory does not exists remaining space, obtain described virtual memory meets and preset bar 3rd memory block of part;
Discharge described 3rd memory block, and retain described second memory block;
Described pre-conditioned include following at least one:
Access times are less than predetermined threshold value;
Use frequency less than predeterminated frequency;
Duration between the last time and the current time used is more than preset duration.
Above-mentioned processor is also configured to:
All memory blocks in described virtual memory are mated with described target sizes;
According to described matching result, it is judged that whether described virtual memory comprises and meets described target sizes Second memory block.
Above-mentioned processor is also configured to:
In described Target Photo is shown the presumptive area on described Application Program Interface.
About the device in above-described embodiment, the concrete mode that wherein modules performs to operate is having Close in the embodiment of the method and be described in detail, explanation will be not set forth in detail herein.
Fig. 9 is the block diagram according to a kind of device for picture processing shown in an exemplary embodiment.Example As, device 1200 can be mobile phone, computer, digital broadcast terminal, messaging devices, trip Play control station, tablet device, armarium, body-building equipment, personal digital assistant etc..
Device 1200 can include following one or more assembly: processes assembly 1202, memorizer 1204, Power supply module 1206, multimedia groupware 1208, audio-frequency assembly 1210, input/output (I/O) connects Mouth 1212, sensor cluster 1214, and communications component 1216.
Process assembly 1202 and generally control the integrated operation of device 1200, such as with display, call, The operation that data communication, camera operation and record operation are associated.Process assembly 1202 and can include one Or multiple processor 1220 performs instruction, to complete all or part of step of above-mentioned method.Additionally, Process assembly 1202 and can include one or more module, it is simple to process assembly 1202 and other assemblies it Between mutual.Such as, process assembly 1202 and can include multi-media module, to facilitate multimedia groupware 1208 and process between assembly 1202 mutual.
Memorizer 1204 is configured to store various types of data to support the operation at device 1200. The example of these data includes any application program for operation on device 1200 or the instruction of method, Contact data, telephone book data, message, picture, video etc..Memorizer 1204 can be by any class The volatibility of type or non-volatile memory device or combinations thereof realize, such as static random access memory Device (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable programmable is read-only to be deposited Reservoir (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic storage Device, flash memory, disk or CD.
The various assemblies that power supply module 1206 is device 1200 provide electric power.Power supply module 1206 can wrap Include power-supply management system, one or more power supplys, and other generate with for device 1200, manage and distribute The assembly that electric power is associated.
One output interface of offer that multimedia groupware 1208 is included between described device 1200 and user Screen.In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP). If screen includes that touch panel, screen may be implemented as touch screen, to receive the input from user Signal.Touch panel includes that one or more touch sensor touches with sensing, slides and on touch panel Gesture.Described touch sensor can not only sense touch or the border of sliding action, but also detects The persistent period relevant to described touch or slide and pressure.In certain embodiments, multimedia group Part 1208 includes a front-facing camera and/or post-positioned pick-up head.When device 1200 is in operator scheme, During such as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive many matchmakers of outside Volume data.Each front-facing camera and post-positioned pick-up head can be a fixing optical lens system or tool There are focal length and optical zoom ability.
Audio-frequency assembly 1210 is configured to output and/or input audio signal.Such as, audio-frequency assembly 1210 Including a mike (MIC), when device 1200 is in operator scheme, such as call model, record mould When formula and speech recognition mode, mike is configured to receive external audio signal.The audio frequency letter received Number can be further stored at memorizer 1204 or send via communications component 1216.Implement at some In example, audio-frequency assembly 1210 also includes a speaker, is used for exporting audio signal.
I/O interface 1212 is to process to provide interface between assembly 1202 and peripheral interface module, above-mentioned outside Enclosing interface module can be keyboard, puts striking wheel, button etc..These buttons may include but be not limited to: homepage Button, volume button, start button and locking press button.
Sensor cluster 1214 includes one or more sensor, for providing each side for device 1200 The state estimation in face.Such as, what sensor cluster 1214 can detect device 1200 beats opening/closing shape State, the relative localization of assembly, the most described assembly is display and the keypad of device 1200, sensor Assembly 1214 can also detect device 1200 or the position change of 1,200 1 assemblies of device, user and dress Put the presence or absence of 1200 contacts, device 1200 orientation or acceleration/deceleration and the temperature of device 1200 Degree change.Sensor cluster 1214 can include proximity transducer, is configured to do not having any thing The existence of object near detection during reason contact.Sensor cluster 1214 can also include optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensing Device assembly 1214 can also include acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensing Device or temperature sensor.
Communications component 1216 is configured to facilitate wired or wireless mode between device 1200 and other equipment Communication.Device 1200 can access wireless network based on communication standard, such as WiFi, 2G or 3G, Or combinations thereof.In one exemplary embodiment, communications component 1216 receives via broadcast channel From broadcast singal or the broadcast related information of external broadcasting management system.In one exemplary embodiment, Described communications component 1216 also includes near-field communication (NFC) module, to promote junction service.Such as, Can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology is super Broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 1200 can be by one or more application specific integrated circuits (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), able to programme patrol Collect device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor Or other electronic components realize, it is used for performing said method.
In the exemplary embodiment, a kind of non-transitory computer-readable storage including instruction is additionally provided Medium, such as, include the memorizer 1204 of instruction, and above-mentioned instruction can be by the processor 1220 of device 1200 Perform to complete said method.Such as, described non-transitory computer-readable recording medium can be ROM, Random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is by device When the processor of 1200 performs so that device 1200 is able to carry out above-mentioned image processing method, described Method includes:
Obtain original image to display in the presumptive area on Application Program Interface;
Calculate described original image original size and scaling after target sizes;
In the non-virtual internal memory of described application program, the first memory block is obtained according to described original size, will Described original image is decoded in described first memory block;
According to described target sizes, described decoded original image is zoomed to the void of described application program Plan internal memory meets in the second memory block of described target sizes, it is thus achieved that meet the target of described target sizes Picture.
Described method also includes:
Judge whether described virtual memory comprises the second memory block meeting described target sizes;
When comprising the second memory block meeting described target sizes in described virtual memory, execution is by described Decoded original image zooms to meet the of described target sizes in the virtual memory of described application program Step in two memory blocks;
When described virtual memory does not comprise the second memory block meeting described target sizes, in described void Intend application in internal memory and meet the second memory block of described target sizes.
Described method also includes:
Judge whether described virtual memory exists remaining space;
When described virtual memory exists remaining space, retain described second memory block.
Described method also includes:
When described virtual memory does not exists remaining space, obtain described virtual memory meets and preset bar 3rd memory block of part;
Discharge described 3rd memory block, and retain described second memory block;
Described pre-conditioned include following at least one:
Access times are less than predetermined threshold value;
Use frequency less than predeterminated frequency;
Duration between the last time and the current time used is more than preset duration.
Described judge whether described virtual memory comprises the second memory block meeting described target sizes, bag Include:
All memory blocks in described virtual memory are mated with described target sizes;
According to described matching result, it is judged that whether described virtual memory comprises and meets described target sizes Second memory block.
Described method also includes:
In described Target Photo is shown the presumptive area on described Application Program Interface.
Those skilled in the art, after considering description and putting into practice disclosure herein, will readily occur to the disclosure Other embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, These modification, purposes or adaptations are followed the general principle of the disclosure and include that the disclosure is the most public The common knowledge in the art opened or conventional techniques means.Description and embodiments is considered only as showing Example, the true scope of the disclosure and spirit are pointed out by claim below.
It should be appreciated that the disclosure be not limited to described above and illustrated in the accompanying drawings accurately Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only by institute Attached claim limits.

Claims (13)

1. an image processing method, it is characterised in that including:
Obtain original image to display in the presumptive area on Application Program Interface;
Calculate described original image original size and scaling after target sizes;
In the non-virtual internal memory of described application program, the first memory block is obtained according to described original size, will Described original image is decoded in described first memory block;
According to described target sizes, described decoded original image is zoomed to the void of described application program Plan internal memory meets in the second memory block of described target sizes, it is thus achieved that meet the target of described target sizes Picture.
Method the most according to claim 1, it is characterised in that described method also includes:
Judge whether described virtual memory comprises the second memory block meeting described target sizes;
When comprising the second memory block meeting described target sizes in described virtual memory, execution is by described Decoded original image zooms to meet the of described target sizes in the virtual memory of described application program Step in two memory blocks;
When described virtual memory does not comprise the second memory block meeting described target sizes, in described void Intend application in internal memory and meet the second memory block of described target sizes.
Method the most according to claim 2, it is characterised in that described method also includes:
Judge whether described virtual memory exists remaining space;
When described virtual memory exists remaining space, retain described second memory block.
Method the most according to claim 3, it is characterised in that described method also includes:
When described virtual memory does not exists remaining space, obtain described virtual memory meets and preset bar 3rd memory block of part;
Discharge described 3rd memory block, and retain described second memory block;
Described pre-conditioned include following at least one:
Access times are less than predetermined threshold value;
Use frequency less than predeterminated frequency;
Duration between the last time and the current time used is more than preset duration.
Method the most according to claim 2, it is characterised in that in the described virtual memory of described judgement Whether comprise the second memory block meeting described target sizes, including:
All memory blocks in described virtual memory are mated with described target sizes;
According to described matching result, it is judged that whether described virtual memory comprises and meets described target sizes Second memory block.
6. according to the method described in any one of claim 1-5, it is characterised in that described method also includes:
In described Target Photo is shown the presumptive area on described Application Program Interface.
7. a picture processing device, it is characterised in that including:
First acquisition module, to display original in obtaining the presumptive area on Application Program Interface Picture;
Computing module, for calculating original size and the contracting of the original image that described first acquisition module obtains Target sizes after putting;
Decoder module, for non-at described application program of the original size that calculates according to described computing module Virtual memory obtains the first memory block, described original image is decoded in described first memory block;
Zoom module, for according to described target sizes, by decoded for described decoder module original image Zoom to the virtual memory of described application program meets in the second memory block of described target sizes, it is thus achieved that Meet the Target Photo of described target sizes.
Device the most according to claim 7, it is characterised in that described device also includes:
Whether the first judge module, for judging to comprise in described virtual memory to meet described target sizes Second memory block;
Perform module, described in judging described virtual memory comprises meet when described first judge module During the second memory block of target sizes, perform described decoded original image is zoomed to described application journey The virtual memory of sequence meets the step in the second memory block of described target sizes;
Application module, does not comprise in judging described virtual memory when described judge module and meets described mesh When marking the second memory block of size, in described virtual memory, application meets the second of described target sizes Counterfoil.
Device the most according to claim 8, it is characterised in that described device also includes:
Second judge module, is used for judging whether there is remaining space in described virtual memory;
Reservation module, for judging to there is remaining space in described virtual memory when described second judge module Time, retain described second memory block.
Device the most according to claim 9, it is characterised in that described device also includes:
Second acquisition module, for surplus when not existing in the described second judge module described virtual memory of judgement During complementary space, obtain and described virtual memory meets the 3rd pre-conditioned memory block;
Release/reservation module, for discharging the 3rd memory block that described second acquisition module obtains, and retains Described second memory block;
Described pre-conditioned include following at least one:
Access times are less than predetermined threshold value;
Use frequency less than predeterminated frequency;
Duration between the last time and the current time used is more than preset duration.
11. devices according to claim 8, it is characterised in that described first judge module includes:
Matched sub-block, for carrying out all memory blocks in described virtual memory with described target sizes Coupling;
Judge submodule, for the matching result according to described matched sub-block, it is judged that described virtual memory In whether comprise the second memory block meeting described target sizes.
12. according to the device described in any one of claim 7-11, it is characterised in that described device also wraps Include:
Display module, for showing the presumptive area on described Application Program Interface by described Target Photo In.
13. 1 kinds of picture processing devices, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Obtain original image to display in the presumptive area on Application Program Interface;
Calculate described original image original size and scaling after target sizes;
In the non-virtual internal memory of described application program, the first memory block is obtained according to described original size, will Described original image is decoded in described first memory block;
According to described target sizes, described decoded original image is zoomed to the void of described application program Plan internal memory meets in the second memory block of described target sizes, it is thus achieved that meet the target of described target sizes Picture.
CN201610355530.7A 2016-05-25 2016-05-25 Image processing method and device Active CN105957011B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610355530.7A CN105957011B (en) 2016-05-25 2016-05-25 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610355530.7A CN105957011B (en) 2016-05-25 2016-05-25 Image processing method and device

Publications (2)

Publication Number Publication Date
CN105957011A true CN105957011A (en) 2016-09-21
CN105957011B CN105957011B (en) 2019-05-21

Family

ID=56909862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610355530.7A Active CN105957011B (en) 2016-05-25 2016-05-25 Image processing method and device

Country Status (1)

Country Link
CN (1) CN105957011B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506119A (en) * 2017-08-10 2017-12-22 广州视源电子科技股份有限公司 Picture display method, device, equipment and storage medium
CN112684966A (en) * 2017-12-13 2021-04-20 创新先进技术有限公司 Picture scaling method and device and electronic equipment
CN112988609A (en) * 2019-12-02 2021-06-18 杭州海康机器人技术有限公司 Data processing method, device, storage medium and client

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1670766A (en) * 2004-03-17 2005-09-21 德鑫科技股份有限公司 Image zooming method
CN101212660A (en) * 2006-12-29 2008-07-02 安凯(广州)软件技术有限公司 Sectionalized image decoding method
CN102012870A (en) * 2010-11-18 2011-04-13 清华大学 Memory allocation method
CN102123259A (en) * 2010-12-28 2011-07-13 四川长虹电器股份有限公司 Method for displaying extra-large-resolution pictures on television
CN104952037A (en) * 2014-03-27 2015-09-30 联科集团(中国)有限公司 Method and system for rescaling image files
CN105335442A (en) * 2014-08-13 2016-02-17 优视科技有限公司 Picture memory processing method and apparatus
KR20160052240A (en) * 2014-11-04 2016-05-12 삼성전자주식회사 Method and apparatus for managing a plurality of memory devices

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1670766A (en) * 2004-03-17 2005-09-21 德鑫科技股份有限公司 Image zooming method
CN101212660A (en) * 2006-12-29 2008-07-02 安凯(广州)软件技术有限公司 Sectionalized image decoding method
CN102012870A (en) * 2010-11-18 2011-04-13 清华大学 Memory allocation method
CN102123259A (en) * 2010-12-28 2011-07-13 四川长虹电器股份有限公司 Method for displaying extra-large-resolution pictures on television
CN104952037A (en) * 2014-03-27 2015-09-30 联科集团(中国)有限公司 Method and system for rescaling image files
CN105335442A (en) * 2014-08-13 2016-02-17 优视科技有限公司 Picture memory processing method and apparatus
KR20160052240A (en) * 2014-11-04 2016-05-12 삼성전자주식회사 Method and apparatus for managing a plurality of memory devices

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506119A (en) * 2017-08-10 2017-12-22 广州视源电子科技股份有限公司 Picture display method, device, equipment and storage medium
CN112684966A (en) * 2017-12-13 2021-04-20 创新先进技术有限公司 Picture scaling method and device and electronic equipment
CN112988609A (en) * 2019-12-02 2021-06-18 杭州海康机器人技术有限公司 Data processing method, device, storage medium and client
CN112988609B (en) * 2019-12-02 2023-05-02 杭州海康机器人股份有限公司 Data processing method, device, storage medium and client

Also Published As

Publication number Publication date
CN105957011B (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN104731688B (en) Point out the method and device of reading progress
CN104578372B (en) The method and device of control terminal equipment charge
CN104156236A (en) Storage space saving method and device
CN106034170B (en) Group's generation method and device
CN105224349A (en) The deletion reminding method of application program and device
CN104918107A (en) Video file identification processing method and device
CN104298547A (en) Terminal setting method and device
CN105120337A (en) Video special effect processing method, video special effect processing device and terminal equipment
CN105204804A (en) Mode switching method, device and system
CN104460185A (en) Automatic focusing method and device
CN105260360A (en) Named entity identification method and device
CN104301610A (en) Image shooting control method and device
CN104537380A (en) Clustering method and device
CN105426878A (en) Method and device for face clustering
CN105224171A (en) icon display method, device and terminal
CN105094626A (en) Method and device for selecting text contents
CN105205153A (en) File storage method and device
CN105957011A (en) Picture processing method and device
CN106021072A (en) Information display method and device
CN104850643A (en) Image comparison method and device
CN105468281A (en) Setup interface display method and device
CN106774802A (en) The reminding method of terminal power, device and terminal
CN105426904A (en) Photo processing method, apparatus and device
CN105513101A (en) Image processing method and device
CN105204712A (en) Method and device for displaying icons of folder

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