GSDP:GAM100/CProcessing/loadImage()
From Inside
< GSDP:GAM100 | CProcessing
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
- Main Page
- loadImage()
- loadImageAdvanced()
- image()
- imageRotated()
- imageSize()
- imageMode()
- createImage()
- createImageAdvanced()
- freeImage()
- imageWidth()
- imageHeight()
- imagePixel()
- imageCreateSubimage()
- imageCreateSubimageAdvanced()
- imageCreateTint()
- imageCreateTintAdvanced()
- imageData()
- imageUpdate()
- readFrameBuffer()
- readFrameBufferAdvanced()