Imagin example scripts

Create a 100x100 thumbnail

Resizes an image uploaded by the client to 100x100 pixels.

Image
Code

Create a 100x100 thumbnail from a URL

Fetches an image from the web and resizes it to a 100x100 thumbnail.

Code

Copy and paste sprites

Cuts a source image up into sprites, then pastes some into a destination image.

Code

Copy and paste sprites using spritepaste2

Cuts a source image up into sprites, then pastes some into a destination image. This performs the same function as the example above, but uses the spritepaste2 function, which results in much more compact code, even though we're generating a larger image. Note that we have to use spritepaste2 instead of spritepaste, as our sprite sheet has more than 62 images we wish to address.

Code