CN108776982A - A kind of display methods based on palette compressed picture - Google Patents

A kind of display methods based on palette compressed picture Download PDF

Info

Publication number
CN108776982A
CN108776982A CN201810547767.4A CN201810547767A CN108776982A CN 108776982 A CN108776982 A CN 108776982A CN 201810547767 A CN201810547767 A CN 201810547767A CN 108776982 A CN108776982 A CN 108776982A
Authority
CN
China
Prior art keywords
color
textures
information
saucer
picture
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
CN201810547767.4A
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.)
Suzhou Snail Digital Technology Co Ltd
Original Assignee
Suzhou Snail Digital 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 Suzhou Snail Digital Technology Co Ltd filed Critical Suzhou Snail Digital Technology Co Ltd
Priority to CN201810547767.4A priority Critical patent/CN108776982A/en
Publication of CN108776982A publication Critical patent/CN108776982A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Abstract

A kind of display methods based on palette compressed picture, includes the following steps:From palette compressed picture color saucer information and color index information;Using color saucer information and color index information, color saucer textures and color index textures are generated respectively;Color saucer textures and color index textures are loaded respectively;Color saucer textures and color index textures are sampled to obtain final color and are shown.The present invention saves the memory occupied when show palette compressed picture by the way that color saucer and color index are stored in respectively in two pictures.

Description

A kind of display methods based on palette compressed picture
Technical field
The present invention relates to picture compression field, especially a kind of display methods based on palette compressed picture.
Background technology
It can all be used in online game and arrive many picture resources.If without compression, it is loaded directly into meeting in memory It is very big.Consumption memory can be compared.So present video card generally has hardware-compressed format.For example there is DXT to compress lattice on PC Formula has the compressed formats such as ETC, PVRTC in mobile device.If using these formats in software development, hardware is supported again if, Memory can be saved.But above-mentioned format has disadvantage, is exactly that these formats damage, and picture after decompression and does not compress Picture not exclusively, can lose some picture qualities.For being compressed with translucent picture, display effect is not too It is good.
Existing png8 picture formats are a kind of picture formats of lossless compression, belong to the format of non-hardware support.It makes Picture is compressed with palette techniques, the picture of general 32 color can be compressed to a quarter size, but few hard Part is supported.If generally the picture of the format is shown on video card, need to be decompressed completely, what this process occupied Memory is very big.
Invention content
In order to solve the shortcomings of the prior art, the purpose of the present invention is to provide one kind based on palette compression reconciliation Press the display methods of picture.The present invention is saved by the way that color saucer and color index are stored in respectively in two pictures The memory that picture occupies.
To achieve the above object, the present invention proposes the display methods based on palette compressed picture, includes the following steps:
1)From palette compressed picture color saucer information and color index information;
2)Using color saucer information and color index information, color saucer textures and color index textures are generated respectively;
3)Color saucer textures and color index textures are loaded respectively;
4)Color saucer textures and color index textures are sampled to obtain final color and are shown.
Further, the size of the color index information is a byte.
Further, the step 4)It is that color saucer textures and color index textures are sampled using tinter.
Display methods provided by the invention based on palette compressed picture, has the advantages that:With it is existing right Png pictures carry out decompression completely and compare, and this method is preserved the color saucer of picture and color index using palette techniques respectively In two pictures, then png pictures are generated by tinter and are shown.This process can save picture disappearing in memory Consumption, and picture quality will not be lost, more pictures can be loaded into using an equal amount of memory of this method, compared to existing right Png pictures, which carry out decompression completely, which to be compared, can save 4 times of spaces.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.
Description of the drawings
Attached drawing is used to provide further understanding of the present invention, and a part for constitution instruction, and with the present invention's Embodiment together, for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the display methods flow chart based on palette compressed picture according to the present invention.
Specific implementation mode
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
The purpose of the present invention is to provide a kind of display methods based on palette compressed picture.
Fig. 1 is according to the display methods flow chart based on palette compressed picture of the present invention, as shown in Figure 1, of the invention The display methods based on palette compressed picture, include the following steps:
Step 101, the color saucer information and color index information of palette compressed picture all pixels are extracted.The tune of png8 formats Colour table compressed picture is color saucer and color index composition.Color saucer information is used to record the colouring information of pixel, color rope Fuse is ceased for calling the colouring information on color saucer.One color index information is a byte-sized, compares 32 colors with 4 A byte representation has lacked 4 times;Color saucer information due to recording indexes information color, such benefit be identical color just It saves.
Step 102, all color saucer information is arranged, is generated in color saucer textures;It, will be identical when being arranged Color saucer information integration be a color saucer information preserved, to save memory space.
Step 103, all color index information is arranged, is generated in color index textures;Wherein, each color The size of index information is a byte.
Step 104, the color saucer textures and color index textures generated in load step 102 and 103 respectively.
Step 105, tinter sampling color saucer textures and color index textures quote color saucer according to color index information Middle color, and generate a pixel color;Color saucer information in color saucer textures does not repeat from each other, color index energy It enough repeats to quote same color saucer information.
Step 106, include obtaining all colors on a pictures and being shown by all pixels.
The present invention is decomposed into color saucer information and color in compressed picture, by the Pixel Information in the picture of png formats Index information, and then the picture of png formats is split as a color saucer textures and a color index textures.In the present invention, The size of one color index is a byte, compares 4 byte representations of existing 32 color, and EMS memory occupation has lacked 4 times;It adjusts Colour disk is used for the color of recording indexes, and such benefit is that identical color just saves.Then it is puted up with two when load document Figure load.One puts up figure storage color saucer information, and one puts up figure storage color index information.Then this is read in coloring process Two put up figure, obtain final color and are shown.
The present invention provides a kind of technology that lossless saving picture occupies in memory, which can save picture and exist Consumption in memory, and picture quality will not be lost.Using the technology, an equal amount of memory can be loaded into more pictures, 4 times of spaces can be saved compared to uncompressed picture.
One of ordinary skill in the art will appreciate that:The foregoing is only a preferred embodiment of the present invention, and does not have to In the limitation present invention, although the present invention is described in detail referring to the foregoing embodiments, for those skilled in the art For, still can to foregoing embodiments record technical solution modify, or to which part technical characteristic into Row equivalent replacement.All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should all include Within protection scope of the present invention.

