![]() |
![]() |
![]() |
![]() |
function CropTransparentPixels: TRect;
Trim transparent edges until each edge contains at least one opaque or semi-opaque pixel.
This function returns the bounds of the cropped region (before the image is resized).
uses Img32, Img32.Fmt.PNG; ... img := TImage32.Create; img.LoadFromFile('star.png'); img.CropTransparentPixels; //HatchBackground img.SaveToFile('star_cropped.png'); img.Free;
Before:![]() |
After:![]() |
Copyright ©2019 Angus Johnson - Image32 ver. 4.0 - Documentation last updated on 20-January-2022