[KPhotoAlbum] Importing Pictures from Camera

Joe josephj at main.nc.us
Wed Nov 10 00:42:22 GMT 2010

On 11/08/2010 05:39 PM, Andreas Neustifter wrote:
> Hi all!
> One area where KPhotoAlbum lacks a bit of functionality is the
> importing of images into the KPA tree. I do not think that this import
> step should be incooperated into KPA (as well as the image editing is
> not part of KPA). This adheres to the Unix philosophy, especially the
> "Make each program do one thing well." [1]
> Nevertheless there is no proper standalone image importer, so I wrote
> one, I'm shamelessly abusing this mailing list to publish it and ask
> for feedback: https://github.com/astifter/PhotoImport
> What I'm especially interesseted in is:
> How do you import your photos, how do you sort them? Whats the time
> granularity of your sorting? And do you shoot JPEG or RAW?
> (Currently the tool supports importing the photos of each day from a
> folder into a separate folder named YYYYMMDD_<custom>  where the day
> starts a 6:00 AM and lasts 24 hours.)
> I hope these questions are okay on this list.
> Cheers, Andi
> [1] http://en.wikipedia.org/wiki/Unix_philosophy
> _______________________________________________
> KPhotoAlbum mailing list
> KPhotoAlbum at mail.kdab.com
> http://mail.kdab.com/mailman/listinfo/kphotoalbum
This would probably be better in its own list/discussion.

After grappling with this for quite awhile, I came up with the following 
solution that works for me.

My partner takes a lot of nature photos, some of which she hopes to 
sell. She's planning on getting a more advanced camera soon, but for 
now, she uses an Olympus 7 megapixel point and shoot camera (FE-230) 
that only saves in jpeg. She uses a couple of 2GB xD cards with it.

When she fills up a card, she gives it to me and I move all the files to 
a usb drive attached to my notebook. (I have a tiny, $12 xD to USB 
adapter that I plug the cards into because xD is proprietary and Linux 
can't read the cards directly.)

The card holds around 1500 photos which is an unmanageable number for 
one directory, so I manually review the picture files (using ls or 
dolphin) and try to find a date break somewhere near the middle. Then, I 
put the photos in two folders split on the date break. If I did it today 
and the date break was 11/05 and the date (file creation date seems to 
work) of the last photo was 11/08, the two folders would be named 
20101105 and 20101108. That way, if I need to access the photos by 
dates, I have unambiguous directory names to go by. If there were too 
many photos on one date, I would name the directories 20101105a and 
20101105b. This way they sort by date in the default displays of ls and 

I keep them on an external drive so they don't leave the safety of my 
house when I go out with my notebook and because they use a lot of 
storage. This also makes sure that two photos with the same file name 
(assigned by the camera) never end up in the same directory (possibly 
overwriting, etc.) so I don't have to write complex scripts to detect 
and deal with duplicate file names. (I started down the script route and 
got things to work, but it was a major PITA.) I figured out pretty 
quickly that trying to physically organize pictures by anything other 
than date caused a lot more problems than it solved. That's what kpa is for.

When I load them into kpa, I search for all pictures with *none* in all 
the regular kpa fields and add an "untagged" tag to them. That way, I 
can work on batch/individually tagging them until I get it right and I 
can still find them easily. For instance, I can scan through all the new 
pictures and add one tag to all of the ones it applies to (e.g. "Deer") 
and then quit and do something else and still be able to come back and 
easily find those same pictures and add more tags to them (e.g. 
"Buffalo", where I live, not the animal <G>). When I'm happy with the 
tags on some of the new pictures, I remove the "untagged" tag from them.

It would be cool if kpa could *optionally* add an "untagged" tag to 
pictures it finds with no tags set when it updates its database.

Aside: Since my camera occasionally reuses a file name (it can't see 
them any more because the xD card keeps getting erased when I move the 
pictures to my notebook), I get weird gray blank preview images in kpa 
that mean either that a picture is still in the index, but the file is 
gone or possibly that kpa has multiple pictures with the same name and 
doesn't quite know what to do (I'm not sure about the second case). It 
would be great if something was added to kpa to deal with both of these 
cases (e.g. offering to delete all entries for "non-existent" pictures 
from the database, and offering some kind of rename option for pictures 
with identical names - I'm not sure how that should work.) This can also 
be a problem if I forget that I already imported the pictures and 
accidentally do it again to different subdirectories that kpa can see.

Anyway, the new import program sounds like a step in the right 
direction. I'd like it to do something closer to what I described above 
- also based on volume of pictures rather than just on pictures from a 
single day.

If it were really automagical, it would also detect pictures with the 
same file names as those already in the index and do "something" about 
it like refusing to import them and quarantining them somewhere for 
further attention. I realize that this enhancement would require 
interaction with kpa's database, so it wouldn't be quite so stand alone 
and might need a lot more code to make it work.


More information about the Kphotoalbum mailing list