[fedora-java] Java APIs for image thumbnail generation

Joe Desbonnet joe at galway.net
Sat Feb 17 15:59:34 UTC 2007


Probably a little OT as it's not a Fedora specific question, but this
spills into the JNI area so I though I'd bounce this question of
Fedora Java developers.

Some of my Java server side apps feature image databases and there is
a need to generate thumbnails for the images. Up to now I've been
using the JAI (Java Advanced Imaging) API, but I was never happy with
the results. The ImageMagick "convert" utility always produced much
better results.  After Googleing this topic I've come to the
conclusion that despite all the image manipulation APIs in the Java
standard, there is no way to produce a thumbnail of the same quality
as a  "convert -geometry 100x100" command. (Am I right in saying
this?).

So I've given up on a pure Java solution and I'm currently forking a
process running convert for thumbnail generation. Apart from
generating superior quality thumbnails, it also seems to be a more
memory-friendly solution. I've also looked at the JMagick JNI wrapper
for ImageMagic, but the simple fork technique has worked well so far
so I'm not sure if there is any huge advantage to using the JNI path
to ImageMagick.

My question is: does anyone have a better solution for thumbnail
generation? A platform neutral solution would be best, but I'm willing
to assume a Linux server failing that. The Java VM must be in headless
mode however as it's running on a server.

Thanks,

Joe.




More information about the fedora-devel-java-list mailing list