public class TextureData
extends java.lang.Object
| Constructor and Description |
|---|
TextureData()
Constructor of
TextureData |
TextureData(int width,
int height,
int stride,
int bytesPerPixel,
int pixelFormat,
byte[] data)
Constructor of
TextureData |
TextureData(int width,
int height,
int stride,
int bytesPerPixel,
PixelFormat pixelFormat,
byte[] data)
Constructor of
TextureData |
| Modifier and Type | Method and Description |
|---|---|
static TextureData |
fromBitmap(java.awt.image.BufferedImage bitmap)
Convert a
BufferedImage to TextureData |
static TextureData |
fromFile(java.lang.String fileName)
Load a texture from file
|
static TextureData |
fromStream(com.aspose.threed.Stream stream)
Load a texture from stream
|
int |
getBytesPerPixel()
Number of bytes of a pixel
|
byte[] |
getData()
Raw bytes of pixel data
|
int |
getHeight()
Number of vertical pixels
|
PixelFormat |
getPixelFormat()
The pixel's format
|
int |
getStride()
Number of bytes of a scanline.
|
int |
getWidth()
Number of horizontal pixels
|
java.awt.image.BufferedImage |
toBitmap()
Convert the TextureData to a
BufferedImage instance. |
public TextureData(int width,
int height,
int stride,
int bytesPerPixel,
int pixelFormat,
byte[] data)
TextureDatawidth - height - stride - bytesPerPixel - pixelFormat - data - public TextureData(int width,
int height,
int stride,
int bytesPerPixel,
PixelFormat pixelFormat,
byte[] data)
TextureDatawidth - height - stride - bytesPerPixel - pixelFormat - data - public TextureData()
TextureDatapublic byte[] getData()
public int getWidth()
public int getHeight()
public int getStride()
public int getBytesPerPixel()
public PixelFormat getPixelFormat()
public static TextureData fromBitmap(java.awt.image.BufferedImage bitmap)
BufferedImage to TextureDatabitmap - public java.awt.image.BufferedImage toBitmap()
BufferedImage instance.public static TextureData fromStream(com.aspose.threed.Stream stream)
stream - public static TextureData fromFile(java.lang.String fileName) throws java.io.IOException
fileName - java.io.IOException