×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

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

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

(OP)
Hi !


Is there way to modify JPG/GIF -images on-fly with Perl?

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?

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

If you have got the ImageMagick libraries installed, I believe there is also an ImageMagick module for perl.  This should be able to do what you require.  Head for your nearest CPAN mirror (details at www.cpan.org) for more details.




--
0 1 - Just my two bits

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

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:



@image_array = qw(image1.jpg image2.jpg image3.jpg image4.jpg) # and so on and so forth

foreach $image (@image_array) {

print "<img src=\"$image\" width=\"100\" height=\"100\">\n";
# you can change with width and height to whatever you might want them to be
}




That should do it.


-Vic

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close