Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Manipulating Images and Video > Loading an image into canvas

5.1. Loading an image into canvas

In the previous chapter you learned how to export canvas as an image, allowing you to save it locally and share it with others. You're now going to learn how to do the complete opposite; loading an image into canvas. The main reason you'd want to do this is that it allows you to perform all of the 2d rendering context methods and transformations on an image that wasn't originally created in canvas. You can also perform a few special pixel manipulation methods that let you do some pretty amazing things with images, which we'll go through after this section.

NOTE

Pixel manipulation in canvas doesn't actually require you to load in a traditional image, like a photo. Instead, the canvas itself is treated as an image, which means that anything you draw can be manipulated using the methods you'll learn in this chapter.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial