ImageEn, unit imageenio

TImageEnIO.NativePixelFormat

TImageEnIO.NativePixelFormat


Declaration


property NativePixelFormat: Boolean;


Description


By default, ImageEn converts all paletted images to 24 bit (true color). Only black/white images are stored in the original format with 1 bit per pixel.
Setting NativePixelFormat to True disables the conversion and uses the image's native format.

Notes:
- Use of NativePixelFormat will prevent execution of some image processing operations
- Setting ImageEnView1.IO.NativePixelFormat is the same as setting ImageEnView1.IO.Params.NativePixelFormat
- LegacyBitmap must be False to enable NativePixelFormat
       

Example


If you have a 16 bit gray scale TIFF and you want to work with 16 bit gray scale pixels, you must write this before loading the image:

ImageEnView1.LegacyBitmap := False; // Do not use TBitmap
ImageEnView1.IO.NativePixelFormat := True; // Use the original pixel format

Now you can read the pixels using:
word = ImageEnView1.IEBitmap.Pixels_ie16g[x,y];