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 <a href="http://amit-agarwal.co.in/wordpress/wp-content/uploads/2009/01/genthumb.sh">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.
Related Articles:
- 2010/02/04 Web Thumbnails, create your account to upload your files.
- 2010/04/07 Adding date to Photographs.
- 2010/03/09 101 Linux hacks – free Linux Ebook
- 2010/02/10 Annotating the photograph with comments.
- 2010/02/04 How To Build A Self-hosted WordPress Blog For Free
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.