Here’s an example from the forum. As craigb said, searching the forum can lead to lots of examples: Scale image in canvas