RANSOM DEMAND: Image Held Hostage!

Ben Ocean zope at thewebsons.com
Sun Nov 18 20:30:29 CET 2001


Perfect. Thank you!
BenO

At 01:24 PM 11/18/01 -0600, you wrote:
>----- Original Message -----
>From: "Ben Ocean" <zope at thewebsons.com>
>
>
> > I need a way to size up images via script. Now, in that inferior scripting
> > language known as PHP, *they* have such a tool: getimagesize().
>
>When you say "size up" you mean to retrieve the image dimensions?  All this
>time I thought you wanted to *resize* the images!
>
> > Can it be
> > that God's gift to scripting languages, Python, can't compete here? If
>it's
> > true that PHP has one up on us here, how can I write a script that bridges
> > this dastardly gap?
>
>There are two options that come to mind... the Pythonware Imaging Library
>at pythonware.com, and the GDmodule (which I currently maintain) at
>http://newcenturycomputers.net/projects/gdmodule.html
>
>Using GDmodule, you'd say
>
>     import gd
>     img = gd.image("filename.goes.here.jpg")
>     print img.size()
>
>to print the tuple of (x,y) dimensions of the picture.
>
>Actually changing the size would be harder, requiring allocation of a new
>empty image of the correct size, followed by using the img.copyResizedTo()
>method.






More information about the Python-list mailing list