• Home
  • About Me
  • Welcome to Short Linux hints
Short hints about Linux


  • Tags

    hacking Linux linux cpanel courier maildir mailbox exim security viruses worms
  • Blogroll

    • Geany
    • Handy one-liners for sed
    • Linux By Example
    • Penguin Tutor

Nov 05

Setting up a fast and simple web gallery

Linux Add comments

There are endless articles on how to set up a web gallery - from sophisticated albums with user interaction to plain html pages. My best choice is Menalto's Gallery because of its extensive features and huge caching (fast speed). However, sometimes I just need a more simple solution with these objectives:

- Properly resized thumbnails - beware, some scripts just shrink the photos and do not create thumbnails :)

- Watermarks - very important, because my best friend is a photograpger and paranoic

- Resized images - again my friend sends me very big images which are too slow to be downloaded

So the easiest solution to the above is:

1. Resize my images with Imagemagick's convert:

convert -resize 800 "_MG_*" my-pics.jpg

This resizes correspondingly all images to be 800 px wide. This also changes their name from _MG_ something to a name of your choice - extra bonus :)

2. Set the watermark:

for i in my-pics*; do composite -gravity SouthEast mylogo.gif $i $i; done

This sets mylogo.gif as the watermark for all images. The orientation is SouthEst, meaning the logo will be put in the right-down corner of the photo.

3. Use llgal to generate the html pages and thumbnails. Llgal comes with most Linux distributions and is a fast and elegant script :) You just have to issue 'llgal' in the directory of your photos - it takes care about everything else.

Comments are closed.

Powered by WordPress .::. Designed by SiteGround Web Hosting

cssandhtml