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
 PixelFormat question
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
497 Posts

Posted - Aug 30 2011 :  09:54:25  Show Profile  Reply
What is the difference between:
imageenvect.pixelformat := ie24rgb and
imageenvect.io.pixelformat := pf24bit;

P.

fab

1310 Posts

Posted - Aug 30 2011 :  12:18:08  Show Profile  Reply
Maybe you mean the difference between ImageEnVect.IEBitmap.PixelFormat and ImageEnVect.Bitmap.PixelFormat.
If ImageEnVect.LegacyBitmap=true (the default), then there isn't difference, because IEBitmap.PixelFormat=ie24RGB is automatically passed to Bitmap.PixelFormat as pf24bit.
If ImageEnVect.LegacyBitmap=false, then you cannot set Bitmap.PixelFormat, so you can only set IEBitmap.PixelFormat to ie24rgb.

For that reason you should always set:

ImageEnVect.IEBitmap.PixelFormat = ie24RGB;

Of course the final meaning is always the same: a 24 bit (8 bit per channel) RGB image.

Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Aug 31 2011 :  06:07:27  Show Profile  Reply
This is from the help file:
// This use standard Delphi LoadFromFile
ImageEnView1.IO.Bitmap.LoadFromFile('my.bmp');
ImageEnView1.IO.Bitmap.PixelFormat := pf24bit;
ImageEnView1.Update;

When should i use this pixelformat instead of the iebitmap.pixelformat?

Hope i am making sense.
Thnaks.
P
Go to Top of Page

fab

1310 Posts

Posted - Aug 31 2011 :  07:38:34  Show Profile  Reply
quote:
// This use standard Delphi LoadFromFile
ImageEnView1.IO.Bitmap.LoadFromFile('my.bmp');
ImageEnView1.IO.Bitmap.PixelFormat := pf24bit;
ImageEnView1.Update;

When should i use this pixelformat instead of the iebitmap.pixelformat?


When you don't know if it is different than pf24bit or pf1bit (which are the unique TBitmap pixel formats supported by ImageEn). For example TBitmap.PixelFormat could be pfDevice, so you need to convert it to pf24bit.
That is an extreme case: to load a BMP or any other file format, just use ImageEn functions:

ImageEnView1.IO.LoadFromFile('my.bmp');

...instead of ImageEnView1.IO.Bitmap.LoadFromFile()
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: