Package icyllis.arc3d.core
Class Image
java.lang.Object
icyllis.arc3d.core.RefCnt
icyllis.arc3d.core.Image
- All Implemented Interfaces:
RefCounted
- Direct Known Subclasses:
GraniteImage
,RasterImage
Image describes a two-dimensional array of pixels to draw. The pixels may be
decoded in a raster bitmap, encoded in a Picture or compressed data stream,
or located in GPU memory as a GPU texture.
Image cannot be modified after it is created. Image may allocate additional storage as needed; for instance, an encoded Image may decode when drawn.
Image width and height are greater than zero. Creating an Image with zero width or height returns Image equal to null.
Image may be created from Bitmap, Pixmap, Surface, Picture, encoded streams, GPU texture, YUV_ColorSpace data, or hardware buffer. Encoded streams supported include BMP, GIF, JPEG, PNG, WBMP, TGA, PSD, HDR, PNM, PIC, TIFF.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
final void
final void
final ColorSpace
final int
final int
Returns the full height of this image.final ImageInfo
getInfo()
long
final UniqueID
Returns object unique to image.final int
getWidth()
Returns the full width of this image.final boolean
boolean
boolean
Methods inherited from class icyllis.arc3d.core.RefCnt
create, create, deallocate, getRefCnt, getRefCntAcquire, getRefCntVolatile, move, move, ref, unique, unref
-
Field Details
-
mInfo
-
mUniqueID
-
-
Constructor Details
-
Image
-
-
Method Details
-
getInfo
-
getWidth
public final int getWidth()Returns the full width of this image.- Returns:
- image width in pixels
-
getHeight
public final int getHeight()Returns the full height of this image.- Returns:
- image height in pixels
-
getBounds
-
getBounds
-
getUniqueID
Returns object unique to image. Image contents cannot change after Image is created. Any operation to create a new Image will receive generate a new unique object.- Returns:
- unique identifier
-
getColorType
public final int getColorType() -
getAlphaType
public final int getAlphaType() -
getColorSpace
-
isAlphaOnly
public final boolean isAlphaOnly() -
getContext
-
isRasterBacked
@Internal public boolean isRasterBacked() -
isTextureBacked
@Internal public boolean isTextureBacked() -
getTextureSize
public long getTextureSize()
-