adding support for new file format

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
ScottJ
Posts: 6
Joined: 2011-01-18T15:28:29-07:00
Authentication code: 8675308

adding support for new file format

Post 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/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: adding support for new file format

Post 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.
ScottJ
Posts: 6
Joined: 2011-01-18T15:28:29-07:00
Authentication code: 8675308

Re: adding support for new file format

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: adding support for new file format

Post 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.
ScottJ
Posts: 6
Joined: 2011-01-18T15:28:29-07:00
Authentication code: 8675308

Re: adding support for new file format

Post 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.
ScottJ
Posts: 6
Joined: 2011-01-18T15:28:29-07:00
Authentication code: 8675308

Re: adding support for new file format

Post by ScottJ »

Gentlemen, did this make it into IM yet? I don't see it in the latest ChangeLog.
Post Reply