3 Replies Latest reply: Feb 22, 2010 2:20 AM by 793415 RSS

    setEncodingRate() method of j2kparam class

    843802
      Hi

      i am using setEncodingRate method to encode an image to jpeg2000 but the value is not making any difference in the output image filesize and even the image. Every time the compression ratio (size of raw image file/size of jp2 file) is coming out to be same with different values of encoding rate. And the compression ratio is in thousands( Image of 2000000 bytes is compressed to 707 bytes (with 5 decomposition levels)). How can i get images of different quality.

      Plz help me out.i will be thankful to you.

      Preeti
        • 1. Re: setEncodingRate() method of j2kparam class
          793415
          Sub: setEncodingRate() method of j2kparam class

          Did you mean [J2KImageWriteParam|http://download.java.net/media/jai-imageio/javadoc/1.1/com/sun/media/imageio/plugins/jpeg2000/J2KImageWriteParam.html]? If so, then please type it correctly, rather than make your reader guess.
          Preeti19 wrote:
          ..i am using setEncodingRate method to encode an image to jpeg2000 but the value is not making any difference in the output image filesize and even the image. Every time the compression ratio (size of raw image file/size of jp2 file) is coming out to be same with different values of encoding rate. And the compression ratio is in thousands( Image of 2000000 bytes is compressed to 707 bytes (with 5 decomposition levels)). How can i get images of different quality.
          Questions in English should end with a question mark '?'. Questions in English in forums should definitely end in a question mark, to help those people who are scanning the text quickly, looking for ways to help. You would not want to make it harder for someone to help, would you?
          Plz help me out.
          Please take the effort to spell words correctly, or to put that a different way, [write well|http://catb.org/~esr/faqs/smart-questions.html#writewell].
          ..i will be thankful to you.
          I prefer people put thought/effort into the types of things I mentioned in my reply, than that they promise to be 'thankful'.
          • 2. Re: setEncodingRate() method of  J2KImageWriteParam class
            843802
            Yes, it is J2KImageWriteParam class.
            Sorry for the mistake.

            How to specify the correct values for encoding rate (in setEncodingRate()) so that images with different quality can be achieved?


            Preeti
            • 3. Re: setEncodingRate() method of  J2KImageWriteParam class
              793415
              Preeti19 wrote:
              Yes, it is J2KImageWriteParam class.
              Sorry for the mistake.
              If you try to be accurate in future, that will be far better than any apology.
              How to specify the correct values for encoding rate (in setEncodingRate()) so that images with different quality can be achieved?
              Actually I have no idea. The only time I've used JAI was via Ant, and it did not go into the kind of details needed to answer your question. I just know how to use Google well enough to guess the correct class names of methods. ;)