| Modifier and Type | Class and Description |
|---|---|
static class |
Bitmap.Compression
Class Compression represents compression level enumeration.
|
static class |
Bitmap.PredefinedBitmap
Class PredefinedBitmap enumeration represents predefined windows bitmaps.
|
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type| Modifier and Type | Field and Description |
|---|---|
protected static BitmapBuilderFactory |
_builderFactory |
protected static int |
BLACK_COLOR |
protected static int |
CBM_INIT
Initialize bitmap.
|
protected static int |
DIB_PAL_COLORS
Color table in palette indixes.
|
protected static int |
DIB_RGB_COLORS
Color table in RGB.
|
protected static java.lang.String |
FUNCTION_CREATEDIBITMAP |
protected static java.lang.String |
FUNCTION_GET_DIBITS |
protected static java.lang.String |
FUNCTION_SET_DIBITS |
protected static int |
WHITE_COLOR |
GDI_ERROR, HGDI_ERRORINFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0| Modifier and Type | Method and Description |
|---|---|
void |
createDIBSection(DIBitmap result,
DC hdc,
BitmapInfo bitmapInfo,
int colorModel,
com.jniwrapper.Pointer ppvBits,
Handle hSection,
int dwOffset)
Creates a handle to device independent bitmap (DIB).
|
void |
createDIBSection(DIBitmap result,
com.jniwrapper.Pointer ppvBits,
BitmapInfo bitmapInfo)
Creates a handle to device independent bitmap (DIB).
|
void |
deleteObject()
Deletes the object.
|
int |
getBitCount()
Returns the number of bits per pixel.
|
abstract BitmapInfo |
getBitmapInfo() |
abstract BitmapInfoHeader |
getBitmapInfoHeader() |
int |
getBitmapLineLength()
Return number of pixels in line.
|
abstract byte[] |
getBytes()
Returns array of device independent bitmap bytes as byte array.
|
protected static int |
getBytesCount(int height,
int width,
int bitPerPixel)
Return number of bytes in bitmap
|
long |
getDIBits(DC dc,
int startScan,
int scanLines,
com.jniwrapper.Pointer.Void bits,
BitmapInfo bitmapInfo,
int colorModelType)
Returns bits of a bitmap.
|
long |
getDIBits(DC dc,
int startScan,
int scanLines,
com.jniwrapper.Pointer bits,
BitmapInfo bitmapInfo,
int colorModelType)
Returns bits of a bitmap.
|
abstract com.jniwrapper.PrimitiveArray |
getDIBytes()
Deprecated.
use {#getBytes} method to obtain byte array of image
|
int |
getHeight()
Returns bitmap height in pixels.
|
Size |
getSize()
Return bitmap size as an Size object instance.
|
Bitmap |
getTransparentMask()
Returns transparancy bitmap mask.
|
int |
getWidth()
Returns bitmap width.
|
boolean |
isTransparent()
Returns true if a transparent bitmap.
|
abstract void |
loadFromFile(java.lang.String fileName) |
void |
saveToFile(java.lang.String fileName)
Saves bitmap to the specified file.
|
long |
setDIBits(DC dc,
int startScan,
int scanLines,
com.jniwrapper.Pointer bits,
BitmapInfo bitmapInfo,
int colorModelType)
Sets bits for a bitmap.
|
abstract void |
setDIBytes(com.jniwrapper.PrimitiveArray bytes)
Sets bytes of the bitmap.
|
protected void |
setSize(int width,
int height)
Sets bitmap size in pixels.
|
protected void |
setTransparentMask(java.awt.Image transparentMask)
Sets transparency mask using input image.
|
java.awt.image.BufferedImage |
toImage()
Converts windows Bitmap to
BufferedImage. |
getObject, getObjectTypeclone, closeHandle, equals, waitFor, waitForasFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, writeprotected static final BitmapBuilderFactory _builderFactory
protected static final java.lang.String FUNCTION_GET_DIBITS
protected static final java.lang.String FUNCTION_SET_DIBITS
protected static final java.lang.String FUNCTION_CREATEDIBITMAP
protected static final int BLACK_COLOR
protected static final int WHITE_COLOR
protected static final int DIB_RGB_COLORS
protected static final int DIB_PAL_COLORS
protected static final int CBM_INIT
public long setDIBits(DC dc, int startScan, int scanLines, com.jniwrapper.Pointer bits, BitmapInfo bitmapInfo, int colorModelType)
dc - dc compatible with a bitmap.startScan - start scanline in a bitmap.scanLines - the number of scanlines in a bitmap.bits - a pointer to PrimitiveArray of UInt8 (result bits).bitmapInfo - BitmapInfo structure describing a bitmap.colorModelType - a type of color model.public long getDIBits(DC dc, int startScan, int scanLines, com.jniwrapper.Pointer bits, BitmapInfo bitmapInfo, int colorModelType)
dc - dc compatible with a bitmap.startScan - start scanline in bitmap.scanLines - the number of scanlines in a bitmap.bits - a pointer to PrimitiveArray of UInt8 (result bits).bitmapInfo - BitmapInfo structure describing a bitmap.colorModelType - a type of color model.public long getDIBits(DC dc, int startScan, int scanLines, com.jniwrapper.Pointer.Void bits, BitmapInfo bitmapInfo, int colorModelType)
dc - dc compatible with a bitmap.startScan - start scanline in bitmap.scanLines - the number of scanlines in a bitmap.bits - a pointer to PrimitiveArray of UInt8 (result bits).bitmapInfo - BitmapInfo structure describing a bitmap.colorModelType - a type of color model.protected void setSize(int width,
int height)
width - height - public Size getSize()
public int getWidth()
public int getHeight()
public void createDIBSection(DIBitmap result, com.jniwrapper.Pointer ppvBits, BitmapInfo bitmapInfo)
result - [out] is a handle to DIB.ppvBits - [out] is a pointer to the location of bits in DIB section.bitmapInfo - [in] describes source DDBitmap.public void createDIBSection(DIBitmap result, DC hdc, BitmapInfo bitmapInfo, int colorModel, com.jniwrapper.Pointer ppvBits, Handle hSection, int dwOffset)
result - [out] is a handle to DIB.hdc - [in] is a handle to the DC of source DDBitmap.bitmapInfo - [in] describes source DDBitmap.colorModel - [in] is the type of color model.ppvBits - [out] is a pointer to the location of bits in DIB section.hSection - [in] is a hable to DIB section.dwOffset - [in] is an offset of bits location in DIB section.public int getBitCount()
protected void setTransparentMask(java.awt.Image transparentMask)
transparentMask - - an imagepublic Bitmap getTransparentMask()
public boolean isTransparent()
public void deleteObject()
deleteObject in class GdiObjectpublic java.awt.image.BufferedImage toImage()
BufferedImage.protected static int getBytesCount(int height,
int width,
int bitPerPixel)
height - - number of lineswidth - - number of rowsbitPerPixel - - number of bits on pixelpublic int getBitmapLineLength()
public void saveToFile(java.lang.String fileName)
throws java.io.IOException
fileName - path to the file where the bitmap will be saved.java.io.IOExceptionpublic abstract BitmapInfoHeader getBitmapInfoHeader()
public abstract BitmapInfo getBitmapInfo()
public abstract void loadFromFile(java.lang.String fileName)
public abstract com.jniwrapper.PrimitiveArray getDIBytes()
public abstract byte[] getBytes()
public abstract void setDIBytes(com.jniwrapper.PrimitiveArray bytes)
bytes -