CN101557389A - Method for dynamically scaling picture as required in request - Google Patents
Method for dynamically scaling picture as required in request Download PDFInfo
- Publication number
- CN101557389A CN101557389A CNA2008101038570A CN200810103857A CN101557389A CN 101557389 A CN101557389 A CN 101557389A CN A2008101038570 A CNA2008101038570 A CN A2008101038570A CN 200810103857 A CN200810103857 A CN 200810103857A CN 101557389 A CN101557389 A CN 101557389A
- Authority
- CN
- China
- Prior art keywords
- picture
- request
- scaling
- size
- pictures
- 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
Links
Images
Landscapes
- Image Processing (AREA)
- Computer And Data Communications (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
A method for dynamically scaling a picture as required in request comprises the following steps: storing an original picture in a source directory; sending a request for downloading the picture to a server by a client, and appointing a picture source mark and a needed size; finding the needed picture according to the source mark carried in request parameters when receiving the request of the client; scaling the picture according to the size carried in the request parameters; storing the scaled picture in a temporary cache directory, and resorting the scaled picture in a memory for a period of time; sending the picture to the client; when receiving the request of the client again, firstly searching whether a picture with the size exists in the memory and then searching in the temporary cache directory by the server end; and clearing the temporary cache dictionary regularly. When the request of the client is received, the invention dynamically scales the picture and utilizes the cache to improve the efficiency.
Description
Technical field
The present invention relates to a kind of in when request dynamic method of scaling pictures as required, particularly a kind of can be when the client downloads picture, server end comes the method for dynamic scaling pictures according to the needed dimension of picture of client.
Background technology
When server end provided picture resource to client, every kind of client may need different dimension of pictures, if server end is stored eurypalynous picture like this in advance, will have very big storage pressure, and was difficult to reckon with the how many kinds of size.The present invention will provide a kind of way, can be when receiving client-requested, and dynamically scaling pictures, and use caching technology is raised the efficiency.
Summary of the invention
It is a kind of in when request dynamic method of scaling pictures as required that the present invention will provide.
Of the present invention a kind of in when request dynamic method of scaling pictures as required, this method comprises following steps at least:
Step 1: original image is stored in the Resource TOC.
Step 2: user end to server is initiated the request of download pictures, and designated pictures resource identification and required size.
Step 3: when receiving client-requested, according in the required parameter with resource identification, find needed picture.
Step 4: with picture according in the required parameter with size scaling.
Step 5: the picture of convergent-divergent is stored in the interim CACHE DIRECTORY, and within a period of time, is trapped in the internal memory.
Step 6: picture is sent to client.
Step 7: when receiving client-requested once more, server end will be sought earlier the picture whether this size is arranged in internal memory, in interim CACHE DIRECTORY, seeks again, if can not find, and repeating step 3 more then.
Step 8: the interim CACHE DIRECTORY of periodic cleaning.
Of the present invention a kind ofly in when request dynamic method of scaling pictures as required original image is stored in the Resource TOC the steps include:
Step 11: need organize picture by certain rule, can locate picture according to resource identification fast.
Step 12: need to consider that picture too much can cause the problem that reading speed is slack-off in the same catalogue, according to resource ID with picture-storage in suitable subdirectory.
Of the present invention a kind of in when request dynamic method of scaling pictures as required, with picture according in the required parameter with size scaling, the steps include:
Step 41: if the width of appointment only, the then dynamic convergent-divergent of height.
Step 42:, then finally can be scaled width and highly all be not more than the picture of the bi-directional scaling of specified size if specified width and height simultaneously.
The invention enables when receiving client-requested, dynamically scaling pictures, and use caching technology is raised the efficiency.
Description of drawings
Fig. 1 is a flow chart of the present invention.
Embodiment
Referring to Fig. 1, key step of the present invention is as follows:
Step 1: original image is stored in the Resource TOC.
Step 2: user end to server is initiated the request of download pictures, and designated pictures resource identification and required size.
Step 3: when receiving client-requested, according in the required parameter with resource identification, find needed picture.
Step 4: with picture according in the required parameter with size scaling.
Step 5: the picture of convergent-divergent is stored in the interim CACHE DIRECTORY, and within a period of time, is trapped in the internal memory.
Step 6: picture is sent to client.
Step 7: when receiving client-requested once more, server end will be sought earlier the picture whether this size is arranged in internal memory, in interim CACHE DIRECTORY, seeks again, if can not find, and repeating step 3 more then.
Step 8: the interim CACHE DIRECTORY of periodic cleaning.
Above-mentioned steps 1 with the concrete steps that original image is stored in the Resource TOC is:
Step 11: need organize picture by certain rule, can locate picture according to resource identification fast.
Step 12: need to consider that picture too much can cause the problem that reading speed is slack-off in the same catalogue, according to resource ID with picture-storage in suitable subdirectory.
Above-mentioned steps 4 with picture according in the required parameter with the concrete steps of size scaling be:
Step 41: if the width of appointment only, the then dynamic convergent-divergent of height.
Step 42:, then finally can be scaled width and highly all be not more than the picture of the bi-directional scaling of specified size if specified width and height simultaneously.
When the client downloads picture, server end can come dynamic scaling pictures according to the needed dimension of picture of client when technique scheme was implemented.
It should be noted last that above embodiment is only in order to explanation and unrestricted technical scheme described in the invention; Therefore, although this specification has been described in detail the present invention with reference to the above embodiments,, those of ordinary skill in the art should be appreciated that still and can make amendment or replacement to the present invention with being equal to; And all do not break away from the technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in the middle of the claim scope of the present invention.
Claims (5)
1, a kind of in when request dynamic method of scaling pictures as required, it is characterized in that: this method comprises following steps at least:
Step 1: original image is stored in the Resource TOC.
Step 2: user end to server is initiated the request of download pictures, and designated pictures resource identification and required size.
Step 3: when receiving client-requested, according in the required parameter with resource identification, find needed picture.
Step 4: with picture according in the required parameter with size scaling.
Step 5: the picture of convergent-divergent is stored in the interim CACHE DIRECTORY, and within a period of time, is trapped in the internal memory.
Step 6: picture is sent to client.
Step 7: when receiving client-requested once more, server end will be sought earlier the picture whether this size is arranged in internal memory, in interim CACHE DIRECTORY, seeks again, if can not find, and repeating step 3 more then.
Step 8: the interim CACHE DIRECTORY of periodic cleaning.
2, according to claim 1 described a kind of when the request the dynamic method of scaling pictures as required, it is characterized in that original image is stored in the Resource TOC, the steps include:
Step 11: need organize picture by certain rule, can locate picture according to resource identification fast.
Step 12: need to consider that picture too much can cause the problem that reading speed is slack-off in the same catalogue, according to resource ID with picture-storage in suitable subdirectory.
3, according to claim 1 described a kind of when the request the dynamic method of scaling pictures as required, it is characterized in that with picture according in the required parameter with size scaling, the steps include:
Step 41: if the width of appointment only, the then dynamic convergent-divergent of height.
Step 42:, then finally can be scaled width and highly all be not more than the picture of the bi-directional scaling of specified size if specified width and height simultaneously.
4, according to claim 1 described a kind of when the request the dynamic method of scaling pictures as required, it is characterized in that the picture of convergent-divergent is stored in the interim CACHE DIRECTORY, and within a period of time, be trapped in the internal memory.
5, according to claim 1 described a kind of when the request the dynamic method of scaling pictures as required, when it is characterized in that receiving client-requested once more, server end will be sought the picture whether this size is arranged earlier in internal memory, in interim CACHE DIRECTORY, seek again, if can not find, repeating step 3 more then.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101038570A CN101557389A (en) | 2008-04-11 | 2008-04-11 | Method for dynamically scaling picture as required in request |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101038570A CN101557389A (en) | 2008-04-11 | 2008-04-11 | Method for dynamically scaling picture as required in request |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101557389A true CN101557389A (en) | 2009-10-14 |
Family
ID=41175335
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008101038570A Pending CN101557389A (en) | 2008-04-11 | 2008-04-11 | Method for dynamically scaling picture as required in request |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101557389A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102184179A (en) * | 2011-01-30 | 2011-09-14 | 北京开心人信息技术有限公司 | Method and system for cutting photo thumbnail |
CN102685080A (en) * | 2011-03-17 | 2012-09-19 | 腾讯科技(北京)有限公司 | Picture processing method and system |
CN102087650B (en) * | 2009-12-08 | 2012-10-31 | 北大方正集团有限公司 | Method and device for displaying electronic document |
CN101789961B (en) * | 2009-12-31 | 2013-02-06 | 优视科技有限公司 | Picture scaling system used for terminal of mobile communication equipment and application method thereof |
CN103049491A (en) * | 2012-12-07 | 2013-04-17 | 深圳市同洲电子股份有限公司 | Method and device for managing picture file |
CN103457937A (en) * | 2013-08-16 | 2013-12-18 | 深圳Tcl新技术有限公司 | Method and system for browsing pictures of shared file |
CN103514272A (en) * | 2013-09-13 | 2014-01-15 | 北京奇虎科技有限公司 | Method and device for providing thumbnail corresponding to webpage content |
CN103544149A (en) * | 2012-07-09 | 2014-01-29 | 百度在线网络技术(北京)有限公司 | Method and system for accessing image and image server |
CN106227761A (en) * | 2016-07-13 | 2016-12-14 | 十九楼网络股份有限公司 | The process of dynamic realtime output any specification picture and storage method |
CN106326477A (en) * | 2016-08-31 | 2017-01-11 | 北京云图微动科技有限公司 | Image downloading method and system |
CN106484769A (en) * | 2016-09-08 | 2017-03-08 | 深圳市彬讯科技有限公司 | A kind of method of online quick access queries picture |
CN110675939A (en) * | 2019-09-24 | 2020-01-10 | 深圳安泰创新科技股份有限公司 | Image processing method, image processing apparatus, and computer-readable storage medium |
CN112473145A (en) * | 2020-12-10 | 2021-03-12 | 网易(杭州)网络有限公司 | Data processing method and device based on game engine |
CN113393367A (en) * | 2021-07-08 | 2021-09-14 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
-
2008
- 2008-04-11 CN CNA2008101038570A patent/CN101557389A/en active Pending
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102087650B (en) * | 2009-12-08 | 2012-10-31 | 北大方正集团有限公司 | Method and device for displaying electronic document |
CN101789961B (en) * | 2009-12-31 | 2013-02-06 | 优视科技有限公司 | Picture scaling system used for terminal of mobile communication equipment and application method thereof |
CN102184179A (en) * | 2011-01-30 | 2011-09-14 | 北京开心人信息技术有限公司 | Method and system for cutting photo thumbnail |
CN102184179B (en) * | 2011-01-30 | 2012-12-19 | 北京开心人信息技术有限公司 | Method and system for cutting photo thumbnail |
CN102685080A (en) * | 2011-03-17 | 2012-09-19 | 腾讯科技(北京)有限公司 | Picture processing method and system |
CN103544149A (en) * | 2012-07-09 | 2014-01-29 | 百度在线网络技术(北京)有限公司 | Method and system for accessing image and image server |
CN103544149B (en) * | 2012-07-09 | 2018-07-13 | 百度在线网络技术(北京)有限公司 | A kind of method, system and picture servers accessing picture |
CN103049491A (en) * | 2012-12-07 | 2013-04-17 | 深圳市同洲电子股份有限公司 | Method and device for managing picture file |
CN103457937A (en) * | 2013-08-16 | 2013-12-18 | 深圳Tcl新技术有限公司 | Method and system for browsing pictures of shared file |
CN103514272A (en) * | 2013-09-13 | 2014-01-15 | 北京奇虎科技有限公司 | Method and device for providing thumbnail corresponding to webpage content |
CN106227761A (en) * | 2016-07-13 | 2016-12-14 | 十九楼网络股份有限公司 | The process of dynamic realtime output any specification picture and storage method |
CN106326477A (en) * | 2016-08-31 | 2017-01-11 | 北京云图微动科技有限公司 | Image downloading method and system |
CN106484769A (en) * | 2016-09-08 | 2017-03-08 | 深圳市彬讯科技有限公司 | A kind of method of online quick access queries picture |
CN110675939A (en) * | 2019-09-24 | 2020-01-10 | 深圳安泰创新科技股份有限公司 | Image processing method, image processing apparatus, and computer-readable storage medium |
CN112473145A (en) * | 2020-12-10 | 2021-03-12 | 网易(杭州)网络有限公司 | Data processing method and device based on game engine |
CN113393367A (en) * | 2021-07-08 | 2021-09-14 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
CN113393367B (en) * | 2021-07-08 | 2022-06-03 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101557389A (en) | Method for dynamically scaling picture as required in request | |
US8078802B2 (en) | Method and system for file-system based caching | |
US20100229115A1 (en) | Zoomable user interface data generation | |
KR20150013191A (en) | File handling within a cloud-based file system | |
EP1587006A2 (en) | Method and system for renaming consecutive keys in a B-tree | |
CN105760405A (en) | Methods and devices for obtaining network resource for loading web page and method and device for caching network resource | |
CN105474200A (en) | Hydration and dehydration with placeholders | |
CN103713928A (en) | Incremental file generating method, and application program installing file updating method and device | |
CN101916164A (en) | Mobile terminal and file browsing method implemented by same | |
JP2009530702A (en) | Data storage management method and device | |
CN103473732B (en) | Based on the mobile GIS slice map exhibiting method of con current control and dual-cache mechanism | |
CN105302832A (en) | File management method and apparatus | |
CN104683329A (en) | Data caching method and system for mobile equipment client | |
CN111124464A (en) | Method and system for differential upgrade of embedded system and computer readable storage medium | |
US8060697B1 (en) | Dynamically allocated secondary browser cache | |
CN102902724A (en) | Mass raster tile map release method | |
CN105074696B (en) | It uniformly can search for storing for resource constraint and other equipment | |
CN104239435A (en) | Distributed picture caching method based on picture thumbnail processing | |
CN104346345A (en) | Data storage method and device | |
KR101926324B1 (en) | Compression match enumeration | |
CN105373545A (en) | Picture display method and device | |
CN102214174A (en) | Information retrieval system and information retrieval method for mass data | |
CN105978944A (en) | Object storage method and device | |
CN111931095A (en) | Picture loading method of Android system | |
CN102523301A (en) | Method for caching data on client in cloud storage |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20091014 |