KPhotoAlbum logo


Progress of the SQL database backend

05 Sep 2008 16:08 +0000

While Jan and Henner have been concentrating on the stacking feature, me and Jesper have been struggling in the database land.

So the SQL database support is progressing. I ported the SQL backend to QtSQL when the KDE 4 port of KPhotoAlbum was started, but back then I did not really have time to test it. So my first work here was to finish the port and make the backend work again, now with KDE 4 and QtSQL. That was not so hard after all, and now I am able to save my KPhotoAlbum database to SQL again. Currently I'm working with SQLite database, but others like MySQL and PostgreSQL will (probably) be supported too.

Then we also had few longish discussions how to make the damn thing fast. First we are optimizing the "Show thumbnails" action for all images. It's currently very slow with the SQL backend, if you have a lot of images (like 10 000 or more). We came up with an idea, that probably solves it and are already implementing it.

Schema of the database was also reviewed, leading to some field renames, which are good to make at this point before anybody uses the database for real work.

One big difference of the SQL backend compared to XML backend is error handling. Because XML backend is handled in memory and used by only a single user at a time, the operations done with it basically cannot fail, but with the SQL that is not the case. For example we have a problem when connection to database is lost while runnig the application or when there are some conflicts when users concurrently change the database.

The biggest problem for me to implement error handling was that I thought that basicly the whole user interface would have to be rewritten to do the right thing when there is an error. And so it would be a lot of work. Gladly Jan came up with a good solution to that. We just use a functor in the database API to give an error handler for the database backend and handle the errors in the database side. That functor could then pop up a dialog to ask user if she wants to try again or abort.

— Tuomas

Image Stacking support

04 Sep 2008 09:43 +0000

The first step in image stacking is implemented! Jesper described our plan to implement this in the previous post. After some hacking yesterday night by Jan and Henner, the basic feature is up and running now.

It is possible to select a bunch of images and put them in a stack by using the new keybinding Ctrl+3. After that, it is possible to collapse this stack so that only the first image is shown.

Lets look at an example stack with a picture of Gunvald (Jespers dog) on the beach. The default view in the thumbnail view shows only the first picture:
collapsed stack view ... expanding to
expanded stack view

So finally, you can only show the best images of a snapshot series and unclutter your thumbnail view. Well - almost: it is not yet possible to pick the 'best' picture to be shown; right now it is only the first of the stack.

Now we're going to focus on the details of this feature. Like implementing a dialog for choosing the best image of a stack (the one that is displayed on top of the stack). And the visualization of the stack in the thumbnail view is probably not optimal yet - what do you think, how should it look like (mail us) ?


Development sprint day 4 - take 2

03 Sep 2008 09:40 +0000

Things are moving fast here now! We just had a meeting to discuss what to do the rest of the week, and the outcome was this:

  • Henner and Jan will work on a new fancy feature for KPA, namely image stacking. Image stacking will allow you to mark a number of images to be the same shot (think 10 images of Grand Canyon being almost the same, or a raw image converter and cropped in different ways)
  • Jan will postpone his work on IPTC, until he gets home, and will work with Henner on the image stacking
  • Henner will likely work on scanning for new images in the background when he gets home
  • Jesper is sick and tired of the infobox by now, but will work on that when he gets..., well after the development sprint
  • Tuomas and Jesper will together work on the SQL backend the rest of the week, hopefully bring it to a stage where that can be the default by the end of the week - no more XML backend! However XML export and import will be available, and the DB will initially be a SQLLite, so no database server needs to be set up.
  • we had all to hold Jan back from adding GPS feaures to KPA this week (note: he just got a new toy ;-)

Development sprint day 4

03 Sep 2008 06:40 +0000

Its now Wednesday morning, we are approximate half way through the one week KPA development sprint, so better make some status here.

It is almost nine in the morning, and the only people up is my wife, Gunvald (our dog) and I (Jesper). The rest of the crowd is still sleeping, on the other hand, the last commit was 2 o'clock, so I guess I'll let them sleep for another hour, before it is time for the yearly fire alarm test evil grin.

We've all worked in our own areas so far, still supporting each other with ideas, suggestions, and review.

  • Tuomas has worked on getting the SQL backend up and working again. I expect that I will help him with that the rest of the week, hopefully we will get it to a state where it will be somewhat ready for mainstream.
  • Henner has worked on improving the loading of thumbnails, and indeed the thumnbnail view feels much faster now.
  • Jan is working on IPTC import and export - the idea is to allow the user to make the mapping between the tags in scripts.
  • Finally, I have been, well what have I done?! Henner arrived half a day early compared to Tuomas, so he and I decided we would just fix the info box in the viewer, before Tuomas showed up. Well I've been working on that beeeeeep info box ever since. Well that and the speed display (the window telling you the pause between each image when running a slide show. So both windows are transparent, and looking real sexy. The problem (and the reason why I've focused so much on it) was phonon. With phonon in there the widgets was flickering, even though the phonon widget was not even visible on the screen. So I've also spend a fair amount of time trying to get video support working. The answer to it all in the end was to upgrade to a KDE 4 desktop :-o

Finally a picture both showing us and the transparent infobox
the KPA team

KPhotoAlbum Developer Sprint 2008 starts

30 Aug 2008 14:00 +0000

There are some things the KPA developers wanted to get done for some time now (for instance working on the SQL backend) - and the best way to focus and do it, is to come together in person for some time. So the main author Jesper came up with the idea for the KPhotoAlbum Developer Sprint 2008.

Jesper is so kind to host this event - a week of discussing and coding - in his home in Denmark. Right now, Jesper, Henner and Tuomas are here already and we expect Jan later this evening.

Expect some update this week.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Design & Code: Jaroslav Holaň | Content: Jesper Kjær Pedersen | XHTML 1.1 | CSS