ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 PixelFormat convert

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
quantuz 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
5   L A T E S T    R E P L I E S    (Newest First)
fab 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.
quantuz 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 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 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 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?