Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Image Uploader that Sizes the Photo Like An Avatar

by kcott (Archbishop)
on Jul 03, 2022 at 22:00 UTC ( #11145256=note: print w/replies, xml ) Need Help??


in reply to Image Uploader that Sizes the Photo Like An Avatar

Take a look at Image::Magick. Its description starts with (my emphasis):

"This Perl extension allows the reading, manipulation and writing of a large number of image file formats using the ImageMagick library. It was originally developed to be used by CGI scripts for Web pages."

A link to extensive documentation follows.

I believe that module only handles raster formats; but happy to be proven wrong (I did have a quick look for a list of available formats: couldn't find one). I routinely use Image::LibRSVG to convert SVG (a vector format) to raster formats; I've no idea if that would be useful for you.

— Ken

  • Comment on Re: Image Uploader that Sizes the Photo Like An Avatar

Replies are listed 'Best First'.
Re^2: Image Uploader that Sizes the Photo Like An Avatar
by perlfan (Vicar) on Jul 04, 2022 at 13:59 UTC
    Yes, Image::Magick will do this easily. I recommend actually, storing the full size image and hiding the resized image behind a webserver call (that might look like the all to an image or a RESTful GET call in an <img src...> tag. Note, image scale attacks exist, but I only mention them because they are an interesting adversary parlay against the bort.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2022-10-05 14:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (24 votes). Check out past polls.

    Notices?