Perl based bitmap image to rule converter

Here you can discuss and share functionality improvements and helper programs to make Context Free better.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
anexium
Posts: 1
Joined: Wed Oct 27, 2010 8:25 am

Perl based bitmap image to rule converter

Post by anexium »

I spent most of last summer having a good old play with ContextFree. However, the one thing that I missed was being able to use bitmaps and manipulate them like the primitives that CF supported. So, already having written some code to convert images to HTML I set to work making a bit of code that'd convert bitmaps into SQUAREs so that they could be used as shapes within CF. The code iterates through the image and creates a suitibly coloured SQUARE for each pixel. The code and an example image is available at http://www.anexium.com/project/cfmake.html

The code that makes images into HTML is also up at http://www.anexium.com/project

User avatar
pakin
Posts: 43
Joined: Sat Apr 21, 2007 8:59 pm
Location: United States
Contact:

Re: Perl based bitmap image to rule converter

Post by pakin »

Thanks for making that available, but note that similar scripts have presumably been used for some of the pieces in the gallery marked with tag=artworks. Your sample picture is a nice use of a bitmap image, though.

Post Reply