# US 2013/0156309 A1 · Raster Graphics Image Transcoding for File Size Reduction

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0156309 A1
- Document ID: US20130156309A1
- Status: Published application
- Kind: A1
- Application number: 13/327,537
- Filed: 2011-12-15
- Published: 2013-06-20
- Earliest claimed: 2011-12-15
- Assignees: Microsoft Corporation
- Inventors: Yisheng Yao; Ke-Cheng Huang; Emmanuel Papirakis
- Web page: https://patentgrep.com/patent/US20130156309A1

## CPC

- G06T 9/00: Image coding (bandwidth or redundancy reduction for static pictures H04N1/41; coding or decoding of static colour picture signals H04N1/64; methods or arrangements for coding, decoding, compressing or decompressing digital video signals H04N19/00)
- H04N 1/644: {using a reduced set of representative colours, e.g. each representing a particular range in a colour space}
- H04N 19/40: using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
- H04N 19/96: Tree coding, e.g. quad-tree coding
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Described is a technology by which a raster graphics image file (e.g., a PNG) containing pixels having color component data and alpha channel data (e.g., RGBA data) is transcoded into a smaller Palette Indexed format with non-noticeable and/or virtually no loss. Hextrees are used to represent the pixels of the image, such as one hextree for each subset (segment) of the image's pixels, where alpha channel data distribution may be used to determine each segment. A palette containing sets of alpha and color values is generated from the hextrees, with the transcoded image data provided by representing the pixel data as indexes to the palette.

## Claims

### Claim 1

In a computing environment, a method performed at least in part on at least one processor comprising, transcoding an image containing pixels having color component data and alpha channel data, including representing the pixels of the image within one or more hextrees, performing node reduction on the one or more hextrees to obtain a specified number of remaining nodes for each hextree, generating a palette from the remaining nodes of the one or more hextrees, and providing transcoded image data, including representing at least some of the pixel data as indexes to the palette.

### Claim 2 (depends on 1)

The method of claim 1 wherein representing the pixels of the image within one or more hextrees comprises segmenting the image into a plurality of segments, and representing the pixels of each segment within one hextree for that segment.

### Claim 3 (depends on 2)

The method of claim 2 wherein segmenting the image into the plurality of segments comprises using alpha channel data distribution to determine each segment.

### Claim 4 (depends on 3)

The method of claim 3 wherein using alpha channel data distribution to determine each segment comprises segmenting based upon alpha value counts, including for each alpha value, counting occurrences of that alpha value in the image.

### Claim 5 (depends on 1)

The method of claim 1 wherein transcoding the image comprises transcoding a Portable Network Graphics (PNG) image file or a Graphics Interchange Format image file into a transcoded image file.

### Claim 6 (depends on 1)

The method of claim 1 further comprising, arranging the transcoded image data into a file, and transmitting the file over a network.

### Claim 7 (depends on 1)

The method of claim 1 further comprising, reconstructing a reconstructed image based at least in part upon the transcoded image data, determining whether a quality measure of the reconstructed image meets a quality threshold, and if not, discarding the transcoded image data.

### Claim 8 (depends on 1)

The method of claim 1 further comprising, reconstructing a reconstructed image based at least in part upon the palette and the indexes, determining whether the quality of the reconstructed image meets a quality threshold, and if not, performing further node reduction to obtain a new set of transcoded image data.

### Claim 9 (depends on 1)

The method of claim 1 further comprising, reconstructing a reconstructed image based at least in part upon the palette and the indexes, determining whether a size reduction measure of the reconstructed image meets a gain threshold, and if not, discarding the transcoded image data.

### Claim 10

A system comprising, a transcoder configured to transcode an input image containing pixels having color component data and alpha channel data into a transcoded image file, the transcoder configured to segment the image into a plurality of segments, represent the color component data and the alpha channel data of the pixels of each segment within a hextree for that segment, process each hextree into a sub-palette, and represent the pixels of the image as an index into one of the sub-palettes.

### Claim 11 (depends on 10)

The system of claim 10 wherein the transcoder segments the image into the plurality of segments based upon alpha channel data distribution.

### Claim 12 (depends on 10)

The system of claim 10 wherein the input image comprises a Portable Network Graphics (PNG) image or a Graphics Interchange Format image.

### Claim 13 (depends on 10)

The system of claim 10 wherein the color component data of the input image comprises red, green, blue (RGB) values for each pixel.

### Claim 14 (depends on 10)

The system of claim 10 wherein the sub-palettes are combined into a palette in the transcoded image file.

### Claim 15 (depends on 10)

The system of claim 10 wherein the sub-palettes are combined into a palette representing the set of alpha value, RGB values in the transcoded image file.

### Claim 16 (depends on 10)

The system of claim 10 further comprising, a quality evaluation mechanism that determines whether to use the transcoded image file based on a quality measure thereof.

### Claim 17 (depends on 10)

The system of claim 10 further comprising, a gain evaluation mechanism that determines whether to use the transcoded image file based on a size reduction of the transcoded image file relative to the input image file.

### Claim 18

One or more computer-readable media having computer-executable instructions, which when executed perform steps, comprising:
segmenting subsets of an input image's red, green, blue, alpha (RGBA) pixels into segments;
representing each of the segments as a hextree;
processing each hextree into a sub-palette; and
encoding the input image into a transcoded image file comprising the sub-palettes and an index reference for each pixel to an entry in one of the sub-palettes.

### Claim 19 (depends on 18)

The one or more computer-readable media of claim 18 wherein segmenting the subsets comprises determining the subsets based upon alpha data distribution.

### Claim 20 (depends on 18)

The one or more computer-readable media of claim 18 wherein processing each hextree into a sub-palette comprises performing node reduction, including combining alpha information of a child node with alpha information of a parent node.
