Stuff I am building:


Ted Patrick - Events & Community @ Adobe Systems


Note: This is the personal blog of Ted Patrick. The opinions and statements voiced here are my own.



Pixel Icon line based compression - Icon Engine 1.01 Release

DIGG IT!     0 Comments Published Sunday, January 11, 2004 at 6:33 AM .

I added line based compression to the Icon Engine. Icon size dropped 50% to 200% depending on the design. \0

The Icon engine works like an old manual typewriter. Starting at 0,0 of the target MovieClip, a horizontal line is drawn, return (KaChing!), and then the next line is drawn, return (KaChing!). This happens again and again until the icon is complete. Icons are rendered through the drawing API top to bottom by horizontal lines. When I reviewed several icons that I had made, many horizontal lines were duplicates. I modified the Engine to support duplication of existing lines later in the icon thus reducing the size down to original lines and reference copies. In many cases, this make the Icon format more efficient that GIF or ICO, not to mention that AS compression only amplifies the effect.

To duplicate a line, simply type '*0'. Asterisk represents the copy command and 0 refers to line 0 of the icon. Lines are a 0 based array. Say I wanted to make a blue box 10x10.

Old Format (old format is still supported!):
//ColorA,line1<line2<line3<line4<line5<line6<line7<line8<line9<line10
0x0000FF,A10<A10<A10<A10<A10<A10<A10<A10<A10<A10

New Format:
//ColorA,line1<copy1<copy1<copy1<copy1<copy1<copy1<copy1<copy1<copy1
0x0000FF,A10<*0<*0<*0<*0<*0<*0<*0<*0<*0

Although it doesn't provide much compression in this example. More complex line designs will compress well.

The new 1.01 version of the Icon Engine is available here:

Current Version 1.01
Version 1.00
Version 1.01

Updated Examples

New Plus Icon:










More to come...

Cheers,

ted ;)

0 Responses to “Pixel Icon line based compression - Icon Engine 1.01 Release”

Post a Comment

Where to find me:

Ted on Twitter - @AdobeTed
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe


Latest

Lists

Links

Jobs

Flex Jobs
city, state, zip

Archives