jpeg lossless decoding

Discussion in 'Java' started by Rajesh.Rapaka, Nov 14, 2006.

  1. Hi,

    I am unable to decode JPEG - Lossless Images. I have an array of JPEG -
    Losslessly encoded pixels. Earlier I used to use the following method:

    ByteArraySeekableStream seekIs = new ByteArraySeekableStream(
    compressed);
    ImageReader r = (ImageReader)
    ImageIO.getImageReadersByFormatName(
    "jpeg-lossless").next(); // this is where the error comes
    ParameterBlock pb = new ParameterBlock();
    pb.add(seekIs);
    pb.add(new Integer(0));
    pb.add(Boolean.FALSE);
    pb.add(Boolean.FALSE);
    pb.add(Boolean.FALSE);
    pb.add(null);
    pb.add(null);
    pb.add(null);
    pb.add(r);
    RenderedOp jpgOp = JAI.create("ImageRead", pb);
    bufferedImage = jpgOp.getAsBufferedImage();



    But I get the following error:

    java.util.NoSuchElementException

    at javax.imageio.spi.FilterIterator.next(ServiceRegistry.java:808)

    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:502)

    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:487)



    are there any simpler or new methods for this. Or is there any method
    to obtain planar / tiled image from jpeg - losslessly encoded pixels?

    Thanks in advance,
    Rajesh Rapaka.
     
    Rajesh.Rapaka, Nov 14, 2006
    #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. Chris Spencer

    Lossless Number Conversion

    Chris Spencer, Aug 28, 2005, in forum: Python
    Replies:
    3
    Views:
    316
    Raymond L. Buvel
    Aug 29, 2005
  2. Kurt Kaiser
    Replies:
    5
    Views:
    682
    John_H
    Nov 10, 2006
  3. Daniel Nogradi

    lossless transformation of jpeg images

    Daniel Nogradi, Oct 29, 2006, in forum: Python
    Replies:
    0
    Views:
    369
    Daniel Nogradi
    Oct 29, 2006
  4. lovaspillando
    Replies:
    0
    Views:
    1,064
    lovaspillando
    Aug 26, 2007
  5. Denkedran Joe
    Replies:
    15
    Views:
    724
Loading...

Share This Page