Sun, 23 Nov 2008

Adding Pictures to Gallery


I use Gallery to display my photos. I'm mostly happy with it and have developed the following work-flow to help me add pictures with the minimum of fuss.

  • Copy the pictures onto my server. I generally do this via scp or an NFS mount.
$ cp -a /media/CAMERA/DCIM /mnt/server/pics/new
  • Run my autorotate program to name the files based the date and time the pictures were taken, split them into directories based on the date, and rotate the pictures based on the EXIF orientation information.
$ autorotate /pics/new/**/*(.)   # this is zsh syntax
  • Then I run nautilus on the created directories (in /pics/new) to look at the pictures and delete the ones I don't want. Using the icon view and setting the icon size to 400% makes it quite usable for this. I can also run my rot script here to rotate any photos that were incorrectly rotated or which came from a camera without orientation information. Finally, I make sure all the photos are in the folders I want them to be in.
  • Then I log into gallery and go into my pending directory. Here I upload the directories using Add Items / From Local Server.
  • Then I can move the directories to where I want them to live and choose the highlight pictures. Nautilus is also good for this.
  • I like the majority of my albums to be arranged chronologically, and for the album to have the date and time of the first photo in it. To easily do this I then run my set_gallery_album_dates program.
$ set_gallery_album_dates
  • When I am happy, I check the albums and then set the permissions so that they are viewable. Since this is a right pain I will generally go to the top level album and remove the permissions then add them again making sure the apply changes to sub-items box is ticked. I check this has worked by temporarily setting the display mode (in the bottom right hand corner) to guest.
  • Finally, I clean up the old files. I've spent too much time double checking old directories full of pictures against what's in the gallery.
$ rm -r /pics/new/* /pics/sorted/*
  • And the very last step, unmount the memory card, put it back in the camera and format it.

[/software/gallery] permanent link

Sat, 22 Nov 2008

Adjusting EXIF dates


Sometimes EXIF date information on pictures can be incorrect, usually because the clock on the camera is set incorrectly. To adjust a set of pictures with incorrect EXIF date information I run a command similar to:

$ exiftime -v+1y -fw *

This will add one year to all the EXIF date tags in all the pictures in the current directory. The modifiers are y, m, w, d, H, M, and S and they can be adjusted forwards with + or backwards with -.

For complete details, see the man page.

[/software/gallery] permanent link

Fri, 21 Nov 2008

Watermarking


To watermark a picture I run a command similar to:

$ composite -gravity Center -quality 90 -dissolve 50 watermark.png pic.jpg pic-w.jpg

[/software/gallery] permanent link




September 2017
Sun Mon Tue Wed Thu Fri Sat