Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

IOS-system-based image caching and compression method

A compression method and image technology, applied in special data processing applications, using information identifiers to retrieve web data, instruments, etc., can solve problems such as clearing the cache must be manually cleared, unable to compress image size, etc., to improve operating efficiency and improve functions The number of , performance and speed-boosting effects

Inactive Publication Date: 2016-07-20
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF4 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The present invention overcomes the deficiencies in the prior art that the third-party framework has to manually clear the cache when performing picture caching and compression, and at the same time cannot compress the picture size, and provides an iOS-based system that improves the performance and speed of picture caching image caching and compression method

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • IOS-system-based image caching and compression method
  • IOS-system-based image caching and compression method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] The present invention will be further elaborated below in conjunction with the accompanying drawings.

[0028] Such as figure 1 and figure 2 The shown image caching and compression method based on the iOS system is based on the SDWebImage third-party framework, and it includes the following steps:

[0029] S1, send a network request, request a picture according to the incoming URL and create a new thread;

[0030] S2. Determine whether the picture is stored in the memory cache according to the URL as the Key. If it is stored in the memory cache, directly call the picture to use. If it is not stored in the memory cache, then determine whether the picture is stored in the disk cache. If it is stored in the disk cache If the image is not stored in the disk cache, then enter step S3;

[0031] S3, request to download pictures from the specified address according to the URL, if a network abnormality occurs, an error message will be prompted, if the specified address is ac...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an iOS-system-based image caching and compression method.According to the method, several steps are additionally added on the basis of a third party framework based on SDWebImage so that images can be compressed in the image caching process, and compression modes include image size compression, image user-defined size compression and image equal-proportion compression.By means of the method, the caching images which are not used for a long time can be removed automatically, and synchronous operation with a server can be conducted.

Description

technical field [0001] The invention relates to a picture processing technology in an iOS system, in particular to a picture caching and compression method based on the iOS system. Background technique [0002] At present, some third-party frameworks are mainly used for image caching and compression in the iOS system on the market, and these third-party frameworks mainly include AFNetworking, FastImageCache, and SDWebimage; [0003] The basic workflow of these frameworks is to download pictures; image processing (cropping, borders, etc.); writing to disk; reading data from disk to kernel buffer; copying from kernel buffer to user space (memory level copy); decompressing as Bitmap (higher cpu consumption); if the bitmap data is not byte-aligned, CoreAnimation will copy a copy of the bitmap data and perform byte alignment; CoreAnimation renders the decompressed bitmap. [0004] Among them, the memory cache mechanism provided by AFNetworking does not provide the operation of c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/955G06F16/9574
Inventor 王雨桐周嘉立
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products