Page 1 of 1

adding support for new file format

Posted: 2011-01-18T15:43:32-07:00
by ScottJ
I'd like to add support for a new file format to IM. I expected this would be common and I'd find documentation via google, but my search has come up empty.

Before I go digging into the source, is there any documentation on this?

Specifically I want support for AAI, a very simple format used by HDI's Dune media streamers. Except for a few header bytes it appears very similar to RGBA.

Here's some documentation and a Windows tool to convert between AAI and BMP: http://dune-hd.com/firmware/misc/

Re: adding support for new file format

Posted: 2011-01-18T16:38:50-07:00
by magick
The format is very similar to AVS. As such it would take about 10 minutes to add to ImageMagick. If you point us to a few examples AAI image files we could use for testing, we'll add support for the format to ImageMagick. If you would rather add support yourself, just use coders/avs.c as a template for your coder.

Re: adding support for new file format

Posted: 2011-01-18T17:10:14-07:00
by ScottJ
Wow, awesome.

You should be able to make as many example AAI files as needed using the official BMP<->AAI convertor which I linked to. Is that sufficient? Otherwise I could dig some up, but I'm not sure about copyright issues for the images I have.

The only thing that looked funny to me about the format was the special reserved value of 255 for the alpha.

Re: adding support for new file format

Posted: 2011-01-18T17:54:53-07:00
by magick
It would be helpful if you could post a URL to a few sample AAI images. We have the code written, we just need to test it before we add it to ImageMagick 6.6.7-2 Beta.

Re: adding support for new file format

Posted: 2011-01-18T23:31:54-07:00
by ScottJ
I created two for you:

http://www.scottjohnson.org/imagemagick/

The xterminator_logo.aai has some transparency to it. I think the logo.aai does not.

Re: adding support for new file format

Posted: 2011-01-31T14:08:09-07:00
by ScottJ
Gentlemen, did this make it into IM yet? I don't see it in the latest ChangeLog.