Image data transmitting and restoring method, device and terminal
A technology of image data and transmission method, applied in image communication, electrical components and other directions, can solve the problems of slow network transmission, small network bandwidth, slow transmission of PNG format pictures, etc., to reduce network traffic and time, and save size.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0070] Example 1, see figure 1 , based on the above-mentioned map image cutting and color sampling, only the chunk block of IDAT is transmitted during transmission, the present invention provides a method for sending image data:
[0071] Step 101: Pre-cut the picture file so that each cut picture has the same IHDR and PLTE;
[0072] The "make each slice have the same IHDR and PLTE" mentioned in this step may be: slice all image data using the preset first palette.
[0073] The method to preset the first palette can be:
[0074] Step 1011: traverse all image data blocks, and obtain the color values (RGB values) of all pixels in the image data blocks;
[0075] Step 1012: loop through all the color values, extract the color values of the same color; store each extracted color value, and generate the first color palette.
[0076] The extraction of similar color values described in this step can be: for example, when the color values of one color are 48, 49, 50, 51, 52; ...
Embodiment 2
[0082] Example 2, see figure 2 , corresponding to the image data sending method provided in Embodiment 1, Embodiment 2 of the present invention provides an image data recovery method;
[0083] Step 201: receiving compressed image data;
[0084] Step 202: read and store the image data block IDAT through the compressed image data;
[0085] The method of reading IDAT in this step is to read data block (chunk) length (4 bytes), data block (chunk) type code (4 bytes), data block data (chunk Data ), CRC, composed of data blocks (chunk) and recorded to Hashtable as a buffer.
[0086] Step 203: Decompress the data block chunk; prepare for later generation of color index values. The implementation of the decompression process is a known general method, which will not be described in detail here.
[0087] Step 204: judge whether the first palette exists, if not, execute step 205; if exist, execute step 206;
[0088] Step 205: Generate a first palette;
[0089] The method for gene...
Embodiment 3
[0116] Embodiment 3, referring to Fig. 4, the embodiment of the present invention also provides a data recovery device, and the data recovery device includes:
[0117] The receiving unit is used to receive compressed image data; decompress the compressed image data to obtain decompressed image data blocks;
[0118] A processing unit, configured to determine whether the first palette exists; if not, generate the first palette through the image data block; if it exists, generate the second palette according to the first palette;
[0119] A recovery unit, configured to generate an index value list of the color of each image data block through the second palette; generate a picture file according to the index value list and the image data block;
[0120] The processing unit includes a first judging unit and a palette unit;
[0121] a first judging unit, configured to judge whether the first palette exists;
[0122] a palette unit, configured to generate a first palette through t...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com