04.04.2013 Views

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PROCESSING: CREATIVE CODING AND COMPUTATIONAL ART<br />

454<br />

And if you really can’t st<strong>and</strong> the bitwise stuff, you can also use the color component functions,<br />

which although not as efficient, get the job done:<br />

//custom invert--version 3<br />

// image should be 600 x 400 pixels<br />

size(600, 400);<br />

background(255);<br />

PImage img = loadImage("view.jpg");<br />

image(img, 0, 0);<br />

loadPixels();<br />

for (int i=0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!