Sunday, October 2, 2011

Image to DMD conversion

I've been working on converting regular image files to DMD images (well, my interpretation of them anyway) and just tested it out:

A) Converted RGB GIF to 16 color DMD. 

B) The original image for comparison.
(the format is RGB despite the black&white appearance)

Pretty neat, huh?

Basically I wrote a python program that loads images (animated GIF's preferably, but almost any image format works), converts them to monochrome and spits out a converted 16 color image in DMD format. Each frame of the animated image just adds another 4096 Bytes to the DMD file, meaning an animation results in a single DMD file.

I will probably have to do a little fine tuning to get the actual color conversion more precise. Right now it's simply dividing the 255 colors by 16. It could be better represented, I suppose.

In the example above, there's a lot of bleeding going on. That lies in the original file and has nothing to do with the conversion etc. The image was created very sloppily with a anti-aliased scaling of the original images. Nearest-neighbour scaling is preferred when working with so few pixels.

(There can hardly be anyone out there who can't guess the theme now, right?)

3 comments:

  1. Would it be terribly difficult to convert that to a universal app? This is what I've been look for on OS X.

    ReplyDelete
  2. I'm actually using OS X myself, and the program is written in Python so it should work on a large range of devices. :)

    ReplyDelete
  3. Cool and I have a swell provide: How To Budget House Renovation house renovation mortgage

    ReplyDelete