com.jniwrapper.win32.gdi
Class DIBitmap

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Pointer.Void
          extended by com.jniwrapper.win32.Handle
              extended by com.jniwrapper.win32.gdi.GdiObject
                  extended by com.jniwrapper.win32.gdi.Bitmap
                      extended by com.jniwrapper.win32.gdi.DIBitmap
All Implemented Interfaces:
com.jniwrapper.IntegerParameter, com.jniwrapper.PointerParameter

public class DIBitmap
extends Bitmap

This class provides functionality for working with bitmaps in DIB (device-independent bitmap ) format.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jniwrapper.win32.gdi.Bitmap
Bitmap.Compression, Bitmap.PredefinedBitmap
 
Nested classes/interfaces inherited from class com.jniwrapper.win32.gdi.GdiObject
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type
 
Field Summary
 
Fields inherited from class com.jniwrapper.win32.gdi.Bitmap
_builderFactory, BLACK_COLOR, CBM_INIT, DIB_PAL_COLORS, DIB_RGB_COLORS, FUNCTION_CREATEDIBITMAP, FUNCTION_GET_DIBITS, FUNCTION_SET_DIBITS, WHITE_COLOR
 
Fields inherited from class com.jniwrapper.win32.gdi.GdiObject
GDI_ERROR, HGDI_ERROR
 
Fields inherited from class com.jniwrapper.win32.Handle
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
Constructor Summary
DIBitmap()
          Creates instance of the DIBitmap.
DIBitmap(BitmapInfo bitmapInfo)
          Creates instance of the DIBitmap with the specified instance of the BitmapInfo
DIBitmap(DDBitmap ddBitmap)
          Creates instance of the DIBitmap from the instance of DDBitmap
DIBitmap(java.awt.Image image)
          Creates instance of the DIBitmap from the Image
DIBitmap(int width, int height)
          Creates instance of the DIBitmap with the specified width and height
DIBitmap(long value)
          Creates instance of the DIBitmap from the specified value
DIBitmap(java.lang.String fileName)
          Creates instance of the DIBitmap from the file
 
Method Summary
 BitmapInfo getBitmapInfo()
          Returns instance of the BitmapInfo of this bitmap
 BitmapInfoHeader getBitmapInfoHeader()
          Returns the BitmapInfo structure that contains information about the bitmap width, height, bits per pixel, total image size, number of colors in palette, and other information.
 BitmapStructure getBitmapStructure()
          Returns instance of BitmapStructure of this bitmap
 byte[] getBytes()
          Returns array of device independent bitmap bytes as byte array.
 DibSection getDIBSection()
          Returns instance of the DibSection of this bitmap
 com.jniwrapper.PrimitiveArray getDIBytes()
          Returns an array of device independent bitmap bytes as PrimitiveArray of UInt8.
 void loadFromFile(java.lang.String fileName)
          Load bitmap from the file
 void setDIBytes(com.jniwrapper.PrimitiveArray bytes)
          Sets bytes of the bitmap.
 DDBitmap toDDBitmap(DC dc)
          Creates and returns instance of the DDBitmap, initialized by this bitmap
 
Methods inherited from class com.jniwrapper.win32.gdi.Bitmap
createDIBSection, createDIBSection, deleteObject, getBitCount, getBitmapLineLength, getBytesCount, getDIBits, getDIBits, getHeight, getSize, getTransparentMask, getWidth, isTransparent, saveToFile, setDIBits, setSize, setTransparentMask, toImage
 
Methods inherited from class com.jniwrapper.win32.gdi.GdiObject
getObject, getObjectType
 
Methods inherited from class com.jniwrapper.win32.Handle
clone, closeHandle, equals, waitFor, waitFor
 
Methods inherited from class com.jniwrapper.Pointer.Void
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write
 
Methods inherited from class com.jniwrapper.Parameter
, a, a, acceptIOPerformer, asReturnValue, b, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DIBitmap

public DIBitmap()
Creates instance of the DIBitmap.


DIBitmap

public DIBitmap(long value)
Creates instance of the DIBitmap from the specified value

Parameters:
value - Value of the Handle instance then specifies bitmap

DIBitmap

public DIBitmap(int width,
                int height)
Creates instance of the DIBitmap with the specified width and height

Parameters:
width - Width of the bitmap
height - Height of the bitmap

DIBitmap

public DIBitmap(DDBitmap ddBitmap)
Creates instance of the DIBitmap from the instance of DDBitmap

Parameters:
ddBitmap - The instance of DDBitmap

DIBitmap

public DIBitmap(BitmapInfo bitmapInfo)
Creates instance of the DIBitmap with the specified instance of the BitmapInfo

Parameters:
bitmapInfo - instance of the BitmapInfo that defines the dimensions and color information for a device independent bitmap

DIBitmap

public DIBitmap(java.lang.String fileName)
Creates instance of the DIBitmap from the file

Parameters:
fileName - The name of the bitmap file

DIBitmap

public DIBitmap(java.awt.Image image)
Creates instance of the DIBitmap from the Image

Parameters:
image - Instance of the Image
Method Detail

loadFromFile

public void loadFromFile(java.lang.String fileName)
Load bitmap from the file

Specified by:
loadFromFile in class Bitmap
Parameters:
fileName - The name of the bitmap file

getBitmapInfoHeader

public BitmapInfoHeader getBitmapInfoHeader()
Returns the BitmapInfo structure that contains information about the bitmap width, height, bits per pixel, total image size, number of colors in palette, and other information.

Specified by:
getBitmapInfoHeader in class Bitmap
Returns:
BitmapInfo structure that contains various information about bitmap.

getBitmapStructure

public BitmapStructure getBitmapStructure()
Returns instance of BitmapStructure of this bitmap

Returns:
Instance of BitmapStructure of this bitmap

getBitmapInfo

public BitmapInfo getBitmapInfo()
Returns instance of the BitmapInfo of this bitmap

Specified by:
getBitmapInfo in class Bitmap
Returns:
Instance of the BitmapInfo of this bitmap

getDIBSection

public DibSection getDIBSection()
Returns instance of the DibSection of this bitmap

Returns:
Instance of the DibSection of this bitmap

toDDBitmap

public DDBitmap toDDBitmap(DC dc)
Creates and returns instance of the DDBitmap, initialized by this bitmap

Parameters:
dc - Device contexts
Returns:
Instance of the DDBitmap, initialized by this bitmap

getDIBytes

public com.jniwrapper.PrimitiveArray getDIBytes()
Returns an array of device independent bitmap bytes as PrimitiveArray of UInt8.

Specified by:
getDIBytes in class Bitmap
Returns:
array of bitmap bytes.

getBytes

public byte[] getBytes()
Returns array of device independent bitmap bytes as byte array.

Specified by:
getBytes in class Bitmap
Returns:
array of bitmap bytes.

setDIBytes

public void setDIBytes(com.jniwrapper.PrimitiveArray bytes)
Sets bytes of the bitmap.

Specified by:
setDIBytes in class Bitmap
Parameters:
bytes - Bytes of the bitmap