[osg-submissions] New image handling plugin for OS X (osgdb_ImageIO)

E. Wing ewmailing at gmail.com
Fri Oct 26 16:43:59 PDT 2007


Yea! The Leopard NDA is finally lifted.

This is a submission for a new osg plugin, osgdb_ImageIO. This is the
first piece of the puzzle that we need to get 64-bit support on OS X.
This plugin is intended to partially replace the current osgdb_qt
(classic Quicktime) plugin. There are many issues with the current
osgdb_qt, but perhaps the biggest is that there are many APIs used in
it that have been marked deprecated for awhile now and will not make
it to 64-bit on OS X.

ImageIO is Apple's (semi-)new (as of 10.4 Tiger) fundamental image
framework that provides access to all image formats handled by the
platform. This new osgdb_ImageIO plugin intends to replace all of
osgdb_qt's image handling duties as well as introduce support to new
image formats as they become available to the platform (e.g. JPEG2000,
RAW, HDR, etc).

osgdb_ImageIO does not replace osgdb_qt's movie handling capabilities.
I envision that to be handled by a planned second plugin using Apple's
semi-new (10.4 Tiger) QuickTimeKit framework, tentatively osgdb_QTKit.
So this plugin is just the first step.

Would you please add this to src/osgPlugins/ImageIO?

Improvements over osgdb_qt plugin:
- Supports istream and ostream
- Supports a lot more image formats
- ImageIO framework should be well supported from 10.4 to the future
(which should include 64-bit and new/future image formats)
- Doesn't require explicit initialization/close-out
- (Hopefully) efficient...avoids the manual byte-by-byte manipulation
of the old QuickTime plugin. Calls Apple's Accelerate framework when
useful.
- Seems to fix/avoid AutoreleasePool related leak warnings which I
believe the current qt plugin triggers if not using Cocoa (i.e.
actually having an autorelease pool created).

Missing:
- No movie file support (planning/expecting a separate QTKit plugin to
handle that).
- Need to update osgDB::Registry for new plugin
- Need to update build system(s)

Additional Notes:
- The old Quicktime plugin will need to remain for both Windows users
(who happen to use it) and pre-10.4 OS X versions. It will also need
to remain for movies until we get a QTKit plugin written.
- This plugin probably could use additional testing for
16-bit/LUMINANCE/ALPHA stuff. I'm terribly confident I understood what
needs to happen in these cases so behavior could be different/broken
compared to osgdb_qt.


Once I figure out all the build system details, I'm proposing that for
the next release of OSG, if building for OS X 10.4 or 10.5, the
ImageIO plugin gets built and set as the default image handling
plugin. For legacy 10.3 and Quicktime for Windows users, the existing
osgdb_qt plugin should remain available. For now though, I wanted to
make this piece of code available in case anybody has a pressing need
to get 64-bit going soon.


Thanks,
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgdb_ImageIO.cpp
Type: application/octet-stream
Size: 38381 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20071026/4a603eae/attachment.obj>


More information about the osg-submissions mailing list