Working with image files and clipboard items in Javascript

The following are some very simple Javascript code examples, detailing 4 basic image operations. These are useful specifically if we are making an app that does some kind of image manipulation in the client, either through the Canvas API, or through the direct manipulation of individual pixels.

Some sources and otherwise useful reading on this topic: