0

I do have two BufferedImage objects. The first one has the following parameters:

BufferedImage@3fb397fb: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@64594484 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 250 height = 250 #numDataElements 3 dataOff[0] = 2

The second one has:

BufferedImage@22ee5f73: type = 6 ColorModel: #pixelBits = 32 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@64594484 transparency = 3 has alpha = true isAlphaPre = false ByteInterleavedRaster: width = 250 height = 250 #numDataElements 4 dataOff[0] = 3

How can I make them compatible if they are two different picture?

Qube Mind
  • 11
  • 3
  • 1
    What have you tried so far to make them compatible? How did it work out (or not)? – Robert Rossmann Jan 11 '15 at 00:50
  • Where do these BufferedImages come from (eg. from a file etc.)? – David Frank Jan 11 '15 at 00:55
  • The one image comes from a file and the second one is from camera. I am converting those into a matrix and because of numComponents = 4, the first one has 187500 length, and the second one has 250000. – Qube Mind Jan 11 '15 at 01:17
  • The BufferedType, which is labeled as "type = 6" was originally saved as a bitmap "Bitmap.Config ARGB_8888". I need to convert loaded images to the similar format. – Qube Mind Jan 11 '15 at 01:41
  • possible duplicate of [Converting a BufferedImage to another type](http://stackoverflow.com/questions/8194080/converting-a-bufferedimage-to-another-type) – Harald K Jan 12 '15 at 13:42

0 Answers0