harald
Qt
KDE
Posted by harald
 in Qt, KDE
 on Wednesday, February 06, 2008 @ 20:27

Reading about Benjamin getting motivated to work on KDE on OS X got me motivated, too. So, one svn checkout later, I realized that before I can even start with KDE 4, I need a bunch of dependency libraries, which are obtainable from Finc or MacPorts. Since I’m not very patient (and low on disk space), I decided to do something about it.

A low hanging fruit is to remove the dependency on the image libraries (e.g. PNG, JPG, JPEG 2000, TIFF) and let OS X do the work. After a 2 days hack, I came up with a Qt Image IO plugin that uses Mac OS X’s ImageIO Framework (source code). It requires Qt >= 4.3 and probably OS X >= 10.5.

The plugin can load all image formats supported by OS X, including animated ones (e.g. animated GIFs), but doesn’t handle image properties yet. Once it matures, I can fix the CMake build scripts to stop looking for libpng and friends, and finally start configuring kdelibs on OS X :)

12 Responses to “Some fun with OS X ImageIO”

» Posted by anonymous
 on Wednesday, February 06, 2008 @ 21:33

OOO!! can it do RAW files?

» Posted by Peppe Bergqvist
 on Thursday, February 07, 2008 @ 08:20

“I’m not very patient ”
vs
“After a 2 days hack”

You trolls are funny=)

» Reply from harald
 on Thursday, February 07, 2008 @ 10:12
harald

@Anonymous: http://developer.apple.com/graphicsimaging/workingwithimageio.html lists all the formats ImageIO can read and write. Some of the digicam’s RAW formats are on the list.

» Posted by Tanner Lovelace
 on Thursday, February 07, 2008 @ 15:16

Nice!

I’ll have to try that out.

» Posted by illogic-al
 on Thursday, February 07, 2008 @ 15:24

That’s awesome. I’ll give this a try with my next build of amarok/kde.

» Posted by Kamil Klimek
 on Thursday, February 07, 2008 @ 16:05

Why KDE4 depends on some fink/macports libraries? Qt itself doesn’t, so i don’t get why KDE does. When will you publish your plugin, maybe I could succesfully port it for 10.4 compatiblity?

» Posted by Kamil Klimek
 on Thursday, February 07, 2008 @ 16:06

Sorry, I didn’t see source link before :)

» Posted by Kamil Klimek
 on Thursday, February 07, 2008 @ 16:08

Sorry for tripple posting, but if I remove all imageformats plugin of Qt, and move your plugin instead to my imageformats plugin dir, will it be loaded automaticly and handle images?

» Reply from harald
 on Thursday, February 07, 2008 @ 17:48
harald

@Kamil: Yes, Qt will try every image plugin until one succeeds. Or you can just try opening a PICT file, which none of the built-in image plugin can read. If nothing happens, try “export QT_DEBUG_PLUGINS=1″ to make sure the plugin is loaded. If it is loaded but doesn’t do the job, complain to harald at trolltech dot com :)

» Posted by Kamil Klimek
 on Thursday, February 07, 2008 @ 18:03

The only thing that is interesting for me is animation support for gifs. If I understand good, then when I load animated gif into text browser it should be animated in browser, right?

» Posted by Craig Ringer
 on Tuesday, February 12, 2008 @ 00:16

What effect will this have on colour management? Is the Mac likely to be performing managed transforms of input images in non-monitor colour spaces as part of the normal ImageIO load?

» Posted by Alessandro
 on Saturday, February 16, 2008 @ 04:54

@Craig: I am not sure about the color transforms this ImageIO plugin does, but can do a few experiments next week, if you like. With non-monitor color spaces, do you mean non-RGB color spaces, or camera/scanner profiles?
Qts standard image load routines (at least from 4.4 on) are definitively supposed not to perform any kind of implicit color transform for “RGB” images on any platform. Color management aware applications, are allowed to transform and output color, themselves, as they like.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.