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”
OOO!! can it do RAW files?
“I’m not very patient ”
vs
“After a 2 days hack”
You trolls are funny=)
@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.
That’s awesome. I’ll give this a try with my next build of amarok/kde.
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?
Sorry, I didn’t see source link before ![]()
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?
@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 ![]()
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?
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?
@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.