0

i have integer pixel array of an image with values like -1100791, -16777056 and so on.. tried with memoryimage source and toolkit method but the image obtained had colored dashes on black background. HOw to write an RGB image from pixel values.

1
  • 1
    Do you know how the pixel values are encoded in the int array? May 10, 2012 at 6:57

1 Answer 1

0

Try using WritableRaster.

1
  • thank u... :) g.drawImage( Toolkit.getDefaultToolkit().createImage( new MemoryImageSource(w, h, pix, 0, w)),0,(side*3)+1,null) ;worked for me... :) May 13, 2012 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.