Claims (3)

1. a kind of display methods based on palette compressed picture, includes the following steps:
1)From palette compressed picture color saucer information and color index information;
2)Using color saucer information and color index information, color saucer textures and color index textures are generated respectively;
3)Color saucer textures and color index textures are loaded respectively;
4)Color saucer textures and color index textures are sampled to obtain final color and are shown.
2. the display methods according to claim 1 based on palette compressed picture, which is characterized in that the color index The size of information is a byte.
3. the display methods according to claim 1 based on palette compressed picture, which is characterized in that the step 4)It is Color saucer textures and color index textures are sampled using tinter.
CN201810547767.4A 2018-05-31 2018-05-31 A kind of display methods based on palette compressed picture Pending CN108776982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810547767.4A CN108776982A (en) 2018-05-31 2018-05-31 A kind of display methods based on palette compressed picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810547767.4A CN108776982A (en) 2018-05-31 2018-05-31 A kind of display methods based on palette compressed picture

Publications (1)

Publication Number Publication Date
CN108776982A true CN108776982A (en) 2018-11-09

Family

ID=64028137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810547767.4A Pending CN108776982A (en) 2018-05-31 2018-05-31 A kind of display methods based on palette compressed picture

Country Status (1)

Country Link
CN (1) CN108776982A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766765A (en) * 2019-10-17 2020-02-07 广州博冠信息科技有限公司 Method and device for detecting art resources

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040013297A1 (en) * 2002-07-18 2004-01-22 Roger Lo Method for performing color gamut compression
CN1555198A (en) * 2003-12-23 2004-12-15 无敌科技(西安)有限公司 Cartoon quick condensing and decondensing method
US20070030178A1 (en) * 2005-08-05 2007-02-08 Microsoft Corporation Image compression and decompression
CN102254337A (en) * 2011-04-26 2011-11-23 厦门吉比特网络技术股份有限公司 Method for changing colours of 2D (Two-Dimensional) animation chartlet
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes
CN103209326A (en) * 2013-03-29 2013-07-17 惠州学院 PNG (Portable Network Graphic) image compression method
CN103415872A (en) * 2011-03-09 2013-11-27 想象技术有限公司 Compression of a tessellated primitive index list in a tile rendering system
CN104077794A (en) * 2014-06-26 2014-10-01 广州博冠信息科技有限公司 Picture staining method and device
CN105551069A (en) * 2015-11-30 2016-05-04 中国农业科学院棉花研究所 Method and system for real-time rapid generation of index image
CN106056530A (en) * 2016-06-01 2016-10-26 腾讯科技(深圳)有限公司 Method and device for displaying picture content in application
CN107257989A (en) * 2015-03-24 2017-10-17 英特尔公司 The palette compression of cluster

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040013297A1 (en) * 2002-07-18 2004-01-22 Roger Lo Method for performing color gamut compression
CN1555198A (en) * 2003-12-23 2004-12-15 无敌科技(西安)有限公司 Cartoon quick condensing and decondensing method
US20070030178A1 (en) * 2005-08-05 2007-02-08 Microsoft Corporation Image compression and decompression
CN103415872A (en) * 2011-03-09 2013-11-27 想象技术有限公司 Compression of a tessellated primitive index list in a tile rendering system
CN102254337A (en) * 2011-04-26 2011-11-23 厦门吉比特网络技术股份有限公司 Method for changing colours of 2D (Two-Dimensional) animation chartlet
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes
CN103209326A (en) * 2013-03-29 2013-07-17 惠州学院 PNG (Portable Network Graphic) image compression method
CN104077794A (en) * 2014-06-26 2014-10-01 广州博冠信息科技有限公司 Picture staining method and device
CN107257989A (en) * 2015-03-24 2017-10-17 英特尔公司 The palette compression of cluster
CN105551069A (en) * 2015-11-30 2016-05-04 中国农业科学院棉花研究所 Method and system for real-time rapid generation of index image
CN106056530A (en) * 2016-06-01 2016-10-26 腾讯科技(深圳)有限公司 Method and device for displaying picture content in application

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈爱军: "《数字图像处理及其MATLAB实现》", 31 July 2008 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766765A (en) * 2019-10-17 2020-02-07 广州博冠信息科技有限公司 Method and device for detecting art resources
CN110766765B (en) * 2019-10-17 2022-07-29 广州博冠信息科技有限公司 Method and device for detecting art resources

