aspose file tools
The moose likes Other JSE/JEE APIs and the fly likes JAI blurry images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JAI blurry images" Watch "JAI blurry images" New topic

JAI blurry images

Tom Sullivan
Ranch Hand

Joined: Dec 20, 2005
Posts: 72
For anyone who knows JAI, could you help me out?

I have built a system that converts TIFF images to PNG or JPEG then outputs a byte[] of the images for loading in Flash. The TIFF images are too big though so when I sharpen them, I get an out of memory error. I have to scale them first. After I scale them, I have a series of sharpen matrixes that can be applied to the new image so that you can view it in Flash without distortion. Without sharpening, the images look terrible. But with sharpening, I get blurry (unreadable) text which I think is due to the scale. Below is an example of how I sharpen and scale. Anyone have any ideas on why these images would come out blurry?

If instead of subsamplebinarytogray, I just use "scale" I get a washed out image. If I try to sharpen without scaling, I get outofmemory. If I scale with subsamplebinarytogray, I get a blury image that's not sharpened. If I scale with subsamplebinarytogray and sharpen, I get a sharp blurry image. Any ideas? Original image size is 1728 X 2159.

I get the same problem whether I convert to JPEG or PNG.
[ July 10, 2006: Message edited by: Tom Sullivan ]
rocket mass heater kickstarter
subject: JAI blurry images