Hi ben.
I think what you want is the perl scripts I rewrote for philg sometime back for digital images.
http://www.photo.net/raj/digital
I think six-megapixels work
Basically you have to use createcanondesc.pl to create the write generator file and then maybe use the six-megapixels.pl file
you need perl to run on your sysetm along with imagemagick.
hope that helps.