CN105118020A - Image fast processing method and apparatus - Google Patents

Image fast processing method and apparatus Download PDF

Info

Publication number
CN105118020A
CN105118020A CN201510568266.0A CN201510568266A CN105118020A CN 105118020 A CN105118020 A CN 105118020A CN 201510568266 A CN201510568266 A CN 201510568266A CN 105118020 A CN105118020 A CN 105118020A
Authority
CN
China
Prior art keywords
picture
pending picture
storage space
quick
soft
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.)
Pending
Application number
CN201510568266.0A
Other languages
Chinese (zh)
Inventor
邢山虎
陈江礼
徐升兴
迟人杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING LOCOJOY TECHNOLOGY Co Ltd
Original Assignee
BEIJING LOCOJOY TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING LOCOJOY TECHNOLOGY Co Ltd filed Critical BEIJING LOCOJOY TECHNOLOGY Co Ltd
Priority to CN201510568266.0A priority Critical patent/CN105118020A/en
Publication of CN105118020A publication Critical patent/CN105118020A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an image fast processing method and apparatus. The method includes the following steps that: three-level loading of pictures to be processed from a soft reference class, a local memory and an external network is performed based on the unique identifiers of the pictures to be processed, next-level loading is enabled when front-level loading fails, and the pictures to be processed loaded at the next level are added to a storage space corresponding to the front level, and finally, the pictures to be processed are loaded to a storage space corresponding to the first level; the pictures to be processed which are successfully load are pre-read, so that the sizes of the pictures to be processed can be obtained, and the sizes are set to proper sizes, the pictures to be processed are read actually based on the proper sizes; and the pictures to be processed are rendered to target pictures with target properties based on the information of the actually-read pictures. With the image fast processing method and apparatus of the invention adopted, a picture processing process can be finished fast, and operating efficiency can be improved.

Description

