Raised when an error occur in this module
Module OgamlGraphics.Image
Image manipulation and creationThis module provides a safe way to load and access images stored in the RAM. Images stored this way are uncompressed arrays of bytes and are therefore not meant to be stored in large quantities.
Type of an image stored in the RAM
Creates an image from a file, some RGBA-formatted data, or an empty one filled with a default color
Raises
See : OgamlGraphics.Color
Raises
Image_error
if the loading fails See : OgamlGraphics.Color
Return the size of an image
Sets a pixel of an image
See : OgamlGraphics.Color
See : OgamlGraphics.Color
Gets the color of a pixel of an image
See : OgamlGraphics.Color.RGB
See : OgamlGraphics.Color.RGB
blit src ~rect dest offset
blits the subimage of src
defined by rect
on the image dest
at position offset
(relative to the top-left pixel).If
rect
is not provided then the whole image src
is used.See : OgamlMath.IntRect
See : OgamlMath.Vector2i
mipmap img lvl
returns a new, fresh image that is the lvl
-th reduction of the image img
pad img offset color size
returns a new image of size size
, which contains img
placed at position offset
, and where the empty pixels are filled with color