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 question

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
pierrotsc Posted - Aug 30 2011 : 09:54:25
What is the difference between:
imageenvect.pixelformat := ie24rgb and
imageenvect.io.pixelformat := pf24bit;

P.
3   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Aug 31 2011 : 07:38:34
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()
pierrotsc Posted - Aug 31 2011 : 06:07:27
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
fab Posted - Aug 30 2011 : 12:18:08
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.