Image class is used to store image data that is used to create Textures.
Images can be stored in mutiple formats.
Some formats (tga, tiff, etc) are converted to png or jpeg in order to work with the rest of the code.
Compresses image data to JPEG.
Can be used to compress data and save some space.
JPEG compression quality level by default 0.7 is used (1.0 means max quality).
Create a new image with 1x1 resolution with solid color.
Can be called externally on data load error to load dummy data.
Check if a file name refers to a supported binary image file.
True if the file refers to a supported image format.
Check if this image has alpha channel.
This checks the file encoding if the file a GIF or a PNG is assumed that the file has alpha channel.
True if the image is encoded as PNG or GIF
Load arraybuffer data to this image.
Creates a blob with data to be stored on data atribute and used by external objects.
Data to be loaded.
Image enconding (jpeg, png, etc).
Serialize Image resource to json.
If image is stored as URL it is converter to PNG or JPEG.