4 Replies Latest reply: Dec 14, 2008 1:26 PM by DrClap RSS

    displaying an image in byte[] type

    807589
      hello

      I want to display byte data . But I was not able to do that.


      here is my code:
      ~~~~~~~~~~~
      byte[] imgByt2 = paintData.imgBytes; // **** I want to display this data

      BufferedImage img = new BufferedImage(paintData.getWidth(),
      paintData.getHeight(), BufferedImage.TYPE_INT_RGB);
      Graphics2D graphics2D = img.createGraphics();
                          
                          
      //graphics2D.drawChars(new String("DOGA").toCharArray(),0,9,40,15);

      ImageIO.write(img, "jpeg", out);
      ~~~~~~~~~~~~~~~~~~~
      what can I do to display byte data ?

      regards