Class Image
java.lang.Object
dev.prozilla.pine.common.asset.image.Image
- All Implemented Interfaces:
Asset
,Destructible
Represents an STB image with a width and a height.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Removes this asset from the asset pool and deletes it.static ByteBuffer
flipImageVertically
(ByteBuffer image, int width, int height, int channels) int
int
getPath()
Returns the path to the file this asset was loaded from.int
getWidth()
int
hashCode()
static ByteBuffer
premultiplyAlpha
(ByteBuffer image, int width, int height, int channels)
-
Field Details
-
id
public final int id
-
-
Constructor Details
-
Image
-
-
Method Details
-
getFlippedImage
-
getPremultipliedImage
-
getPixels
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getChannels
public int getChannels() -
getPath
Description copied from interface:Asset
Returns the path to the file this asset was loaded from. -
destroy
public void destroy()Description copied from interface:Asset
Removes this asset from the asset pool and deletes it.- Specified by:
destroy
in interfaceAsset
- Specified by:
destroy
in interfaceDestructible
-
hashCode
public int hashCode() -
toGLFWImage
-
premultiplyAlpha
-
flipImageVertically
-