[Qt-interest] Image format plug-in for RAW and PhotoShop?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Tue May 4 17:44:36 CEST 2010


Chris Meyer wrote on Tuesday, May 04, 2010 5:27 PM:

> Does anyone know if there image format plug-ins available for RAW
> (.CR2, .NEF) or PhotoShop (.psd) files?

I am not aware of any Qt image format plugin, but you could maybe come up with your own, using ImageMagick (if license conditions allow):

  http://www.imagemagick.org/
  http://www.imagemagick.org/Magick++/

ImageMagick explicitly lists the abovementioned formats as supported: http://www.imagemagick.org/script/formats.php

The only tricky part would be how to efficiently convert from the Magick++ data structure 'Image' to Qt's QImage structure (for 32 bit rgba data it would maybe not so difficult, keeping in mind data alignmend and endianess etc.). A practical and lazy hack (for small image data) for me was to save a QImage into a QByteArray as "PNG" and read this from memory into the Magick 'Image' and vice versa: store the Magick 'Image' in-memory as PNG and use QImage::read to read that "PNG". Performance was okay for me in practise. If you come up with an efficient way to convert Magick++ Image <-> QImage I would be interested to know ;)

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list