The Bitten Bit Piergiorgio Niero

Post on 13-Jan-2015

921 views 1 download

Tags:

description

My presentation at FlexCamp Italy 2008 at Adobe Max Europe in Milan. You can find examples and code at www.flashfuck.it

transcript

The Bitten Bitnew BitmapData() as Pigiuz

Piergiorgio NieroFlash platform developer

specialized in games and visualization development

mail:info@flashfuck.it

blog:www.flashfuck.it

1giovedì 11 dicembre 2008

What is an image?

A bunch of Pixels!2giovedì 11 dicembre 2008

What is a Pixel!?

x:61, y:54red: 0green: 200blue: 15

it’s a color at a certain position3giovedì 11 dicembre 2008

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 demochannel separation demo

histogram demo

4giovedì 11 dicembre 2008

Generating Bitmaps

• BitmapData.draw(someIDrawableInstance)

• Perlin Noise magic

cloud generator demo

5giovedì 11 dicembre 2008

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 demodisplacement demo

6giovedì 11 dicembre 2008

Masking, Detecting Interacting

• Use BitmapData.threshold() to mask a color within a bitmapData

• Use BitmapData.getColorBoundsRect() to locate it

• THEN INTERACT! :D

threshold demomotion demo

7giovedì 11 dicembre 2008

Play Time

rippler demo

8giovedì 11 dicembre 2008

Data Provider

25lines demoPV3D demo

9giovedì 11 dicembre 2008

The bit has been bitten

10giovedì 11 dicembre 2008

Thank You!new BitmapData() as Pigiuz

Piergiorgio NieroFlash platform developer

specialized in games and visualization development

mail:info@flashfuck.it

blog:www.flashfuck.it

11giovedì 11 dicembre 2008