![]() |
|
Just another Perl shrine | |
PerlMonks |
Changing Image Resolutionby notsoevil (Pilgrim) |
on Apr 28, 2001 at 00:35 UTC ( #76264=perlquestion: print w/replies, xml ) | Need Help?? |
notsoevil has asked for the wisdom of the Perl Monks concerning the following question:
I have a script for an 'article manager' web-based interface, where the manager uploads a given image to the server.
Before writing the image to the server, which is to be embedded into the article it is associated with, its width and height are checked:
No problem with that code (save it being repetitive in parts, which is necessary as I need to have verbose code for the client, not necessarily 'clean, Perlish' code). However, I also need to check/change image resolution, which from my understanding should be able to be done like so:
But alas, the image is written to the server in the following steps with the initial resolution, which could be above 72 and is undesirable. Embedding print statements before the resolution block of code yields, say for an example image:
After the resolution block, the same print statement yields:
Which would lead one to believe the transformation occurred, although it did not (the image on the server retains the original resolution). Have any fellow monks run into such problems before?
--
Back to
Seekers of Perl Wisdom
|
|