Code example for DataBufferFloat

Methods: getDataType

0
        RgbeInfo info = new RgbeInfo( byteSource );
 
        try { 
            // It is necessary to create our own BufferedImage here as the 
            // org.apache.sanselan.common.IBufferedImageFactory interface does not expose this complexity 
            DataBuffer buffer = new DataBufferFloat( info.getPixelData(), info.getWidth() * info.getHeight() );
 
            return new BufferedImage(
                new ComponentColorModel( ColorSpace.getInstance( ColorSpace.CS_sRGB ),
                                         false, 
                                         false, 
                                         Transparency.OPAQUE,
                                         buffer.getDataType() ),
                Raster.createWritableRaster( new BandedSampleModel( buffer.getDataType(),
                                                                    info.getWidth(),
                                                                    info.getHeight(),
                                                                    3 ), 
                                             buffer,
                                             new Point() ),
                false,