Java 8 DataBufferFloat - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DataBufferFloat class.

This code example shows how to use the following methods:getDataType
        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, 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
	@Override 
	protected DataBufferFloat createDataBuffer( final FloatArray data ) 
	{ 
		final float[] sourceArray = data.getCurrentStorageArray(); 
		return new DataBufferFloat( sourceArray, sourceArray.length ); 
	} 
 
} 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
      case DataBuffer.TYPE_USHORT:
	return new DataBufferUShort(size, numBanks);
      case DataBuffer.TYPE_INT:
	return new DataBufferInt(size, numBanks);
      case DataBuffer.TYPE_FLOAT:
	return new DataBufferFloat(size, numBanks);
      case DataBuffer.TYPE_DOUBLE:
	return new DataBufferDouble(size, numBanks);
      default: 
	throw new UnsupportedOperationException();
      } 
  } 
   
  /** 
   * Create a data buffer of a particular type. 
   * 
   * @param dataType the desired data type of the buffer 
   * @param data an array containing the data 
   * @param size the size of the data buffer bank 
   */ 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 DataBufferFloat Methods: