Skip to content

Instantly share code, notes, and snippets.

@Longor1996
Last active August 29, 2015 14:01
Show Gist options
  • Save Longor1996/87276f53387b97e15681 to your computer and use it in GitHub Desktop.
Save Longor1996/87276f53387b97e15681 to your computer and use it in GitHub Desktop.
Paint.JAVA, File-Format TLGF

The following are different formats on how to ENCODE/DECODE a single image-layer/frame/node.

RGBA/8888

  • Binary Size: 32 Bit
  • Color Channels: Red, Green, Blue, Alpha
  • FormatID: 0

RGBA/5551

  • Binary Size: 16 Bit
  • Color Channels: Red, Green, Blue, Alphabit
  • FormatID: 1

GREY

  • Binary Size: 8 Bit
  • Color Channels: Grey
  • FormatID: 2

VGA

  • Binary Size: 8 Bit
  • Color Channels: VGA-Color
  • FormatID: 3

YCbCr

  • Binary Size: 24 Bit
  • Color Channels: Y, Cr, Cb
  • FormatID: 4

YCbCr+A

  • Binary Size: 32 Bit
  • Color Channels: Y, Cr, Cb, Alpha
  • FormatID: 5

BITMASK

  • Binary Size: 1 Bit
  • Color Channels: Bit
  • FormatID: 6

HSB

  • Binary Size: 24 Bit
  • Color Channels: Hue, Saturation, Brightness
  • FormatID: 7

HSBA

  • Binary Size: 32 Bit
  • Color Channels: Hue, Saturation, Brightness, Alpha
  • FormatID: 8

The following are different formats on how to COMPRESS/DECOMPRESS a single image-layer/frame/node.

RAW

  • Name: Raw
  • CompressionID: 0
  • ???: Doesn't compress at all. Raw Data.

INF/DEF

  • Name: Inflate/Deflate
  • CompressionID: 1
  • ???: Uses Inflate/Deflate to de/compress.

ZLIB

  • Name: Zip
  • CompressionID: 2
  • ???: Uses Zip to de/compress.

RLE

  • Name: RunLengthEncoding
  • CompressionID: 3
  • ???: Uses run-length-encoding to de/compress.

LBL

  • Name: LineByLine
  • CompressionID: 4
  • ???: Compresses row-by-row/line-by-line, using any of the above given compression formats, which can be intermixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment