public class DIBitmap extends Bitmap
Bitmap.Compression, Bitmap.PredefinedBitmap
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type
_builderFactory, BLACK_COLOR, CBM_INIT, DIB_PAL_COLORS, DIB_RGB_COLORS, FUNCTION_CREATEDIBITMAP, FUNCTION_GET_DIBITS, FUNCTION_SET_DIBITS, WHITE_COLOR
GDI_ERROR, HGDI_ERROR
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0
Constructor and Description |
---|
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 |
Modifier and Type | Method and Description |
---|---|
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 |
createDIBSection, createDIBSection, deleteObject, getBitCount, getBitmapLineLength, getBytesCount, getDIBits, getDIBits, getHeight, getSize, getTransparentMask, getWidth, isTransparent, saveToFile, setDIBits, setSize, setTransparentMask, toImage
getObject, getObjectType
clone, closeHandle, equals, waitFor, waitFor
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write
public DIBitmap()
DIBitmap
.public DIBitmap(long value)
DIBitmap
from the specified valuevalue
- Value of the Handle
instance then specifies bitmappublic DIBitmap(int width, int height)
DIBitmap
with the specified width and heightwidth
- Width of the bitmapheight
- Height of the bitmappublic DIBitmap(DDBitmap ddBitmap)
DIBitmap
from the instance of DDBitmap
ddBitmap
- The instance of DDBitmap
public DIBitmap(BitmapInfo bitmapInfo)
DIBitmap
with the specified instance of the BitmapInfo
bitmapInfo
- instance of the BitmapInfo
that defines the dimensions and color
information for a device independent bitmappublic DIBitmap(java.lang.String fileName)
DIBitmap
from the filefileName
- The name of the bitmap filepublic DIBitmap(java.awt.Image image)
DIBitmap
from the Image
image
- Instance of the Image
public void loadFromFile(java.lang.String fileName)
loadFromFile
in class Bitmap
fileName
- The name of the bitmap filepublic BitmapInfoHeader getBitmapInfoHeader()
getBitmapInfoHeader
in class Bitmap
public BitmapStructure getBitmapStructure()
BitmapStructure
of this bitmapBitmapStructure
of this bitmappublic BitmapInfo getBitmapInfo()
BitmapInfo
of this bitmapgetBitmapInfo
in class Bitmap
BitmapInfo
of this bitmappublic DibSection getDIBSection()
DibSection
of this bitmapDibSection
of this bitmappublic DDBitmap toDDBitmap(DC dc)
DDBitmap
, initialized by this bitmapdc
- Device contextsDDBitmap
, initialized by this bitmappublic com.jniwrapper.PrimitiveArray getDIBytes()
getDIBytes
in class Bitmap
public byte[] getBytes()
public void setDIBytes(com.jniwrapper.PrimitiveArray bytes)
setDIBytes
in class Bitmap
bytes
- Bytes of the bitmap