Wrong image size of JPG after TIFF to JPG conversion with JAI

Discussion in 'Java' started by Roland, May 12, 2004.

  1. Roland

    Roland Guest

    Hello,

    I am generating JPGs out of a TIFF from a fax server using JAI - the
    problem is the strange dimension of the JPGs.

    The TIFF contains for example 2 pages with size 1728 x 2382 (image
    info from different image viewer).
    The generated JPGs has both the size 1728 x 1131 ! The heigth is
    wrong (almost half of original size) and the resulting JPG shows the
    original page streched.

    I am using the following code:

    ImageDecoder dec = ImageCodec.createImageDecoder(
    "tiff", new FileSeekableStream(new File(fnTiff)), null);
    for (int i = 0; i < dec.getNumPages(); i++) {
    RenderedOp op =
    JAI.create(
    "filestore", dec.decodeAsRenderedImage(i), i + ".jpg", "jpeg");
    }

    Where is the error? Do I have to define something more?


    Any hints are welcome :)

    Bye,
    Roland.
     
    Roland, May 12, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chuck Taylor
    Replies:
    1
    Views:
    8,355
    Chuck Taylor
    Sep 4, 2003
  2. cyril
    Replies:
    1
    Views:
    817
    cyril
    Sep 8, 2003
  3. surendra
    Replies:
    1
    Views:
    8,470
    dipakPardesi
    Jun 21, 2008
  4. atusc
    Replies:
    1
    Views:
    4,253
  5. dwilson
    Replies:
    0
    Views:
    1,237
    dwilson
    Apr 8, 2005
Loading...

Share This Page