Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Detect boundaries within .png's - and cropping

by Corion (Patriarch)
on Jul 08, 2020 at 07:08 UTC ( [id://11119026]=note: print w/replies, xml ) Need Help??


in reply to Detect boundaries within .png's - and cropping

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119026]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-20 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found