ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 reading 8 bit BMP files with RLE compression
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jacq59

France
1 Posts

Posted - Sep 14 2012 :  05:18:19  Show Profile  Reply
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

fab

1310 Posts

Posted - Sep 18 2012 :  03:53:04  Show Profile  Reply
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.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: