[JAI-IMAGEIO] Extending CameraRaw support.
First of all, jrawio has moved and now is on java.net, as a child project of
imageio (jrawio.dev.java.net). Thanks to Brian and the imageio staff for
As v1.0 is going thru some Release Candidates for testing, I'm planning the
next major version with new features.
I've got in touch with the developers of some Java applications that process
photos by using ImageIO and they are interested in adding Camera Raw
support. What is emerging is that a reasonable feature would be that this
support should be implemented by just adding jrawio.jar in the classpath.
After all this is the typical behaviour of ImageIO SPIs. These apps don't
want to handle cameraraw files in a specific fashion. I'd call this class of
But jrawio on purpose provides the application with an unprocessed image. If
you deal with camera raw images, in most cases it's up to the application to
process them in the best way - this is why camera manufacturers have
introduced camera raw formats. I'd call this class of applications
The point is that jrawio 1.0 supports only raw-aware applications. So I'd
like to introduce support for raw-unaware applications in v1.5.
I've already got the code and the knowledge to do the required number
crunching for some formats. I'm just asking an opinion on which is the best
architectural way to go. I see two options:
1. introducing a specific ImageReadParam subclass with something like a
'processed' flag; raw-aware would set it to false and raw-unaware apps would
set it to true.
2. providing a separate 'wrapper' SPI (also in a separate jarfile) - for
simplicity I call this jrawio2.jar. This would register ImageReaderSpis that
supersede those in jrawio.jar; they would internally call jrawio.jar readers
and add postprocessing. raw-aware apps would only put jrawio.jar in the
classpath; raw-unaware apps would add also jrawio2.jar.
The former approach looks like simpler and clearer. Nevertheless it puzzles
me about what should be the default settings for the 'processed' flag. On
one hand defaulting it to 'false' would mantain jrawio philosophy of being
natively designed to exploit cameraraw formats features; but raw-unaware
apps should be explicitly set the flag to true, so that just dropping
jrawio,jar in the classpath would not be enough.
Perhaps the best solution would be:
3. go with the ImageReadParam approach and to provide two jar versions,
jrawio.jar and jrawio2.jar. No more wrappers here, but mutually exclusive
purposes: the former defaults the 'processed' flag to false, the latter to
true. Raw-aware apps would use the former, raw-unaware apps the latter.
Fabrizio Giudici, Ph.D. - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
http://www.tidalwave.it/blog - Fabrizio.Giudici@tidalwave.it
mobile: +39 348.150.6941 - fax: +39 027.005.105.36
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org