GSDP:GAM100/CProcessing/loadImage()

From Inside
Jump to: navigation, search

loadImage()

Description

Images loaded using loadImage() can be displayed using image() . The reference point used to draw the image can be specified with imageMode() .

Parameters

loadImage(path)

  • path - (const char *) the path of the image file on the hard drive


Example

void update()
{
    // Load an image from the assets folder to a PImage type
    PImage myImage = loadImage("./Assets/image.png");

    // display the image at the mouse position
    image(myImage, mouseX, mouseY, 100.0f, 100.0f);

}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>