Posting a summary in case someone else down the line comes across the
same issue.

I discovered that the problem was with my source TIFFs.  Most of them
were created with 16-bit color depth, and the Java image libraries
apparently can't handle that.  I converted them to 8-bits per channel
(well, really just the one since these were all grayscale) and they all
look great now.


On Wed, 2008-08-20 at 15:29 -0500, Grimland, Courtney wrote:
> I'm using DSpace 1.4, and don't have the option to upgrade at the
> moment, so hopefully someone can help me with the older version.
> 
> I'm having a hard time trying to figure out how to make decent-looking
> previews and thumbnails.  This particular collection I'm working on is
> a
> bunch of scans of black-and-white photographs, in TIFF format.  I've
> got
> the jai-imageio libraries installed and added TIFF to the JPEGFilter
> and
> BrandedPreviewJPEGFilter inputFormats.  The filter-media script is
> creating the thumbnails and previews, but they just look like snow.
> 
> I'm not rally a java person, so after a little Googling I tried
> specifying different combinations of interpolation, dithering, and
> rendering values in JPEGFilter.java, for example:
> 
> <...>
> import java.awt.RenderingHints;
> <...>
>         // now render the image into the thumbnail buffer
>         Graphics2D g2d = thumbnail.createGraphics();
>         g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
>                 RenderingHints.VALUE_INTERPOLATION_BICUBIC);
>         g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
>                 RenderingHints.VALUE_RENDER_QUALITY);
>         g2d.setRenderingHint(RenderingHints.KEY_DITHERING,
>                 RenderingHints.VALUE_DITHER_DISABLE);
>         g2d.drawImage(buf, 0, 0, (int) xsize, (int) ysize, null);
> <...>
> 
> But the resulting previews and thumbnails always look like snow.  I
> just
> don't know where or how to specify a different resampling method.
> 
> 
> Examples:
> 
> This is actually a JPG scaled down in Gimp, to get the idea of the
> original 44MB TIFF:
> http://rocky.uta.edu/grimland/images/orig.jpg
> 
> This is the preview JPG crated by MediaFilterManager:
> http://rocky.uta.edu/grimland/images/preview.jpg
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ DSpace-tech mailing list 
> DSpace-tech@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to