Author |
Topic  |
|
Borut

20 Posts |
Posted - Mar 09 2025 : 15:41:03
|
Hi,
I successfully cropped the transparent area in the second layer of ImageEnView1. After the cropping, the smaller layer image moves to the top left position of the background layer. Is it possible somehow that the layer remains in the same position, maybe by getting the Top Left position(x,y) of cropped image, before it moves to 0,0? and then move it that PosX, PosY? Or any other way?
Borut
|
|
xequte
    
38924 Posts |
|
Borut

20 Posts |
Posted - Mar 10 2025 : 08:45:51
|
Hi Nigel,
thanks, it works. Initially I wanted to use an array of TIEBitmap, in order to manipulate (rotate, change transparency, position etc.) and assign bitmaps to layers of ImageEnView1. (Now I am thinking of using TIEImageLayer , because of the cropping transparent areas, which would probably allow faster computing. My non cropped layer is about 500kB, and cropped image about 200kB.) Does the usage of TIEImageLayer allows the same manipulation as working with TIEBitmap and later assigning to ImageEnView1 (like ImageEnView1->Layers[1]->Bitmap->Assign(TIEBitmap[1]);)? Is reducing the size of images from 500kB to 200kB relevant at all, or it is more imporatant for larger images (several Mb)?
Borut |
 |
|
xequte
    
38924 Posts |
Posted - Mar 10 2025 : 19:38:49
|
Hi
Absolutely you can use the TIEImageLayer.Bitmap in the same way as any other TIEBitmap, but you will need to call ImageEnView1.Update() to see the changes.
Reducing the size of layer images will improve performance and reduce file size.
Nigel Xequte Software www.imageen.com
|
 |
|
Borut

20 Posts |
Posted - Mar 13 2025 : 03:23:30
|
Hello, Thanks a lot, Borut |
 |
|
Borut

20 Posts |
Posted - Mar 13 2025 : 15:34:55
|
Hi Nigel,
another short question, if I may: is it possible to assign Tbitmap32 (from Graphics32 lib) to ImageEnView (TIEImageLayer.Bitmap, TIEBitmap....)
Thanks, Borut |
 |
|
xequte
    
38924 Posts |
Posted - Mar 13 2025 : 16:06:42
|
Hi Borut
Have not used Graphics32, but as I understand it, you can use:
var
tempBmp: TBitmap;
begin
tempBmp:= TBitmap.Create;
try
// Convert Graphics32's TBitmap32 to a VCL TBitmap
tempBmp.Assign(Bitmap32);
// Now assign the VCL TBitmap to your TIEBitmap
ImageEnView1.IEBitmap.Assign(tempBmp);
finally
tempBmp.Free;
end;
end;
But not sure if the Alpha channel is supported using this method.
Nigel Xequte Software www.imageen.com
|
 |
|
Borut

20 Posts |
Posted - Mar 16 2025 : 14:09:26
|
Hi Nigel,
I tried your suggestion, it works for .bmp, but it does not support transparency and .png format. Thx, Borut |
 |
|
xequte
    
38924 Posts |
Posted - Mar 16 2025 : 22:26:26
|
Hi Borut
Sorry, I don't know Graphics32 at all. ImageEn can import a 32bit BMP which contains alpha, so you should find out if its possible to output a Graphics32 image as a 32bit BMP with alpha. Otherwise you might need to save to a temp PNG and load that directly into ImageEn.
Please also see:
http://www.imageen.com/help/TIEBitmap.SynchronizeRGBA.html
Nigel Xequte Software www.imageen.com
|
 |
|
|
Topic  |
|
|
|