🧪 Version 0.3.1 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for resize

Scale an image. This is part of the reference section.

Purpose

Resize an image by scaling its contents.

Snippet

Load an image from the file reference.png and scale it to a width of 100 pixels and height of 200 pixels.
image = sketch.get_image('reference.png')
image.resize(100, 200)

Parameters

  • width: New desired width of the image in pixels.
  • height: New desired height of the image in pixels.

Examples

Availability

Available for all platforms.

See also