Michal Čihař - Blog Archives for English

Exiv2 support for Pentax maker notes

As I have Pentax camera, I wanted to be able to extract information from maker notes it stores to EXIF. As only tool which seems to be capable of this is ExifTool and it is a Perl beast which I really don't want to use from Python, I need to add support for it to some existing library.

I found two which could be used - libexif and Exiv2. Because of availability of Python bindings I choose Exiv2. The reason why I also prefer this is upcoming XMP support for which I was looking recently. The only disadvantage I can see is that libexif is more widely used by applications. Why the hell couldn't be just one library doing this?

Anyway if you're interested in Pentax maker note support for Exiv2, you can find it in their bug tracker and it will hopefully appear soon in their svn ;-).

First success with Photo uploader

Today I did really big stress testing of Photo uploader - I needed to upload 400 photos (total size somewhere near 600 MiB). And it worked without problems! I could not imagine that I would have to upload so much files using web forms or some damn slow Windows application.

Also since last announcement uploader development went on. It now supports 4 services (all in Czechia for now), I added some documentation and man page. Also version 0.1 has been released yesterday (but it does not yet contain mentioned updates), with plan to release 0.2 somewhere next week.

And as I got quite a lot of requests for GUI - I do not plan to write one myself (or at least not soon). So if you want one, please write it. As all hard work is done by phoupl module, it can be easily embedded into some simple image viewer written in Python.

Uploading photos to minilab

I was looking for some easier solution than using web forms, but no minilab seems to support Linux here. Windows applications I tried so far does not seem to work in Wine, so this is also not an option. Only thing that seems to work is Picassa, but it is quite big tool to make just uploading photos and it is anyway some beast using Wine.

So the only option was to write something myself. Using cURL from Python is quite easy so I hacked simple script to upload photos to minilab using PycURL. It currently supports only Droxi, but it might be later extended to support others. The code is also now a bit fragile as it does almost none error checking, but I was able to upload first set of photos to minilab and continue order in browser.

You can download my proof of concept code at Photo uploader page, but don't expect anything clever from it, but it should basically work :-).

XMP support for Python

As I produce quite a lot of photos and want to manage them in some reasonable way, I started to look for some tools which can do commenting/tagging/whatever of taken photos. I really don't want these meta data stored outside picture itself, so most of photo managers currently available are not acceptable. When reading Gnome 2.20, I noticed support for XMP (Extensible Metadata Platform) in eog.

Well I didn't know this standard up to now, but it looks interesting. Especially when open source tools can easily adopt library open sourced by Adobe. I would like to add support for this to Lazygal, but I didn't find any reasonable Python module to work with XMP. There is simple extractor, but nothing what would allow me to easily grab meta data out of file. In fact one solution seems to exist, but it costs almost $300 and is not free software in any way.

Or did I just miss something when using Google and some such Python library exists?

Pentax won

On Friday I finally made the decision - from the two cameras that left in choice, I bought Pentax K10D. And first experiences are quite positive. In fact I didn't find anything really disappointing during first weekend of usage. I only learned, that I should better check manual choices I've made in the past, because changing white balance at interior, going out and taking photos there does not really produce great pictures.

The camera feels really good in my hands and I was able to figure out most settings without reading manual, but I think now it is time to do so :-). Maybe it will help me to get even more out of it, especially in controlling manual modes.

I have to admit that most of photos were left to automatics and I just tried what I can do with it. Combined with trips to Kyoto, Nagoya Castle and Inuyama, it is no wonder that I took almost 1000 photos during weekend.

Thanks to everybody who helped me with their suggestions, it really helped me in the decision!

Funny advertisements

It's sometimes funny what automatically added advertisements can produce. This morning when I complained about lack of Windows developers for Gammu and shared my unwillingness to work on Windows, Microsoft sponsored this email ;-).

On Wed, 12 Sep 2007 09:55:56 +0900
Michal Čihař <michal@cihar.com> wrote:

> I have totally no interest in investing into Windows license and
> finding out how to use totally free MSVC.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.

Wammu 0.22

I just released version 0.22 of Wammu. This is again mostly bug fix release, which fixes various bugs reported by users.

  • Fixed errors in locales and applied stricter checking.
  • Fixed various crashes.

There is still no binary for Windows. I don't have time for debugging crashes that happen there. Volunteers are welcome!

Nikon D80 or Pentax K10D?

That's the question I'm trying to solve right now. From wide range of cameras, I reduced to this choice, but the decision is now quite hard. Both have their advantages and disadvantages and there is not easy to choose as it was to cut down previous list.

I used Google a lot in last weeks to find some experiences with both cameras, but none of them really helped me.

Pentax pros:

  • Shake reduction in body (saves money on lens).
  • Dust removal from sensor.
  • Modes like TAv.
  • Manual tuning of white balance looks much easier to use and provides many options.
  • Dust-proof weather resistant body (although I won't have matching lenses at beginning).
  • Manual flash control - it won't pop up when I don't want.
  • Dedicated RAW button (I probably will take most photos in JPEG, but I want to be able to switch without going deep into menu).
  • In camera RAW development (I'm not sure I will use this).
  • Won lot of awards this year, so it should not be a bad camera, right?

Pentax cons:

  • Underexposure in some conditions (maybe I just set something wrong on camera in shop).
  • Lower lenses availability in Czechia (but I'm in Japan for next few months, where it is not that big problem).
  • No option in kit lenses.

Nikon pros:

  • Faster AF.
  • More lenses and accessories available (but I'm not sure if I really need them).
  • Scene modes (but I might anyway stick with manual settings).
  • A bit cheaper here.

Nikon cons:

  • Feels slightly less comfortable in my hand.

From the list it is visible that I was able to find more pros and cons on Pentax. Nikon seems to do its job pretty well, but does not provide any extra gimmicks. This is also reason why Pentax is winner for now. I'll buy the camera sometimes during next week, so things can still change.

First usage of lazygal

After searching for new gallery and investigating lazygal, I finally decided it's time to give it some real world usage. My current album from Japan is being processed by this damn fast tool.

It needed a bit of hacking, but as the core was already there and Alexandre Rossi is quite cooperative upstream. I managed to implement almost everything I requested in original post. The only thing I'm still not completely happy with is the theme, but I hope I will improve it over time.

From original requirements, I completely dropped links to full size images. There is simply no reason to put here crappy pictures which my only camera I currently have here (built in camera in Nokia 6234) produces. Also once I'll buy new camera (what will be most likely Pentax K10D), I probably won't upload huge 10Mpix images on web server as I don't think it would be good for anything else than wasting my bandwidth.

I like when things just work

Recently, after switching to open source drivers for my Nvidia card in notebook, I get possibility to have working suspend to disk (well suspend was always working, but the resume of screen was the problem). In same time, I enabled suspend to disk, when battery is getting really low in Gnome power management preferences. This night it saved me file system troubles - I let the notebook to do some calculations and forgot to connect it to power. So it ran few hours till the battery was down and then it just hibernated. When I noticed this on morning, I could just plug the power and the calculation can continue. Thanks to everybody who made this work.