[OpenJDK 2D-Dev] Issue with ImageIO for non-zero minY

Andrew Brygin Andrew.Brygin at Sun.COM
Thu Aug 7 11:57:29 UTC 2008

Hello Derek,

 I could not reproduce it with my tests.  I've tried various compression 
settings and it does not
  influence dimensions of the output jpeg image.

 Your test case is rather hard to run because it assumes particular 
image size. I am not big
  expert in JAI and failed to pick size that will work. Tried several 
sizes but keep getting JAI errors.

 What image dimensions have image from your test? Can you post your test 
image somethere?

 Ideally, can you rewrite your testcase to do not use JAI at all?  If 
this is ImageIO problem I'd
  expect it to be reproducible with ImageIO only.

Derek Chen-Becker wrote:
> Hi,
>     I have a piece of code that uses JAI to do some image ops and uses 
> ImageIO to load and store the source/results, respectively. Recently I 
> tried to set it up to use ImageWriteParam to override the default JPEG 
> compression. When I do that, the image gets truncated. You can see the 
> original thread (and a self-contained test code) here:
> http://forums.java.net/jive/thread.jspa?messageID=291068
> I tried the workaround of doing a transform of (-minX, -minY) right 
> after the crop and that fixed it, but it seems like that shouldn't be 
> a requirement.
> Thanks,
> Derek

More information about the 2d-dev mailing list