Thanks for the input! I was never able to get JAI to work and instead of going down the kakadu route I've built a media filter that runs thumbnails through a djatoka media server. Djatoka is able to handle all the popular image formats including jpeg2000 and tiff. It will also use the best java libraries for each format, so jpeg 2000 are handled by kakadu, tiffs by something called imagej(?), and the others by plain old imageio. One caveat, the filter can only process images which are publicly viewable on the web. The way it works is to give djatoka the url back to the bitstream in DSpace to process so if there is any access restrictions then it won't be able to download the original image.


To use: You'll need to apply the small patch to the filter media manager (so that it keeps track of which bitstream it is working on), and put the djatoka filter in. Then on the configuration side wire up the plugin, and supply the config value "djatoka.url" so it knows where the media server is.

If there's interest and support I package this up to be included DSpace proper. Otherwise I'll just leave it as a code snipit. We haven't deployed it yet at A&M but plan too.


On Wed, Mar 21, 2012 at 5:48 PM, Graham Triggs <grahamtriggs@gmail.com> wrote:
Hi Scott,

I did make a media-filter that self registered all of the formats
supported by JAI. Although I never specifically tested it with JPEG


On 21 March 2012 19:32, Scott Phillips <scott.a.phillips@gmail.com> wrote:
> DSpacers,
> Has anyone been able to make the media-filter process JPEG 2000 image files?
> The current media-filter used by DSpace makes use of these libraries as part
> of the Java Standard Edition. By default Java SE comes with support for the
> basic image types: jpeg, gif, png, bit map, etc... However if you install
> the Java Advanced Imaging Library (JAI) locally then the appropriate plugins
> will be installed to support JPEG 2000 and TIFF. This shouldn't require any
> code changes on the part of DSPace, but would require a system administrator
> to locally install JAI.
> http://download.java.net/media/jai/builds/release/1_1_3/INSTALL.html
> However, I've been banging my head on this problem for a few days now and
> I've never been able to get JAI to work. I've also not been able to find any
> open source projects that process JPEG 2000 images using JAI. So, has anyone
> been able to get this to work?
> As a follow up to that question, I've been looking at the open source
> projects which do process JPEG 2000 images. The big one that I've found is
> Djatoka, we're running it locally and it's a tomcat java web app that can
> process the JPEG images. They are not using JAI but instead using Kakadu,
> which is a commercial library written in C. They have embedded the binaries
> for all the major OS Platforms within the webapp and then load the
> appropriate libraries for the particular platform. Then with a java wrapper
> they are able to make calls out to the pre-build binaries. Kakadu is
> normally a commercial product, however they do offer "Non Commercial" and
> "Public Service" licenses which might work for DSpace.
> Assuming that the JAI library does not actually work, If A&M we're to
> develop a JPEG 2000 media filter that used the Kakadu would DSpace/Duraspace
> be open to managing the public service or non commercial license? I am
> assuming this would have to be a separate module that one could optionally
> include as a maven dependency which would provide this media-filter because
> the Kakadu license does restrict to "non commercial uses" and some people
> use DSpace for commercially.
> Scott--
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Dspace-devel mailing list
> Dspace-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-devel