Property: ColorDepth
(TSave2D_Png)
Specifies the color depth of a Portable Network Graphics (PNG) format file for TSave2D_Png component.
Syntax:
type
{ Defined in the pSave2D_Png unit }
TPngColorDepth = (pcdIndex_1, pcdIndex_2, pcdIndex_4, pcdIndex_8, pcdRGB_8, pcdRGBA_8);
property ColorType: TPngColorType;
Description:
Color depth, also known as bit depth, pixel format, is either the number of bits used to indicate the color of a single pixel. In a Portable Network Graphics (PNG) file, the pixels can be defined by a varying number of bits. The property specifies which color depth will be used to save a barcode symbol to a Portable Network Graphics (PNG) file. It can be one of these value (defined in the pSave2D_Png unit):
- pcdIndex_1: Uses the 1-bit per pixel (1bpp) format. It supports 2 distinct colors (for example: black and white) and stores 8 pixels per 1 byte. Each pixel is an 1-bit index into a table of up to 2 colors.
- pcdIndex_2: Uses the 2-bit per pixel (2bpp) format. It supports 4 distinct colors and stores 4 pixels per 1 byte. Each pixel value is a 2-bit index into a table of up to 4 colors.
- pcdIndex_4: Uses the 4-bit per pixel (4bpp) format. It supports 16 distinct colors and stores 2 pixels per 1 byte. Each pixel value is a 4-bit index into a table of up to 16 colors.
- pcdIndex_8: Uses the 8-bit per pixel (8bpp) format. It supports 256 distinct colors and stores 1 pixel per 1 byte. Each byte is an index into a table of up to 256 colors.
- pcdRGB_8: Uses the 24-bit per pixel (24bpp) format. It supports 16777216 distinct colors and stores 1 pixel value per 3 bytes. Each pixel value defines the red, green and blue samples of the pixel.
- pcdRGBA_8: Uses the 32-bit per pixel (32bpp) format. It supports 4294967296 distinct colors and stores 1 pixel per 4 byte. Each pixel value define the Alpha, Red, Green and Blue samples of the pixel.
Contents
Copyright © 2001-2024
Han-soft Corporation. All rights reserved.