Skip to content
ExamplesOpen editor ↗

lekanyaSetshwantsho

Resizes an image.

lekanyaSetshwantsho(setshwantsho, bopharaJwaSone, boleeleJwaSone)

Mutates the image’s dimensions and pixels. Pass 0 for either width or height to preserve its aspect ratio. Returns undefined, not an image copy. Reload the pixel buffer after resizing if you need to edit it.

NameTypeDescription
setshwantshosetshwantshoThe image to resize.
bopharaJwaSonepaloNew width, or 0 to preserve aspect ratio.
boleeleJwaSonepaloNew height, or 0 to preserve aspect ratio.
Resizes an image
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  diri s = letela tlisaSetshwantsho("mokolwane.png");
  lekanyaSetshwantsho(s, 100, 0);
  thalaSetshwantsho(s, 110, 25);
  emisaPoapoeletso();
}

bopaSetshwantsho, dirisaMoGo