O'Reilly logo

Pro Android Media: Developing Graphics, Music, Video, and Rich Media Apps for Smartphones and Tablets by Shawn Van Every

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Image Processing

Another form of image editing or processing has to do with changing the color values of the pixels themselves. Being able to do this allows us the ability to change contrast levels, brightness, overall hue, and so on.

ColorMatrix

In a way similar to how we use the Matrix object when drawing on a Canvas, we can use a ColorMatrix object to alter the Paint that is used to draw on a Canvas.

The ColorMatrix works in a similar manner as well. It is an array of numbers that operate on the pixels of the image. Instead of operating on the x, y, and z coordinates, though, it operates on the color values—Red, Green, Blue, and Alpha of each pixel.

We can construct a default ColorMatrix object by calling its constructor without any arguments. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required