Hi my code is like this
BufferedImage img1=new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
for(int r=0; r<w; r++)
{
for(int c=0; c<h; c++)
{
img1.setRGB(0, 0, w, h, data,0,w);
}
}
ImageIO.write(img1,"jpg", new File("abc.jpg"));
I want to create image of width w and height h..I am having my pixel values in an int array called data(consists of combined rgb values)..ImageIO.write method creates the image but with different pixel values..please help me out..i tried very hardly..but still not getting..