GSDP:GAM100/CProcessing/PImage

From Inside
Jump to: navigation, search

PImage

Description

PImage is a type that can be used to store loaded images. Use loadImage() to load an image and image() to display them.

Example

void update() 
{
    // Set the background color to blue
    background(color(60, 120, 255, 255));

    // Load an image from the assets folder and store it in a PImage
    PImage img1 = loadImage("./Assets/image.png");

    // Display the image at the mouse position
    image(img1, mouseX, mouseY, 100, 100);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>