Functions | |
IMAGE | image.loadfromdata (STRING data, NUMBER type) |
Load an image, from memory data. More... | |
IMAGE | image.load (STRING path) |
Loads an image to RAM. More... | |
IMAGE | image.load (STRING path, COLOR mask) |
Loads an image to RAM becoming transparent pixels which have the indicated color. More... | |
IMAGE | image.load (STRING path, NUMBER w, NUMBER h) |
Loads an image to RAM as a sprite. More... | |
IMAGE | image.load (STRING path, NUMBER w, NUMBER h, COLOR mask) |
Loads an image to RAM as a sprite, becoming transparent pixels which have the indicated color. More... | |
IMAGE | image.loadv (STRING path) |
Loads an image to VRAM. More... | |
IMAGE | image.loadv (STRING path, COLOR mask) |
Loads an image to VRAM becoming transparent pixels which have the indicated color. More... | |
IMAGE | image.loadv (STRING path, NUMBER w, NUMBER h) |
Loads an image to VRAM as a sprite. More... | |
IMAGE | image.loadv (STRING path, NUMBER w, NUMBER h, COLOR mask) |
Loads an image to VRAM as a sprite, becoming transparent pixels which have the indicated color. More... | |
NIL | image.move (IMAGE img) |
Move an image from RAM to VRAM or VRAM to RAM. More... | |
IMAGE | image.new (NUMBER w, NUMBER h, COLOR fill) |
Creates a rectangular image, filled with the specified color. More... | |
NIL | image.blit (IMAGE img, NUMBER x, NUMBER y) |
Displays an entire screen image. More... | |
NIL | image.blit (IMAGE img, NUMBER x, NUMBER y, NUMBER alpha) |
Displays an entire screen image, applying transparency. More... | |
NIL | image.blit (IMAGE img, NUMBER x, NUMBER y, NUMBER xi, NUMBER yi, NUMBER w, NUMBER h) |
Displays a part of a screen image. More... | |
NIL | image.blit (IMAGE img, NUMBER x, NUMBER y, NUMBER xi, NUMBER yi, NUMBER w, NUMBER h, NUMBER alpha) |
Displays a part of a screen image, applying transparency. More... | |
NIL | image.blitsprite (IMAGE img, NUMBER x, NUMBER y, NUMBER frame) |
Displays one frame of a image loaded as sprite. More... | |
NIL | image.blitsprite (IMAGE img, NUMBER x, NUMBER y, NUMBER frame, NUMBER alpha) |
Displays one frame of a image loaded as sprite with transparency. More... | |
NIL | image.blitadd (IMAGE img, NUMBER x, NUMBER y, NUMBER coef) |
Displays an entire screen image, with color addition. More... | |
NIL | image.blitsub (IMAGE img, NUMBER x, NUMBER y, NUMBER coef) |
Displays an entire screen image, with color substraction. More... | |
NIL | image.blittint (IMAGE img, NUMBER x, NUMBER y, COLOR color) |
Displays an entire screen image, with effect tint. More... | |
NIL | image.fliph (IMAGE img) |
Flips an image horizontally. More... | |
NIL | image.flipv (IMAGE img) |
Flips an image vertically. More... | |
NIL | image.center (IMAGE img) |
Change the blit point (the point where the image is displayed) to the center of the image. More... | |
NIL | image.center (IMAGE img, NUMBER xi, NUMBER yi) |
Change the blit point (the point where the image is displayed) to the specified point. More... | |
NIL | image.rotate (IMAGE img, NUMBER angle) |
Rotate an image about its blit point. More... | |
NUMBER | image.getw (IMAGE img) |
Obtains the image width in pixels. More... | |
NUMBER | image.geth (IMAGE img) |
Obtains the image height in pixels. More... | |
NUMBER | image.getrealw (IMAGE img) |
Obtains the REAL image width in pixels. More... | |
NUMBER | image.getrealh (IMAGE img) |
Obtains the REAL image height in pixels. More... | |
NIL | image.resize (IMAGE img, NUMBER w, NUMBER h) |
Resizes an image. More... | |
NIL | image.scale (IMAGE img, NUMBER percent) |
Scale an image according to the percentage. More... | |
NIL | image.clear (IMAGE img, COLOR fill) |
Fills an image with the specified color. More... | |
NIL | image.reset (IMAGE img) |
Returns an image to the values it had when it was loaded / created (in other words, removes all effects applied). More... | |
NIL | image.copy (IMAGE img) |
Make a copy of the specified image. More... | |
NIL | image.save (IMAGE img, STRING path) |
Save an image to the specified path (it should include the filename and its extension, only png). More... | |
COLOR | image.pixel (IMAGE img, NUMBER x, NUMBER y) |
Get a pixel from the specified image. More... | |
NIL | image.pixel (IMAGE img, NUMBER x, NUMBER y, COLOR color) |
Set a pixel of an image. More... | |
IMAGE | image.fxgrey (IMAGE img) |
Creates a copy of the img, with the effect of scaling applied gray. More... | |
IMAGE | image.fxinvert (IMAGE img) |
Creates a copy of the img, with the effect of inverted colors. More... | |
IMAGE | image.fxsepia (IMAGE img) |
Creates a copy of the img, with sepia effect. More... | |
IMAGE | image.fxold (IMAGE img) |
Creates a copy of the img, with the effect of old (old stained). More... | |
IMAGE | image.fxold (IMAGE img, NUMBER porcent) |
Creates a copy of the img, with the effect of old (old stained). More... | |
Using images.
IMAGE image.loadfromdata | ( | STRING | data, |
NUMBER | type | ||
) |
Load an image, from memory data.
data | Binary data. |
type | Image type. The numerical value into parentheses.
|
IMAGE image.load | ( | STRING | path | ) |
Loads an image to RAM.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
IMAGE image.load | ( | STRING | path, |
COLOR | mask | ||
) |
Loads an image to RAM becoming transparent pixels which have the indicated color.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
mask | Color of the pixels that will become transparent. |
IMAGE image.load | ( | STRING | path, |
NUMBER | w, | ||
NUMBER | h | ||
) |
Loads an image to RAM as a sprite.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
w | Width of each frame of the sprite. |
h | Height of each frame of the sprite. |
IMAGE image.load | ( | STRING | path, |
NUMBER | w, | ||
NUMBER | h, | ||
COLOR | mask | ||
) |
Loads an image to RAM as a sprite, becoming transparent pixels which have the indicated color.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
w | Width of each frame of the sprite. |
h | Height of each frame of the sprite. |
mask | Color of the pixels that will become transparent. |
IMAGE image.loadv | ( | STRING | path | ) |
Loads an image to VRAM.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
IMAGE image.loadv | ( | STRING | path, |
COLOR | mask | ||
) |
Loads an image to VRAM becoming transparent pixels which have the indicated color.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
mask | Color of the pixels that will become transparent. |
IMAGE image.loadv | ( | STRING | path, |
NUMBER | w, | ||
NUMBER | h | ||
) |
Loads an image to VRAM as a sprite.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
w | Width of each frame of the sprite. |
h | Height of each frame of the sprite. |
IMAGE image.loadv | ( | STRING | path, |
NUMBER | w, | ||
NUMBER | h, | ||
COLOR | mask | ||
) |
Loads an image to VRAM as a sprite, becoming transparent pixels which have the indicated color.
path | Path to the image to load(formats png, jpg, bmp or gif. Maximum size 512x512 px. Doesn't support animated gifs). |
w | Width of each frame of the sprite. |
h | Height of each frame of the sprite. |
mask | Color of the pixels that will become transparent. |
NIL image.move | ( | IMAGE | img | ) |
Move an image from RAM to VRAM or VRAM to RAM.
img | An image type object. |
IMAGE image.new | ( | NUMBER | w, |
NUMBER | h, | ||
COLOR | fill | ||
) |
Creates a rectangular image, filled with the specified color.
w | Width of the image. |
h | Height of the image. |
fill | Color to fill the image. |
NIL image.blit | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y | ||
) |
Displays an entire screen image.
img | An image type object. |
x | X coordinate where the image is displayed. |
y | Y coordinate where the image is displayed. |
NIL image.blit | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
NUMBER | alpha | ||
) |
Displays an entire screen image, applying transparency.
img | An image type object. |
x | X coordinate where the image is displayed. |
y | Y coordinate where the image is displayed. |
alpha | Transparency level (0 to 255), more lower value is, more transparent image becomes. |
NIL image.blit | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
NUMBER | xi, | ||
NUMBER | yi, | ||
NUMBER | w, | ||
NUMBER | h | ||
) |
Displays a part of a screen image.
img | An image type object. |
x | X coordinate where the image is displayed. |
y | Y coordinate where the image is displayed. |
xi | X coordinate (relative to the upper left corner of the picture) from where you take the part to show. |
yi | Y coordinate (relative to the upper left corner of the picture) from where you take the part to show. |
w | Width of the part to be displayed. |
h | Height of the portion to be displayed. |
NIL image.blit | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
NUMBER | xi, | ||
NUMBER | yi, | ||
NUMBER | w, | ||
NUMBER | h, | ||
NUMBER | alpha | ||
) |
Displays a part of a screen image, applying transparency.
img | An image type object. |
x | X coordinate where the image is displayed. |
y | Y coordinate where the image is displayed. |
xi | X coordinate (relative to the upper left corner of the picture) from where you take the part to show. |
yi | Y coordinate (relative to the upper left corner of the picture) from where you take the part to show. |
w | Width of the part to be displayed. |
h | Height of the portion to be displayed. |
alpha | Transparency level (0 to 255), more lower value is, more transparent image becomes. |
NIL image.blitsprite | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
NUMBER | frame | ||
) |
Displays one frame of a image loaded as sprite.
img | A image loaded as sprite. |
x | X coordinate where the picture is displayed. |
y | Y coordinate where the picture is displayed. |
frame | Frame to display (numbered from left to right and top to bottom, starting with 0). |
NIL image.blitsprite | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
NUMBER | frame, | ||
NUMBER | alpha | ||
) |
Displays one frame of a image loaded as sprite with transparency.
img | A image loaded as sprite. |
x | X coordinate where the picture is displayed. |
y | Y coordinate where the picture is displayed. |
frame | Frame to display (numbered from left to right and top to bottom, starting with 0). |
alpha | Transparency level (from 0 to 255), more lower value is, more transparent image becomes. |
NIL image.blitadd | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
NUMBER | coef | ||
) |
Displays an entire screen image, with color addition.
img | An image type object. |
x | X coordinate where the image is displayed. |
y | Y coordinate where the image is displayed. |
coef | Effect level addition colors (from 0 to 255), the default value is 255. |
NIL image.blitsub | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
NUMBER | coef | ||
) |
Displays an entire screen image, with color substraction.
img | An image type object. |
x | X coordinate where the image is displayed. |
y | Y coordinate where the image is displayed. |
coef | Effect level subtraction colors (from 0 to 255), the default value is 255. |
NIL image.blittint | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
COLOR | color | ||
) |
Displays an entire screen image, with effect tint.
img | An image type object. |
x | X coordinate where the image is displayed. |
y | Y coordinate where the image is displayed. |
color | Color to tint the image. |
NIL image.fliph | ( | IMAGE | img | ) |
Flips an image horizontally.
img | An image type object. |
NIL image.flipv | ( | IMAGE | img | ) |
Flips an image vertically.
img | An image type object. |
NIL image.center | ( | IMAGE | img | ) |
Change the blit point (the point where the image is displayed) to the center of the image.
img | An image type object. |
NIL image.center | ( | IMAGE | img, |
NUMBER | xi, | ||
NUMBER | yi | ||
) |
Change the blit point (the point where the image is displayed) to the specified point.
img | An image type object. |
xi | X coordinate of the new blit point. |
yi | Y coordinate of the new blit point. |
NIL image.rotate | ( | IMAGE | img, |
NUMBER | angle | ||
) |
Rotate an image about its blit point.
img | An image type object. |
angle | Rotation angle in degrees. |
NUMBER image.getw | ( | IMAGE | img | ) |
Obtains the image width in pixels.
img | An image type object. |
NUMBER image.geth | ( | IMAGE | img | ) |
Obtains the image height in pixels.
img | An image type object. |
NUMBER image.getrealw | ( | IMAGE | img | ) |
Obtains the REAL image width in pixels.
img | An image type object. |
NUMBER image.getrealh | ( | IMAGE | img | ) |
Obtains the REAL image height in pixels.
img | An image type object. |
NIL image.resize | ( | IMAGE | img, |
NUMBER | w, | ||
NUMBER | h | ||
) |
Resizes an image.
img | An image type object. |
w | The new width of the image (in pixels). |
h | The new height of the image (in pixels). |
NIL image.scale | ( | IMAGE | img, |
NUMBER | percent | ||
) |
Scale an image according to the percentage.
img | An image type object. |
percent | The percentage of the scale to carry out. |
NIL image.clear | ( | IMAGE | img, |
COLOR | fill | ||
) |
Fills an image with the specified color.
img | An image type object. |
fill | The color to fill the image. |
NIL image.reset | ( | IMAGE | img | ) |
Returns an image to the values it had when it was loaded / created (in other words, removes all effects applied).
img | An image type object. |
NIL image.copy | ( | IMAGE | img | ) |
Make a copy of the specified image.
img | An image object. |
NIL image.save | ( | IMAGE | img, |
STRING | path | ||
) |
Save an image to the specified path (it should include the filename and its extension, only png).
img | An image object. |
path | The path, filename and extension of the image. |
COLOR image.pixel | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y | ||
) |
Get a pixel from the specified image.
img | An image object. |
x | Pixel position in X axis. |
y | Pixel position in Y axis. |
NIL image.pixel | ( | IMAGE | img, |
NUMBER | x, | ||
NUMBER | y, | ||
COLOR | color | ||
) |
Set a pixel of an image.
img | An image object. |
x | Pixel position in X axis. |
y | Pixel position in Y axis. |
color | New color for this pixel. |
IMAGE image.fxgrey | ( | IMAGE | img | ) |
Creates a copy of the img, with the effect of scaling applied gray.
img | An image object. |
IMAGE image.fxinvert | ( | IMAGE | img | ) |
Creates a copy of the img, with the effect of inverted colors.
img | An image object. |
IMAGE image.fxsepia | ( | IMAGE | img | ) |
Creates a copy of the img, with sepia effect.
img | An image object. |
IMAGE image.fxold | ( | IMAGE | img | ) |
Creates a copy of the img, with the effect of old (old stained).
img | An image object. |
IMAGE image.fxold | ( | IMAGE | img, |
NUMBER | porcent | ||
) |
Creates a copy of the img, with the effect of old (old stained).
img | An image object. |
porcent | Percentage of effect to apply. |