public final class BitmapData extends Object
Specifies the attributes of a bitmap image. The BitmapData class is used by the
E:Bitmap.LockBits and M:Bitmap.UnlockBits(BitmapData)
methods of the Bitmap class. Not inheritable.
| Constructor and Description |
|---|
BitmapData() |
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight()
Gets the pixel height of the
Bitmap object. |
int |
getPixelFormat()
Gets the format of the pixel information in the
Bitmap object that returned this
BitmapData object. |
int[] |
getScan0()
Gets the address of the first pixel data in the bitmap.
|
int |
getStride()
Gets the stride width (also called scan width) of the
Bitmap object. |
int |
getWidth()
Gets the pixel width of the
Bitmap object. |
void |
setHeight(int value)
Sets the pixel height of the
Bitmap object. |
void |
setPixelFormat(int value)
Sets the format of the pixel information in the
Bitmap object that returned this
BitmapData object. |
void |
setScan0(int[] value)
Sets the address of the first pixel data in the bitmap.
|
void |
setStride(int value)
Sets the stride width (also called scan width) of the
Bitmap object. |
void |
setWidth(int value)
Sets the pixel width of the
Bitmap object. |
public int getWidth()
Gets the pixel width of the Bitmap object.
This can also be thought of as the number of pixels in one scan line.
Bitmap object.public void setWidth(int value)
Sets the pixel width of the Bitmap object.
This can also be thought of as the number of pixels in one scan line.
value - the pixel width of the Bitmap object.public int getHeight()
Gets the pixel height of the Bitmap object.
Also sometimes referred to as the number of scan lines.
Bitmap object.public void setHeight(int value)
Sets the pixel height of the Bitmap object.
Also sometimes referred to as the number of scan lines.
value - the pixel height of the Bitmap object.public int getStride()
Gets the stride width (also called scan width) of the Bitmap object.
Bitmap object.public void setStride(int value)
Sets the stride width (also called scan width) of the Bitmap object.
value - the stride width (also called scan width) of the Bitmap object.public int getPixelFormat()
Gets the format of the pixel information in the Bitmap object that returned this
BitmapData object.
PixelFormat(BitmapData.getPixelFormat()/BitmapData.setPixelFormat(int)) that specifies the format of the pixel information in the associated
Bitmap object.public void setPixelFormat(int value)
Sets the format of the pixel information in the Bitmap object that returned this
BitmapData object.
value - the format of the pixel information in the Bitmap object that returned this
BitmapData object.public int[] getScan0()
Gets the address of the first pixel data in the bitmap. This can also be thought of as the first scan line in the bitmap.
public void setScan0(int[] value)
Sets the address of the first pixel data in the bitmap. This can also be thought of as the first scan line in the bitmap.
value - the address of the first pixel data in the bitmap.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.