Generate web thumbnails page (gallery) for free with convert command on linux

Here\’s something for guys who want to generate html file with thumbnails of photos. I know sometimes it really gets messy. So sometime back I had found a search on the net for the same and found a script written by Samuel Hocevar.  Sorry I do not seem to have the link to the page, but since the script is GPL and name of the author is there in the script, I can put it for download from my web-blog also. So here is the script genthumb

The script will convert the images to thumbnails using the convert command and then create index.html linking all the created thumbnails into the page one by one. The logic as used by the program is as below:

For each jpeg found in the directory or the subdirectory, it will execute:

convert -geometry ${THWIDTH}x${THHEIGHT} \”$file\” \”$newfile\” >/dev/null 2>&1

to create the thumbnail. Then it will create the info file which it uses to create the links. Simple and elegnant.

This site uses Akismet to reduce spam. Learn how your comment data is processed.