Photo Viewer
Some time ago, I was looking at the INdT’s Canola interface, and I found it really nice. Its look is very clean and the way it displays the contents fits very well in the target devices.
By this time, I was wondering how hard it would be to create an image viewer like the one present in Canola using Qt. To try this out, I started a toy project using Qt and exiv2. It is a very basic image viewer interface that just displays images in a similar way to the Canola interface.
It is very basic and experimental, but for the ones interested on it:
svn co http://svn.gustavoboiko.org/projects/photoviewer/
Have fun ![]()

Zézinho:
This is a cute thing. It would be very nice to get this into Digikam, maybe as a plugin?
August 29, 2008, 9:28 amAdemar:
Nice! Too bad I can’t compile it yet.
1. At least with cmake version “2.4-patch 8″ you need this patch:
-find_package(pkgconfig)
+find_package(PkgConfig)
2. At least with exiv2-0.16-2.fc9:
[ademar@optimusbook boiko-photoviewer]$ make
Linking CXX executable photoviewer
CMakeFiles/photoviewer.dir/photoloader.o: In function `PhotoLoader::getRotation(QString const&)’:
photoloader.cpp:(.text+0×97c): undefined reference to `Exiv2::ImageFactory::open(std::basic_string<char, std::char_traits, std::allocator > const&)’
collect2: ld returned 1 exit status
make[2]: *** [photoviewer] Error 1
make[1]: *** [CMakeFiles/photoviewer.dir/all] Error 2
make: *** [all] Error 2
I’ll try to investigate it later, now I’m quite busy. But thanks for making the code available!
August 29, 2008, 9:41 amboiko:
Ademar » I’m going to check why it does not work using exiv2 0.16. In fact I was using exiv2 0.14 here.
The other problem is straighforward to be fixed.
Thanks for the feedback
August 29, 2008, 10:48 amSvempa:
Would be nice to have in Gwenview too. How about getting in touch with Aurelien?
August 29, 2008, 11:46 amKenneth Rohde Christainsen:
So are you keeping all objects in memory or are you reusing them as Canola does? Maybe you could look into lightmediascanner (used by Canola and opensourced) to preprocess the images (it will store the image sized etc in a database)
Cheers and good work
August 29, 2008, 1:48 pmKenneth
boiko:
Kenneth Rohde Christainsen » As I said in the post, this is very experimental code, so I didn’t really took much care about optimizations. The only thing I do is to cache the images in a thumbnail-friendly size. But indeed, there is much space for improvements
August 29, 2008, 1:52 pmThanks for the feedback
Danilo Cesar:
Cool!
August 29, 2008, 6:22 pmCrismon’s Blog » Blog Archive » Photo Viewer:
[...] è ancora in fase sperimentale ma se siete interessati a provarla la trovate nel blog ufficiale di [...]
August 30, 2008, 11:30 amPaul Gideon Dann:
Really nice job! Here’s a tiny patch to add a directory chooser dialog on startup:
August 30, 2008, 2:07 pmhttp://pastebin.com/m3d1442d5
Piotr Budny:
It does not show thumbs and segfaults when clicked empty box.
August 30, 2008, 3:18 pmhttp://pastebin.com/m187416e8 (don’t know how to compile it with debug support)
Qt*-4.4.1-2.i686, PLD Linux
Stefano:
Hi, Boiko… while you’re at it, you may find this interesting too: it’s a browser plugin, but I find it really very well done:
http://www.cooliris.com/
August 30, 2008, 4:11 pmStefano:
I mean, just for the graphic part, the way of scrolling and the like (not any integration with any web site which is not in the scope).
August 30, 2008, 4:12 pmGNUton:
Cool! Do you try to run it in a N8×00 device?
September 1, 2008, 9:34 amboiko:
GNUton » I didn’t try this. Ufortunatelly I don’t have any n8xx device around to test this.
September 1, 2008, 11:38 amboiko:
Stefano » Yes, I have seen PicLens running. It is a very nice interface indeed. But for this kind of interface probably the program would require opengl to work. But we can still take good ideas from there
September 1, 2008, 11:40 amboiko:
Piotr Budny » Ouch, I will check what is going on.
September 1, 2008, 11:42 amAdenilson Cavalcanti:
Boiko
Congrats for your pet project, its very kind of you to make it OSS.
It SEGFAULTS here (when the executable is in a distinct directory than the photos).
When I copy and run the app in the photo directory, it correctly creates the thumbnails (on /tmp/boiko_photoviewer) but only displays a subset of then.
Maybe its related with the subset problem, but once I select one photo, I can’t return to previous screen (is there a key combo to do that?).
Another thing that would be nice is have a help with instructions (could even be in the command line).
If you are planning to continue the development, maybe you could benefit from pictureflow (http://code.google.com/p/pictureflow/) approach (maybe making a new widget titled ‘boiko-photoview’).
Concerning licensing, I think BSD or LGPL could attract more users because they are more business-friendly. The truth is that even GPL’ed code end up in commercial product (see gplviolations for example) and I known that there are some managers that are more receptive to contribute to BSD/LGPL projects.
Best regards
Adenilson
September 3, 2008, 4:36 pmboiko:
Adenilson Cavalcanti » Thanks for the feedback Adenilson!
Can you please send me (it can be by mail) the backtrace for the crash?
For going back to the thumbnail view, just press the mouse on an empty space (it should work).
About the license, I’m not quite sure it really matters in this case. As this is not an innovative idea (it is just yet another implementation) I guess a license like GPL is fine. But of course I can relicense the code if someone provide me good reasons to do so
September 3, 2008, 8:53 pmAdenilson Cavalcanti:
Boiko
Mandei o backtrace para o kdemail mas voltou. Vc tem algum outro e-mail válido?
[]s
Adenilson
September 5, 2008, 2:35 pmmxttie:
nice indeed
September 12, 2008, 1:36 pmsince I’m currently on windows, I had to change the random function calls by qt’s (qrand and qsrand)