06.01.2013 Views

Learning Processing: A Beginner's Guide to Programming Images ...

Learning Processing: A Beginner's Guide to Programming Images ...

Learning Processing: A Beginner's Guide to Programming Images ...

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.

198 <strong>Learning</strong> <strong>Processing</strong><br />

fi g. 12.3<br />

Step 2. Copy the extracted fi les <strong>to</strong> the <strong>Processing</strong> libraries folder. Most libraries you download will<br />

au<strong>to</strong>matically unpack with the right direc<strong>to</strong>ry structure. Th e full direc<strong>to</strong>ry structure should<br />

look like this:<br />

/<strong>Processing</strong> 0135/libraries/simpleML/library/simpleML.jar<br />

More generically:<br />

/<strong>Processing</strong> 0135/libraries/libraryName/library/libraryName.jar<br />

Some libraries may include additional fi les in the “ library ” folder, as well as the source code<br />

(which is commonly s<strong>to</strong>red one direc<strong>to</strong>ry up, in the “ libraryName ” folder). If the library does not<br />

au<strong>to</strong>matically unpack itself with the above direc<strong>to</strong>ry structure, you can manually create these folders<br />

(using the fi nder or explorer) and place the libraryName.jar fi le in the appropriate location yourself.<br />

Step 3. Restart <strong>Processing</strong>. If <strong>Processing</strong> was running while you performed Step 2, you will need <strong>to</strong><br />

quit <strong>Processing</strong> and restart it in order for the library <strong>to</strong> be recognized. Once you have restarted,<br />

if everything has gone according <strong>to</strong> plan, the library will appear under the “ Sketch → Import<br />

Library ” option shown in Figure 12.4 .<br />

fi g. 12.4<br />

Th e newly installed library will now appear in the list! What <strong>to</strong> do once you have installed the library<br />

really depends on which library you have installed. Examples that make use in code of a contributed<br />

library can be found in Chapter 18 (simpleML, Yahoo API) and Chapter 20 (Sonia, Minim).

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

Saved successfully!

Ooh no, something went wrong!