Flex – Play with pictures

written by netinfluence 12 août 2009
Flex – Play with pictures

Flex offers great functionalities to play around with the pictures you have in your application. I am far from being a design or photo expert but I did have fun modifying the pictures that were inside my latest flex app.

My particular issue was the following. We had a list of products, each of them having a related picture. Some of these products could be bought, others not yet so we wanted to display the later as « disabled ». In other words, we wanted a nice colorfull picture for some products and a grayscale picture for others but the only picture available to us was the colorfull one.

So we used the ColorMatrixFilter. Here is how :

This is a very simple example. You can actually apply this method to other components than the image one. And if you play around with the matrix and the rgb values, you will find that you can change many things. The best way to see what you can do is to check out this little app : http://afoucal.free.fr/wp-content/ColorMatrixBuilder/ColorMatrix.html

So go ahead and build you own photoshop 😉

You may also like

Leave a Comment

*