Live Chat

We'll need to share your messages (and your email address if you're logged in) with our live chat provider, Drift. Here's their privacy policy.

If you don't want to do this, you can email us instead at contact@anvil.works.

anvil.image Module

Classes

ImageException

Create a new ‘ImageException’ object

Constructor

ImageException()

Functions

generate_thumbnail(image_media, max_size) → anvil.Media instance

Resize the supplied image so that neither width nor height exceeds max_size (in pixels).

Pass in an anvil.Media object representing the image.


get_dimensions(image_media)

Get the dimensions of an image (width, height).

Pass in an anvil.Media object representing the image.


rotate(image_media, angle) → anvil.Media instance

Rotate the supplied image clockwise by the given number of degrees.

Pass in an anvil.Media object representing the image.



anvil.image