public class Bitmap
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
protected boolean |
swigCMemOwn |
构造器和说明 |
---|
Bitmap(BinaryData pixelData,
long width,
long height,
ColorFormat colorFormat,
int bytesPerRow)
Constructs a bitmap from an already decoded vector of bytes.
|
Bitmap(long cPtr,
boolean cMemoryOwn) |
限定符和类型 | 方法和说明 |
---|---|
void |
compressForGL() |
BinaryData |
compressToInternal()
Compresses this bitmap to a internal format.
|
BinaryData |
compressToPng()
Compresses this bitmap to a png.
|
static Bitmap |
createFromCompressed(BinaryData compressedData)
Creates a new bitmap from compressed byte vector.
|
void |
delete() |
boolean |
equals(java.lang.Object obj)
Checks if this object is equal to the specified object.
|
protected void |
finalize() |
long |
getBytesPerPixel()
Returns the bytes per pixel parameter of this bitmap.
|
ColorFormat |
getColorFormat()
Returns the color format of this bitmap.
|
static long |
getCPtr(Bitmap obj) |
long |
getHeight()
Returns the height of the bitmap.
|
Bitmap |
getPaddedBitmap(int xPadding,
int yPadding)
Returns paddedsub-bitmap with specified offsets and dimensions.
|
BinaryData |
getPixelData()
Returns a copy of the pixel data of this bitmap.
|
Bitmap |
getResizedBitmap(long width,
long height)
Returns resized version of the bitmap.
|
Bitmap |
getRGBABitmap()
Returns copy of the bitmap converted to RGBA format.
|
Bitmap |
getSubBitmap(int xOffset,
int yOffset,
int width,
int height)
Returns sub-bitmap with specified offsets and dimensions.
|
long |
getWidth()
Returns the width of the bitmap.
|
int |
hashCode()
Returns the hash value of this object.
|
void |
preMultipliedAlpha() |
void |
update(int xOffset,
int yOffset,
Bitmap bitMap) |
public Bitmap(long cPtr, boolean cMemoryOwn)
public Bitmap(BinaryData pixelData, long width, long height, ColorFormat colorFormat, int bytesPerRow)
pixelData
- A vector of decoded, premultiplied bitmap bytes.width
- The width of the bitmap.height
- The height of the bitmap.colorFormat
- The color format of the bitmap.bytesPerRow
- The total number of bytes per row. Some bitmaps have additional padding at the end of each row. If the value is negative, then bitmap is assumed to be vertically flipped. In this case absolute value of the bytesPerRow value is used.public static long getCPtr(Bitmap obj)
protected void finalize()
finalize
在类中 java.lang.Object
public void delete()
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
obj
- The reference object.public int hashCode()
hashCode
在类中 java.lang.Object
public long getWidth()
public long getHeight()
public ColorFormat getColorFormat()
public long getBytesPerPixel()
public BinaryData getPixelData()
public BinaryData compressToPng()
public BinaryData compressToInternal()
public Bitmap getResizedBitmap(long width, long height)
width
- The new width of this bitmap.height
- The new height of this bitmap.public Bitmap getSubBitmap(int xOffset, int yOffset, int width, int height)
xOffset
- X coordinate offset in the bitmap.yOffset
- Y coordinate offset in the bitmap.width
- Width of the sub-bitmap.height
- Height of the sub-bitmap.public Bitmap getPaddedBitmap(int xPadding, int yPadding)
xPadding
- Padding along X coordinate. If negative value is used, the bitmap is padded from the left. By default, bitmap is padded from the right.yPadding
- Padding along Y coordinate. If negative value is used, the bitmap is padded from the top. By default, bitmap is padded from the bottom.public Bitmap getRGBABitmap()
public static Bitmap createFromCompressed(BinaryData compressedData)
compressedData
- The compressed bitmap data.public void preMultipliedAlpha()
public void compressForGL()
public void update(int xOffset, int yOffset, Bitmap bitMap)