No such thing as a small change | |
PerlMonks |
Re: Detect boundaries within .png's - and croppingby Corion (Patriarch) |
on Jul 08, 2020 at 07:08 UTC ( [id://11119026]=note: print w/replies, xml ) | Need Help?? |
If all else fails, you can use Imager, and the ->getwidth, ->getheight and ->getpixel methods to read the image pixel by pixel to find the leftmost non-alpha pixel and the rightmost non-alpha pixel (and top/bottom), and then use ->crop to crop the image.
In Section
Seekers of Perl Wisdom
|
|