1. The Bitten Bit
new BitmapData() as Pigiuz
Piergiorgio Niero
Flash platform developer
specialized in games and visualization development
mail: blog:
info@flashfuck.it www.flashfuck.it
giovedì 11 dicembre 2008 1
2. What is an image?
A bunch of Pixels!
giovedì 11 dicembre 2008 2
3. What is a Pixel!?
x:61, y:54
red: 0
green: 200
blue: 15
it’s a color at a certain position
giovedì 11 dicembre 2008 3
4. Defining Colors
• A color is stored as an unsigned integer
• A color is composed by 24 OR 32 bits (8
bit a channel)
• A color is computed as a HEX
color hex demo
channel separation demo
histogram demo
giovedì 11 dicembre 2008 4
6. Applying Filters
• Filters applied to BitmapData are more
performing but DESTRUCTIVE
• You can apply only BitmapFilters
(BevelFilter, BlurFilter, ColorMatrixFilter, ConvolutionFilter,
DisplacementMapFilter, DropShadowFilter, GlowFilter, GradientBevelFilter,
GradientGlowFilter, ShaderFilter*)
• (take a look at Image Processing library by Joa Ebert)
http://blog.joa-ebert.com/imageprocessing-library/
convolution demo
displacement demo
giovedì 11 dicembre 2008 6
7. Masking, Detecting
Interacting
• Use BitmapData.threshold() to mask a
color within a bitmapData
• Use BitmapData.getColorBoundsRect() to
locate it
• THEN INTERACT! :D
threshold demo
motion demo
giovedì 11 dicembre 2008 7
8. Play Time
rippler demo
giovedì 11 dicembre 2008 8
9. Data Provider
25lines demo
PV3D demo
giovedì 11 dicembre 2008 9
10. The bit has been bitten
giovedì 11 dicembre 2008 10
11. Thank You!
new BitmapData() as Pigiuz
Piergiorgio Niero
Flash platform developer
specialized in games and visualization development
mail: blog:
info@flashfuck.it www.flashfuck.it
giovedì 11 dicembre 2008 11