Unit BGRALzpCommon

📄 Source code

Description

Type and structure definitions for LazPaint image format

Uses

Overview

Structures

Name Description
Packed Record TLazPaintImageHeader Format of header for LazPaint files

Functions and Procedures

function DecodeLazRLE(ASource: TStream; var destBuffer; availableOutputSize: PtrInt; availableInputSize: int64 = -1): PtrInt;
procedure EncodeLazRLE(var sourceBuffer; size:PtrInt; ADest: TStream);
procedure LazPaintImageHeader_SwapEndianIfNeeded(AHeader: TLazPaintImageHeader);

Types

TLzpCompression = (...);

Constants

LazpaintChannelBlueFromGreen = 4;
LazpaintChannelBlueFromRed = 2;
LazpaintChannelGreenFromRed = 1;
LazpaintChannelNoAlpha = 8;
LazpaintPalettedRGB = 16;
LazPaintThumbMaxHeight = 128;
LazPaintThumbMaxWidth = 128;
LAZPAINT_COMPRESSION_MASK = 255;
LAZPAINT_COMPRESSION_MODE_RLE = 2;
LAZPAINT_COMPRESSION_MODE_ZSTREAM = 1;
LAZPAINT_MAGIC_HEADER : array[0..7] of char = 'LazPaint';
LAZPAINT_THUMBNAIL_PNG = 256;

Description

Functions and Procedures

function DecodeLazRLE(ASource: TStream; var destBuffer; availableOutputSize: PtrInt; availableInputSize: int64 = -1): PtrInt;

This item has no description.

procedure EncodeLazRLE(var sourceBuffer; size:PtrInt; ADest: TStream);

routines to compress and uncompress byte-sized values (you need to separate the channels to obtain any compression)

procedure LazPaintImageHeader_SwapEndianIfNeeded(AHeader: TLazPaintImageHeader);

This item has no description.

Types

TLzpCompression = (...);

This item has no description.

Values
  • lzpZStream
  • lzpRLE: slower and not necessarily better

Constants

LazpaintChannelBlueFromGreen = 4;

This item has no description.

LazpaintChannelBlueFromRed = 2;

This item has no description.

LazpaintChannelGreenFromRed = 1;

This item has no description.

LazpaintChannelNoAlpha = 8;

This item has no description.

LazpaintPalettedRGB = 16;

This item has no description.

LazPaintThumbMaxHeight = 128;

This item has no description.

LazPaintThumbMaxWidth = 128;

This item has no description.

LAZPAINT_COMPRESSION_MASK = 255;

This item has no description.

LAZPAINT_COMPRESSION_MODE_RLE = 2;

This item has no description.

LAZPAINT_COMPRESSION_MODE_ZSTREAM = 1;

This item has no description.

LAZPAINT_MAGIC_HEADER : array[0..7] of char = 'LazPaint';

This item has no description.

LAZPAINT_THUMBNAIL_PNG = 256;

This item has no description.