views:

35

answers:

2

Actually I'm working with BufferedImages, that provide me pixel values in int type.

Do you know a Java object to represent an image that the pixel value in double or float type?

+1  A: 

I do know of an implementation off the top of my head, but you can use the SampleModel/WritableRaster to access bands independently and create your own backing however you like. It likely won't be much fun though. Although, I'd question the "access component (??) as a double/float" requirement (unless you're doing something fun like OpenGL 8-bit floats ... which don't map to Java floats anyway :-)

pst
+1  A: 

I'm not sure exactly what your end goal is, but you could look into java.awt.image.ColorModel . Either that or you could do your processing on a float[][]/double[][] and then round if you need to do something with your BufferedImage.

Seth