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.
|