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.

 

photoviewer

It is very basic and experimental, but for the ones interested on it:

svn co http://svn.gustavoboiko.org/projects/photoviewer/

Have fun 🙂

21 Comments

  1. Zézinho says:

    This is a cute thing. It would be very nice to get this into Digikam, maybe as a plugin?

  2. Ademar says:

    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+0x97c): 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! 🙂

  3. boiko says:

    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

  4. Svempa says:

    Would be nice to have in Gwenview too. How about getting in touch with Aurelien? 🙂

  5. Kenneth Rohde Christainsen says:

    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
    Kenneth

  6. boiko says:

    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 🙂

    Thanks for the feedback

  7. […] è ancora in fase sperimentale ma se siete interessati a provarla la trovate nel blog ufficiale di […]

  8. Really nice job! Here’s a tiny patch to add a directory chooser dialog on startup:
    http://pastebin.com/m3d1442d5

  9. Piotr Budny says:

    It does not show thumbs and segfaults when clicked empty box.
    http://pastebin.com/m187416e8 (don’t know how to compile it with debug support)
    Qt*-4.4.1-2.i686, PLD Linux

  10. Stefano says:

    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/

  11. Stefano says:

    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).

  12. GNUton says:

    Cool! Do you try to run it in a N8x00 device?

  13. boiko says:

    GNUton » I didn’t try this. Ufortunatelly I don’t have any n8xx device around to test this.

  14. boiko says:

    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 🙂

  15. boiko says:

    Piotr Budny » Ouch, I will check what is going on.

  16. Adenilson Cavalcanti says:

    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

  17. boiko says:

    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 😉

  18. Adenilson Cavalcanti says:

    Boiko

    Mandei o backtrace para o kdemail mas voltou. Vc tem algum outro e-mail válido?

    []s

    Adenilson

  19. mxttie says:

    nice indeed 🙂
    since I’m currently on windows, I had to change the random function calls by qt’s (qrand and qsrand)

  20. Alex says:

    Nice 3d photo viewer photos ePic http://www.epicreal.com. Cool. Recommended.

Leave a Reply