Similar Documents

Publication Publication Date Title
CN102523367B (en) Real time imaging based on many palettes compresses and method of reducing
US20210160496A1 (en) Encoding method, decoding method, encoding/decoding system, encoder, and decoder
CN102821279A (en) Picture compression method keeping with alpha channel
US20010033286A1 (en) Method and data arrangement for encapsulating signed over-ranged color image data to accommodate in-range file formats
RU2737507C2 (en) Method and device for encoding an image of a high dynamic range, a corresponding decoding method and a decoding device
JP6703032B2 (en) Backward compatibility extended image format
US20060256380A1 (en) Transparent digital images and method of processing and storing same
US20080273804A1 (en) Image Transformation
CN102289829A (en) Method and device for storing and restoring image and system for processing image
CN103209326A (en) PNG (Portable Network Graphic) image compression method
CN110741623B (en) Method and apparatus for gamut mapping
CN107257990B (en) Method and device for converting HDR version of picture into SDR version
CN102833463A (en) Picture processing method and picture processing equipment
CN108471536B (en) Alpha channel transmission method and device, terminal device and storage medium
US9392294B2 (en) Color image data compression
US20180097527A1 (en) 32-bit hdr pixel format with optimum precision
CN108776982A (en) A kind of display methods based on palette compressed picture
CN102521847B (en) Method and device for segmenting bitmap (BMP) image with ultra-high resolution
US20210256734A1 (en) Texture Compression
US20180139360A1 (en) Method and device for processing color image data representing colors of a color gamut
CN112653905B (en) Image processing method, device, equipment and storage medium
US20160155243A1 (en) Method and device for estimating a color mapping between two different color-graded versions of a picture
CN113223100A (en) Picture compression and decompression processing method
Zhang The studies and implementation for conversion of image file format
US20080055319A1 (en) Apparatus and Method of Conversing Data

Legal Events

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

Application publication date: 20181109

RJ01 Rejection of invention patent application after publication