1 Reply Latest reply on Mar 22, 2010 10:44 AM by 843802

    How to reduce the size of a jpeg2000 image ?

      Hi all,

      I use Java ImageIO to :
      - create JPEG images from JPEG2000 images
      - create JPEG2000 images from JPEG images

      The transformation JPEG2000 to JPEG works fine. The transformation JPEG to JPEG2000 works too, but the JPEG2000 images that I get have a size too big.
      => For a JPEG image 640x480 with a size 43 Kb, I get a JPEG2000 image with a size 170 Kb
      => For a JPEG image 800x600 with a size 66 Kb, I get a JPEG2000 image with a size 276 Kb

      I tried to change many parameters in the J2KImageWriteParam object :
      final J2KImageWriteParam paramJ2K = new J2KImageWriteParam();
      //      paramJ2K.setWriteCodeStreamOnly(true);
      //      paramJ2K.setComponentTransformation(true);
      //      paramJ2K.setProgressionType("res"); //Resolution-Layer-Component-Position
      //      paramJ2K.setProgressionType("layer"); //Layer-Resolution-Component-Position
      //      paramJ2K.setProgressionType("res-pos"); //Resolution-Position-Component-Layer
      //      paramJ2K.setProgressionType("pos-comp"); //Position-Component-Resolution-Layer
      //      paramJ2K.setProgressionType("comp-pos"); //Component-Position-Resolution-Layer 
      But, whatever the values, I still have the same size.
      Can someone help me please ?
        • 1. Re: How to reduce the size of a jpeg2000 image ?
          I found a solution, for those interested :
          I change filter to have this :
          So I get a JPEG2000 with very good quality and a size ~40 Kb.
          Nevertheless, whatever the value I set for compression quality and encoding rate, it has no effect on the quality and the size of the JPEG2000 image, I don't know why...