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
 CropTransparentBorder and position

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
Borut 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
8   L A T E S T    R E P L I E S    (Newest First)
xequte 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
Borut 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 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 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
Borut Posted - Mar 13 2025 : 03:23:30
Hello,
Thanks a lot,
Borut
xequte 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 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 Posted - Mar 09 2025 : 23:50:20
Hi Borut

For layers, please use:

https://www.imageen.com/help/TIEImageLayer.CropAlpha.html

The position adjustment will occur automatically.

Nigel
Xequte Software
www.imageen.com