3 Replies Latest reply: Mar 15, 2013 8:09 AM by gimbal2 RSS

    Re: How to read large images in Java ??

    997156
      Hello,
      I originally hijacked someone else's forum thread to ask my own vaguely similar question (both talk about "images" but that's the extent of the similarity).
      I wasn't trying to help that other person, but just splashed my post into their forum thread. Thankfully a kind forum moderator has split my post away to let it stand on its own merits.

      My question is ...


      .
      I am getting a response from webservice in the form of Base64 byte array. Now I need to convert the Base64 byte array to bitmap image. The converted image size should be 600 * 400 and without losing resolution of the image. Really appreciate if anybody can help on this.
        • 1. Re: How to read large images in Java ??
          gimbal2
          One problem at a time. You need to decode Base64 data first. Do you know how?

          If the answer is no: why not? Google "java base64 decode".
          • 2. How to convert the size of BMP image
            997156
            I am having the bitmap image of dimensions 812*1218, I want to resize the image dimensions to 400*600 without losing the clarity/resolution of the image using java code. Appreciate if anybody can help on this!
            • 3. Re: How to convert the size of BMP image
              gimbal2
              994153 wrote:
              I am having the bitmap image of dimensions 812*1218, I want to resize the image dimensions to 400*600 without losing the clarity/resolution of the image using java code. Appreciate if anybody can help on this!
              You can't - the resize is going to alter the resolution whether you like it or not. You can do a best effort only which is going to have varying results depending on the image. Do a google for "java2d scaling quality" to find information related to it, I'm not going to repeat that which has already been asked and answered countless times. Feel free to visit when you have a problem that can't be answered with at least a tiny bit of research.