Archive for November, 2009

Nov 19, 2009

JPEGlitch

glitchGrab5

I've been experimenting with glitched JPEG encoding in Flash and have created a version of Thibault Imbert's optimised JPEG encoder that gives control over various glitch parameters.

JPEGlitch Example

A simple test suite that lets you control parameters, experiment with the JPEGlitch class, and load/save images locally. This example uses the minimalcomps ui component library from bit-101.

JPEGlitchRhythm for HYPE

I also made a rhythm for the HYPE framework using the JPEGlitch encoder.

This example is an audio visualiser based on a HYPE sound analyser example and plays 2 short tunes endlessly. The rhythm encodes and re-encodes a bitmap, adding the freshly rendered oscillator canvas on top each time.

This is also my entry to the HYPE 'Friday 13th' competition.

All source

Feed your code-eyes :)

Update 14/01/10 - JPEGlitch get's an honorable mention in the HYPE competition :)

(more...)

Nov 12, 2009

Crazy animation technique

Nov 9, 2009

AS3 WOFF Parser

I recently stumbled upon the Web Open Font Format (WOFF) when trying out the Firefox 3.6 beta, and thanks to the well documented WOFF file format, made this AS3 WOFF parser for Flash.

Initially the parser was just an experimental project that would let me get my teeth into a bit of ByteArray manipulation. After all, parsing a WOFF file lets us read the original font tables and any metadata or private data contained - but the font tables aren't much use in Flash without further parsing.

Then I remembered reading about Thibault Imbert's research into converting TTF fonts to AFM (Adobe Font Metrics) at runtime using a c library compiled to AVM bytecode with Alchemy - and realised this parser class could probably be used in conjunction with something like that. So it may end up having uses after all. :)

I'm making the WOFFParser class available here with an open source licence, along with a FlashDevelop project and a WOFF file to test it with. I created the WOFF for my test with a command-line tool (included) and embedded a test metadata xml file in it. The WOFF file specification also allows vendors to include a chunk of unspecified private data - the class will also allow access to those bytes if present. I included a PNG image as the private data in the test WOFF file, which you will see if you build the project.

For further WOFF resources; I used the command line tool sfnt2woff to create the WOFF file for this project and font squirrel support the WOFF format with lots of resources in their @font-face sections.

AS3 WOFF parser source

Nov 4, 2009

Reducing the drudgery of embedding fonts in AS3

Using and managing embedded fonts in Flash is a lot easier than it was a few years ago, but I still find myself repeating tedious steps of set-up each time I need to create a new font-asset swf.

So, I created an Air application to do it for me ;)

Skip to the end to download the app and source, or read on for all the juicy details...

(more...)