For method and the device of quick picture processing
Technical field
The application relates to electronic information technical field, specifically, relates to a kind of method for quick picture processing and device.
Background technology
Along with the use of terminal is increasingly extensive, people utilize terminal can run various application, such as microblogging, social software, communication, financing, life, game etc., in these instant messagings application, an obligato critical function is: the process of the picture involved by application and display.Especially along with the raising of people's aesthetic level, the appearance form of picture also will largely affect the experience of user for corresponding application programs.On the other hand, due to the instantaneity of such as communication class application, client device needs to complete corresponding picture processing in real time.More existing application, although such as micro-letter, QQ have carried out process to a certain degree to the picture display that its address list list relates to, but its drafting speed need further raising.
What the application and development of the current mobile client based on Android operation system adopted usually is the project Afinal framework of increasing income on the net, and be characterized in flexibly small and exquisite, code invasion amount is few.But its original function is relatively less, do not provide the quick image processing function that developer expects at present, so still need be optimized to function the application with quick picture processing ability thinking that user provides high-quality to experience.
Summary of the invention
In view of this, technical problems to be solved in this application there is provided a kind of method for quick picture processing and device, and it can solve the slow-footed problem of current mobile client picture processing.
In order to solve the problems of the technologies described above, the application has following technical scheme:
A kind of method for quick picture processing, the method comprises: the unique identification based on pending picture carries out three grades of loadings to described pending picture from soft referenced classes, local storage and external network successively, wherein, the loading of next stage is only started when previous stage loads unsuccessfully, and the described pending picture loaded by this next stage adds in storage space corresponding to prime, the most described pending picture is loaded in storage space corresponding to the first order; The size obtaining described pending picture is read in advance to the successful described pending picture of loading, suitable size is set and carries out the actual reading to this pending picture based on described suitable size; This pending picture is plotted as the Target Photo with target property by the pictorial information read based on reality.
A kind of device for quick picture processing, this device comprises: load-on module, three grades of loadings to described pending picture are carried out from soft referenced classes, local storage and external network successively for the unique identification based on pending picture, wherein, the loading of next stage is only started when previous stage loads unsuccessfully, and the described pending picture loaded by this next stage adds in storage space corresponding to prime, the most described pending picture is loaded in storage space corresponding to the first order; Read module, for reading to the successful described pending picture of loading the size obtaining described pending picture in advance, arranging suitable size and carrying out the actual reading to this pending picture based on described suitable size; Drafting module, is plotted as the Target Photo with target property for the pictorial information read based on reality by this pending picture.
Compared with prior art, the method and system described in the application, reaches following effect:
The first, the present invention can load pending picture according to specific order, only just starts the loading of next stage when previous stage loads unsuccessfully, thus preferentially Loads Image from easy-to-use memory location and avoid unnecessary loading time delay.
Second, the present invention reads in advance pending picture and first obtains dimension of picture, then size desirably carries out actual picture reading, thus avoids the unnecessary system resource of consumption to carry out picture importing, especially, when former dimension of picture is larger, advantage of the present invention is further obvious.
3rd, the present invention is based on the picture read according to suitable size and carry out picture drafting, also need after avoiding drafting to readjust dimension of picture to adapt to apply the problem of needs, accelerate to complete picture processing process, improve operational efficiency.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide further understanding of the present application, and form a application's part, the schematic description and description of the application, for explaining the application, does not form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is described a kind of method flow diagram for quick picture processing of the present invention; And
Fig. 2 is described a kind of apparatus structure schematic diagram for quick picture processing of the present invention.
Embodiment
As employed some vocabulary to censure specific components in the middle of instructions and claim.Those skilled in the art should understand, and hardware manufacturer may call same assembly with different noun.This specification and claims are not used as with the difference of title the mode distinguishing assembly, but are used as the criterion of differentiation with assembly difference functionally." comprising " as mentioned in the middle of instructions and claim is in the whole text an open language, therefore should be construed to " comprise but be not limited to "." roughly " refer to that in receivable error range, those skilled in the art can solve the technical problem within the scope of certain error, reach described technique effect substantially.In addition, " couple " word and comprise directly any and indirectly electric property coupling means at this.Therefore, if describe a first device in literary composition to be coupled to one second device, then represent described first device and directly can be electrically coupled to described second device, or be indirectly electrically coupled to described second device by other devices or the means that couple.Instructions subsequent descriptions is implement the better embodiment of the application, and right described description is for the purpose of the rule that the application is described, and is not used to the scope limiting the application.The protection domain of the application is when being as the criterion depending on the claims person of defining.
Embodiment 1
Specific embodiment for the method for quick picture processing a kind of described in the application shown in Figure 1, described in the present embodiment, method comprises the following steps:
Step 101, carry out three grades of loadings to described pending picture from soft referenced classes, local storage and external network successively based on the unique identification of pending picture;
Step 102, to loading successful described pending picture read the size obtaining described pending picture in advance, suitable size is set and carries out the actual reading to this pending picture based on described suitable size;
Step 103, based on reality read pictorial information this pending picture is plotted as the Target Photo with target property;
In step 101, the loading of next stage is only started when previous stage loads unsuccessfully, and the described pending picture loaded by this next stage adds in storage space corresponding to prime, the most described pending picture is loaded in storage space corresponding to the first order.It should be noted that, the present invention carries out three grades of sequences according to the easy-to-use degree of the loading to content in storage space, wherein the easy-to-use degree of previous stage is higher than the easy-to-use degree of rear stage, such as local storage is easy to the loading of content in soft referenced classes, again external network is easy to the loading of content in local storage.
The soft referenced classes related in above-mentioned steps such as can be implemented as Cache (Cache) tool-class, and soft reference mechanism is adopted for such, particularly, first open up one piece of memory headroom for use to system, if the space used exceeds the memory headroom opening up out, then when new data is put in such, discharge original data, and new data are inserted.On the other hand, local storage such as can be implemented as the storage mediums such as local SD card.
In a more concrete example, first can obtain the Unique ID of pending picture before carrying out picture processing.According to its Unique ID, first inquire about in soft referenced classes, whether this picture exists; If existed, show this picture, whether if not, inquiring about local SD card has this picture.If picture exists in local SD card, then load local picture in soft referenced classes, and picture is shown; If not this picture in local SD card, then first download to local SD card from external network.Picture name also by the ID mark that picture is original, is searched after facilitating.Then load the picture in local SD card, added in soft referenced classes, and from soft referenced classes, picture is shown.
After completing picture and loading, first the size/dimension of picture is read in advance, then suitable dimension of picture is set and carries out actual image data reading.Such as, for specifically needing to use the display control of this picture, only need undersized picture for display, so when the picture loaded is larger, necessity does not carry out full-scale reading.Suitable dimension of picture can be determined based on concrete display demand, and need not be a fixing numerical value.Then by painting canvas, picture is processed, carry out retouching limit when the target property of example picture as desired is circular, do circle, to obtain circular Target Photo.Wherein, target property can be pre-configured by developer, such as about the shape type of image edge as circle, ellipse, polygon etc., can also the parameter such as such as fillet more specifically.In addition, in some preferred examples, target property can also comprise such as frame type, background etc., correspondingly, can add frame and the relevant drafting of background to pending picture according to the frame of specifying.Afterwards, can Target Photo being cached to inside Cache, preserving as key name (Key) using the Id of picture, in order to using, such as, Target Photo can be loaded in display control when transferring display control.
Embodiment 2
By reference to the accompanying drawings shown in 2, a kind of device for quick picture processing of the present invention, wherein, comprising: load-on module 201, read module 202 and drafting module 203; Wherein,
Described load-on module 201 couples mutually with read module 202, three grades of loadings to described pending picture are carried out from soft referenced classes, local storage and external network successively for the unique identification based on pending picture, wherein, the loading of next stage is only started when previous stage loads unsuccessfully, and the described pending picture loaded by this next stage adds in storage space corresponding to prime, the most described pending picture is loaded in storage space corresponding to the first order;
Described read module 202, couple mutually with described load-on module 201 and drafting module 203 respectively, for reading to the successful described pending picture of loading the size obtaining described pending picture in advance, suitable size being set and carrying out the actual reading to this pending picture based on described suitable size;
Described drafting module 203, couples mutually with read module 202, for the pictorial information read based on reality, this pending picture is plotted as the Target Photo with target property.
Wherein, the present invention also comprises memory module (not shown), for being stored in Cache by described Target Photo using the unique identification of described pending picture as key name for the device of quick picture processing.
Wherein, comprise the edge type of picture by the target property of drafting module 203 foundations, such as circular, oval or polygon.
In three grades of loading procedures that load-on module 201 performs, before described pending picture adds storage space corresponding to described soft referenced classes to, first from memory headroom, distribute storage space corresponding to described soft referenced classes to store this pending picture, when the space that this pending picture takies exceeds this storage space, when new data is put in this soft referenced classes, to discharge in this storage space original data to hold described new data.
The a few thing details wherein related to for the device of quick picture processing is described in detail in embodiment 1, does not repeat for purpose of brevity at this.
The above embodiment of the present invention such as may be used for the address list list in communications applications, in the middle of the message picture processing that merely correlation function such as table and individual human head picture relates to.
Known by above each embodiment, the beneficial effect that the application exists is:
The first, the present invention can load pending picture according to specific order, only just starts the loading of next stage when previous stage loads unsuccessfully, thus preferentially Loads Image from easy-to-use memory location and avoid unnecessary loading time delay.
Second, the present invention reads in advance pending picture and first obtains dimension of picture, then size desirably carries out actual picture reading, thus avoids the unnecessary system resource of consumption to carry out picture importing, especially, when former dimension of picture is larger, advantage of the present invention is further obvious.
3rd, the present invention is based on the picture read according to suitable size and carry out picture drafting, also need after avoiding drafting to readjust dimension of picture to adapt to apply the problem of needs, accelerate to complete picture processing process, improve operational efficiency.
Those skilled in the art should understand, the embodiment of the application can be provided as method, device or computer program.Therefore, the application can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the application can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
Above-mentioned explanation illustrate and describes some preferred embodiments of the application, but as previously mentioned, be to be understood that the application is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope described herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the application, then all should in the protection domain of the application's claims.

