T O P I C R E V I E W |
jacq59 |
Posted - Sep 14 2012 : 05:18:19 Hello I have bmp image files with a palette (8 bits per pixels) and RLE 8 bits encoding I want to find in the image all the pixels for a given index of the palette. I have loaded the file in a bitmap with type tIEbitmap and then used pixels to scan the image but the bitmap is imposed as a 24bit format and I do not have access to the palette indexes. Is there any other approach?
jack |
1 L A T E S T R E P L I E S (Newest First) |
fab |
Posted - Sep 18 2012 : 03:53:04 Hello, load the image using:
ImageEnView1.LegacyBitmap := false; ImageEnView1.IO.NativePixelFormat := true; ImageEnView1.IO.LoadFromFile('input.bmp');
Now you have a pure 8 bits per pixels paletted image. You can access color indices with: index := ImageEnView1.IO.IEBitmap.Pixels_ie8[col, row];
The color palette is in ImageEnView1.IO.IEBitmap.Palette[] array.
|