Author |
Topic  |
|
quantuz
 
Sweden
55 Posts |
Posted - Nov 13 2012 : 16:56:50
|
Hi! The conversion between ie8p and ie16g dont seems to work. The result as an all black image. the source image is a .bmp palette image iEBitmapPtr_ = new TIEBitmap(); aviIEIO_->AttachedIEBitmap = iEBitmapPtr_; aviIEIO_->LoadFromFile(fileName); // iEBitmapPtr_ is here ie8p iEBitmapPtr_->PixelFormat = ie16g; // now iEBitmapPtr_ is here ie16g but all black
Running BCB XE2 and IE 4.1.0
Best Regards, //Christer |
|
fab
   
1310 Posts |
Posted - Nov 14 2012 : 12:31:43
|
Hi, I tried this with the latest version. It seems to work. Anyway please could you send a sample 8 bit image? |
 |
|
quantuz
 
Sweden
55 Posts |
Posted - Nov 14 2012 : 15:55:25
|
Hi Fabrizio,
Tanks fo the help, here is the bitmap.. Here is the complete code sequence
iEBitmapPtr_ = new TIEBitmap(); iEBitmapPtr_->BitAlignment=256; iEBitmapPtr_->MemoryAllocator = iemaVCL; aviIEIO_->NativePixelFormat = true; aviIEIO_->AttachedIEBitmap = iEBitmapPtr_; iEBitmapPtr_->BitAlignment=256; aviIEIO_->LoadFromFile(2star.bmp); iEBitmapPtr_->BitAlignment=256; iEBitmapPtr_->PixelFormat = ie16g;
Gegards, //Christer
 65.44 KB |
 |
|
fab
   
1310 Posts |
Posted - Nov 14 2012 : 23:19:52
|
Please let me know you display the image (how display iEBitmapPtr_). This works:
ImageEnView1->LegacyBitmap = false; ImageEnView1->IO->NativePixelFormat = true; ImageEnView1->IEBitmap->BitAlignment = 256; ImageEnView1->IO->LoadFromFile("20121114154624_2stars.bmp"); ImageEnView1->IEBitmap->BitAlignment = 256; ImageEnView1->IEBitmap->PixelFormat = ie16g; ImageEnView1->Update();
|
 |
|
quantuz
 
Sweden
55 Posts |
Posted - Nov 16 2012 : 02:46:15
|
Hi Fabrizio,
I display the image in a ImageEnVect with the code below ImageEnView1->SetExternalBitmap(iEBitmapPtr_)
Best Regards, //Christer |
 |
|
fab
   
1310 Posts |
Posted - Nov 22 2012 : 00:49:27
|
Hi Christer, this is a bug of ImageEn, when setting BitAlignment (<>32) with color-mapped images. This bug will big fixed in next minor release. A workaround is to convert the image to ie8g before last BitAlignment = 256:
ImageEnView1->IO->LoadFromFile("20121114154624_2stars.bmp"); ImageEnView1->IEBitmap->PixelFormat = ie8g; ImageEnView1->IEBitmap->BitAlignment = 256; ImageEnView1->IEBitmap->PixelFormat = ie16g;
It doesn't cause loss of information, because ie8g and ie8p are both 8 bit. |
 |
|
|
Topic  |
|