Claims (10)

1. for a method for quick picture processing, it is characterized in that, comprising:
Unique identification based on pending picture carries out three grades of loadings to described pending picture from soft referenced classes, local storage and external network successively,
Wherein, only start the loading of next stage when previous stage loads unsuccessfully, and the described pending picture loaded by this next stage adds in storage space corresponding to prime to, the most described pending picture is loaded in storage space corresponding to the first order;
The size obtaining described pending picture is read in advance to the successful described pending picture of loading, suitable size is set and carries out the actual reading to this pending picture based on described suitable size;
This pending picture is plotted as the Target Photo with target property by the pictorial information read based on reality.
2. the method for quick picture processing according to claim 1, is characterized in that, also comprise:
Described Target Photo is stored in Cache using the unique identification of described pending picture as key name.
3. the method for quick picture processing according to claim 1, is characterized in that, wherein, described target property comprises the edge type of picture.
4. the method for quick picture processing according to claim 3, is characterized in that, wherein, it is one or more that described edge type comprises in circle, ellipse, polygon.
5. the method for quick picture processing according to claim 1, it is characterized in that, wherein, in three grades of loading procedures, before described pending picture adds storage space corresponding to described soft referenced classes to, first from memory headroom, distribute storage space corresponding to described soft referenced classes to store this pending picture, when the space that this pending picture takies exceeds this storage space, when new data is put in this soft referenced classes, to discharge in this storage space original data to hold described new data.
6. for a device for quick picture processing, it is characterized in that, comprising:
Load-on module, carries out three grades of loadings to described pending picture from soft referenced classes, local storage and external network successively for the unique identification based on pending picture,
Wherein, only start the loading of next stage when previous stage loads unsuccessfully, and the described pending picture loaded by this next stage adds in storage space corresponding to prime to, the most described pending picture is loaded in storage space corresponding to the first order;
Read module, for reading to the successful described pending picture of loading the size obtaining described pending picture in advance, arranging suitable size and carrying out the actual reading to this pending picture based on described suitable size;
Drafting module, is plotted as the Target Photo with target property for the pictorial information read based on reality by this pending picture.
7. the device for quick picture processing according to claim 6, is characterized in that, also comprise:
Memory module, for being stored in described Target Photo in Cache using the unique identification of described pending picture as key name.
8. the device for quick picture processing according to claim 6, is characterized in that, wherein, described target property comprises the edge type of picture.
9. the device for quick picture processing according to claim 8, is characterized in that, wherein, it is one or more that described edge type comprises in circle, ellipse, polygon.
10. the device for quick picture processing according to claim 6, it is characterized in that, wherein, in three grades of loading procedures, before described pending picture adds storage space corresponding to described soft referenced classes to, first from memory headroom, distribute storage space corresponding to described soft referenced classes to store this pending picture, when the space that this pending picture takies exceeds this storage space, when new data is put in this soft referenced classes, to discharge in this storage space original data to hold described new data.
CN201510568266.0A 2015-09-08 2015-09-08 Image fast processing method and apparatus Pending CN105118020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510568266.0A CN105118020A (en) 2015-09-08 2015-09-08 Image fast processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510568266.0A CN105118020A (en) 2015-09-08 2015-09-08 Image fast processing method and apparatus

Publications (1)

Publication Number Publication Date
CN105118020A true CN105118020A (en) 2015-12-02

Family

ID=54665995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510568266.0A Pending CN105118020A (en) 2015-09-08 2015-09-08 Image fast processing method and apparatus

Country Status (1)

Country Link
CN (1) CN105118020A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105931285A (en) * 2016-04-29 2016-09-07 乐视控股(北京)有限公司 Control realization method and apparatus in 3D space
CN107423237A (en) * 2017-05-31 2017-12-01 北京蜜莱坞网络科技有限公司 A kind of polar plot loading method, device, equipment and storage medium for terminal
CN108197160A (en) * 2017-12-12 2018-06-22 腾讯科技(深圳)有限公司 A kind of picture loading method and device
CN115482143A (en) * 2021-06-15 2022-12-16 荣耀终端有限公司 Application image data calling method and system, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102368779A (en) * 2011-01-25 2012-03-07 麦克奥迪实业集团有限公司 Supersized image loading and displaying method used for mobile internet device
US20120089700A1 (en) * 2010-10-10 2012-04-12 Contendo, Inc. Proxy server configured for hierarchical caching and dynamic site acceleration and custom object and associated method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120089700A1 (en) * 2010-10-10 2012-04-12 Contendo, Inc. Proxy server configured for hierarchical caching and dynamic site acceleration and custom object and associated method
CN102368779A (en) * 2011-01-25 2012-03-07 麦克奥迪实业集团有限公司 Supersized image loading and displaying method used for mobile internet device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JUST SO LAZY: "android 使用软引用异步加载图片", 《HTTP://WWW.360DOC.COM/CONTENT/13/0516/15/7857928_285861214.SHTML》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105931285A (en) * 2016-04-29 2016-09-07 乐视控股(北京)有限公司 Control realization method and apparatus in 3D space
CN107423237A (en) * 2017-05-31 2017-12-01 北京蜜莱坞网络科技有限公司 A kind of polar plot loading method, device, equipment and storage medium for terminal
CN108197160A (en) * 2017-12-12 2018-06-22 腾讯科技(深圳)有限公司 A kind of picture loading method and device
CN108197160B (en) * 2017-12-12 2022-11-25 腾讯科技(深圳)有限公司 Picture loading method and device
CN115482143A (en) * 2021-06-15 2022-12-16 荣耀终端有限公司 Application image data calling method and system, electronic equipment and storage medium
WO2022262291A1 (en) * 2021-06-15 2022-12-22 荣耀终端有限公司 Image data calling method and system for application, and electronic device and storage medium
CN115482143B (en) * 2021-06-15 2023-12-19 荣耀终端有限公司 Image data calling method and system for application, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20210191993A1 (en) Processing Method for Structured Data, Storage Medium and Electronic Device
CN105204873B (en) A kind of terminal and application interface display methods
US20160170712A1 (en) Method for integrally implementing development and release of APP
US20170134689A1 (en) Photographing processing method and system based on mobile terminal
CN106598667A (en) Method and device used for restoring kernel vulnerability
KR102229742B1 (en) Method and device for previewing a dynamic image, and method and device for displaying a presentation package
CN105118020A (en) Image fast processing method and apparatus
US9256919B2 (en) Systems and methods for image processing using a resizing template
CN103150192B (en) A kind of copy loading method based on online game and equipment
US11004054B2 (en) Updating account data for multiple account providers
CN108039969A (en) Network method of automatic configuration, device, system, storage medium and object-computer
CN103778211A (en) Method and device for switching language of mobile terminal game software
CN108255513A (en) Electronic device, the data-interface based on springmvc and its illustrate automatic generation method and storage medium
US20170163787A1 (en) Method and electronic device for upgrading or downgrading system
GB2539758A (en) Techniques for evaluating applications through use of an auxiliary application
CN104750805B (en) A kind of information processing method and electronic equipment
CN112181580A (en) Application theme switching method, device and system
CN104598237B (en) A kind of method and apparatus that user interface is generated under upgrade mode
WO2019071406A1 (en) Front-end page internationalization processing method, application server and computer readable storage medium
CN107273541A (en) Network picture display method, device and electric terminal
CN102184375A (en) Management method and terminal of data in subscriber identity module (SIM) card
CN111443945B (en) Component code modification method and device
US9348825B2 (en) Server and method for causing terminal to display screen
CN107613486B (en) STK module naming method, communication terminal and device with storage function
EP3848800B1 (en) Method and apparatus for displaying message box, terminal and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20151202

RJ01 Rejection of invention patent application after publication