Class Image
java.lang.Object
dev.prozilla.pine.common.asset.image.Image
- All Implemented Interfaces:
Asset
,Cloneable<Image>
,Destructible
Represents an STB image with a width and a height.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a new object that is equal to this object.void
destroy()
Removes this asset from the asset pool and deletes it.boolean
Checks if the given object is equal to this object.boolean
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
-
equals
-
equals
Description copied from interface:Cloneable
Checks if the given object is equal to this object. -
hashCode
public int hashCode() -
clone
Description copied from interface:Cloneable
Returns a new object that is equal to this object. -
toGLFWImage
-
premultiplyAlpha
-
flipImageVertically
-