Sound & Images > Change Images


Read our Image API guide for an explanation of these blocks.


Draw on Image

Draw Image onto Image

draw-image-block

Draws the first image on top of the second image at the specified location.

drawImageOnImage([IMAGE], [IMAGE], [NUMBER], [NUMBER], [BLEND MODE]);

Draw Text onto Image

draw-text-image-block

Draws the given text (using a font) on top of the image at the specified location.

drawTextOnImage([IMAGE], [TEXT], [NUMBER], [NUMBER], [FONT]);

Fill Image with Color

fill-image-block

Replaces all pixels in the image with the given color.

fillImage([IMAGE], [COLOR]);

Make Color (from RGB)

rgb-block

Creates a color from red, green, blue channels. Numbers must be between [0-255] inclusive.

Utils.getColorRGB([NUMBER], [NUMBER], [NUMBER])

Clear Image

Clear Part of Image

clear-image-block

Clears out the specified part of the image by making those pixels transparent.

clearImagePartially([IMAGE], [NUMBER], [NUMBER], [NUMBER], [NUMBER]);

Clear Whole Image

clear-full-image-block

Clears out the entire image by making its pixels transparent.

clearImage([IMAGE]);

Clear / Retain Image using Mask

mask-image-block

Clears out the image using the second image as a mask. The second image will "cut out" pixels from the first. If using "retain", will do the opposite -- it will clear out all pixels except for those that are in the mask.

clearImageUsingMask([IMAGE], [IMAGE], [NUMBER], [NUMBER]);
retainImageUsingMask([IMAGE], [IMAGE], [NUMBER], [NUMBER]);

Transform Image

Apply Effect to Image

effect-image-block

Applies the given effect to the image.

filterImage([IMAGE], [EFFECT]);

Flip Image

flip-image-block

Flips the image horizontally or vertically.

flipImageHorizontal([IMAGE]);
flipImageVertical([IMAGE]);

Swap Colors in Image

swap-color-image-block

Replaces all pixels of the first color with the second color in the image.

imageSwapColor([IMAGE], [COLOR], [COLOR]);

Pixel Operations

Batch Draw

batch-image-block

When setting many pixels at a time, this tells the system not to push an image update until you have finished your work. A must-use for performance reasons.

[IMAGE].lock();
[ACTIONS]
[IMAGE].unlock();

Set Pixel

set-pixel-image-block

Sets a pixel in the image to the specified color.

imageSetPixel([IMAGE], [NUMBER], [NUMBER], [COLOR]);

Draw Image onto Image

get-pixel-image-block

Returns the color for the specified pixel in the image.

imageGetPixel([IMAGE], [NUMBER], [NUMBER])