Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Fairly new to linux and am trying to find an image thumbnailer that will also generate the applicable html code for me :-) Could use a windows app but want to try and ditch that OS if poss.
what kind of html do you need generated? Its pretty easy to write a simple shellscript that will do that using for eg. convert from Imagemagick. Heres a quick example:
Code:
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 WidthxHeight"
echo "example: $0 20x30"
exit 1
fi
echo '<html><head></head><body>' > thumbs-html.html
for img in $(ls *.jpg)
do
echo "converting $img to $1 thumb-$img"
convert -sample $1 $img thumb-$img
echo "<img src='thumb-$img' />" >> thumbs-html.html
done
echo '</body></html>' >> thumbs-html.html
Save that to for eg. thumbinize.sh and chmod it +x Then just cd to the directory where you have your images, and run the script.. If you need image name anti-caps scripts or recursive image lookup into a single dir, ive got example scripts or those also.. (;
You could use the thumbnailing function in my phpFinder app
I haven't integrated the img.php file too closely with anything else yet, so you should be able to dig that functionality out fairly easily.
It's (obviously) in PHP though, so I don't know how useful it is to you.
Features include:
Max width / max height
Caching of all generated thumbnails (in native .gd2 format)
At the moment it automatically outputs the image in the format it came in, but I'm thinking of just spitting everything out as PNG.
Last edited by Napalm Llama; 04-28-2005 at 01:39 PM.
If you use KDE and have ImageMagic installed you can use Konqueror's Gallery creator.
Just open Konqueror, navigate to the folder where your images are, click
Tools >> Create Image Gallery
It will create thumbnails for all your images create the html code and display the page all in one step. I used it to create the DT image gallery in my signature. Fast and easy.
If you don't have the option in Konqueror, use urpmi or rpmdrake to install ImageMagic.
Imagemagick is a set of tools, and it doesnt have a central binary. convert is one of the most useful binaries included. The manual will most likely tell you more on them. just opne it with: man imagemagick
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.