GSDP:GAM100/CProcessing/imageHeight()

From Inside
Jump to: navigation, search

imageHeight()

Description

Used to get the height in pixels of a loaded image. Returns the height as an integer.

Parameters

imageWidth(PImage img)

  • img - (PImage) The loaded image to check

Example

PImage justin_face;
int x_size, y_size;
void init()
{
  justin_face = loadImage("./Assets/justin1.png");
  x_size = imageWidth(justin_face);
  y_size = imageHeight(justin_face);
}

void update()
{
  background(color(255, 255, 255, 255));
  image(justin_face, mouseX, mouseY, x_size, y_size, 255);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>