Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Julia

You're reading from  Mastering Julia

Product type Book
Published in Jul 2015
Publisher
ISBN-13 9781783553310
Pages 410 pages
Edition 1st Edition
Languages

Raster graphics


Most of the types of displays we have been considering so far are termed vector graphics. These are defined in terms of points, curves, and shapes such as circles, rectangles, and polygons.

Working with images and colormaps is often referred to as raster graphics.

Since low-level packages eventually translate vector plots to rasters, these packages are capable of working with images directly.

So far in this book we have been working with simple netbpm format images, but in practice we will wish to operate with the more common formats such as PNG, GIF, and JPEGs.

So in this final section, we'll turn our attention to a brief overview of some of the ways you can manipulate images in Julia.

Cairo (revisited)

The Cairo package is a low-level package that we met earlier in the Basic graphics in Julia section and used it to create a curve between four points.

In the following example, we will create the graphics context from an RGBSurface method as before and fill the background with a...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}