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
 CropAlpha resizes

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
zerob Posted - Oct 15 2024 : 07:59:29
CropAlpha does resize and therefor blur images.
How do i stop CropAlpha from resizing the cropped bitmap (making it bigger instead of shrinking the iebitmap canvas to the actual pixel area without stretching the data,
as my intention is to remove transparency and not to resize the image into a big blury state.
I can't even think of a use case where i wanted the pixel data to get stretched after using CropAlpha, as the result looks worse aways.

There seem to be different ways to crop a iebitmap or imagelayer but some resize and some aren't for both or have a different intention.

Whats the use case of these crop functions and is there a function that just removes the transparency, leaving the pixel data the real size?

Or getting the crop position and extracting the real size, so i would be able to do a downsizing after CropAlpha?
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 16 2024 : 19:39:58
CropAlpha works on the bitmap directly, which means the layer object does not update, so you do need to use a method to restore the size to 1:1.


Nigel
Xequte Software
www.imageen.com
zerob Posted - Oct 15 2024 : 08:19:14
Well, seems that TIEImageLayer.RestoreSize does the trick.
zerob Posted - Oct 15 2024 : 08:09:41
The right bell has alpha.
The left huge bell is after CropAlpha or CropTransparentBorder.
The bottom bell is like i wanted it to be... with alpha removed and no blowing up.

Also the blown up bell got the border area cropped do to the resizing algorithm i guess.