Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify JPG/GIF -images on-fly with Perl ???

Status
Not open for further replies.

Vesku

Programmer
Jun 7, 2000
19
0
0
FI
Hi !<br><br><br>Is there way to modify JPG/GIF -images on-fly with Perl?<br><br>I have image-library and i want to show little trumbnails. How can i make on-fly 600k image to smaller trumbnail-image with perl?
 
If you have got the ImageMagick libraries installed, I believe there is also an ImageMagick module for perl.&nbsp;&nbsp;This should be able to do what you require.&nbsp;&nbsp;Head for your nearest CPAN mirror (details at <A HREF=" TARGET="_new"> for more details. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
Well, like in most Perl cases, there is MTOWTDI, more than one way to do it. The way that AndyBo suggested will work just fine, but if you have a small library of images, you could make an array to the effect of:<br><br><FONT FACE=monospace><br><br>@image_array = qw(image1.jpg image2.jpg image3.jpg image4.jpg) # and so on and so forth<br><br>foreach $image (@image_array) {<br><br>print &quot;&lt;img src=\&quot;$image\&quot; width=\&quot;100\&quot; height=\&quot;100\&quot;&gt;\n&quot;;<br># you can change with width and height to whatever you might want them to be<br>}<br><br><br></font><br><br>That should do it.<br><br><br>-Vic<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top