Page 1 of 1

Developing New Module

Posted: 2007-03-22T15:15:45-07:00
by john_thur
I have searched and haven't found it so my appoligies if I am wasting your time.

I am in the process of adding support a Zebra Printer ZPL graphic format. Is there a quick reference for creating a new image format?

I have copied mono.c and create a new one called zebra.c and modified the Makefile.in I am able to make and make install it. And and runs, but want to follow a standard if there is one.

Re: Developing New Module

Posted: 2007-03-23T07:39:08-07:00
by magick
To create a new coder module start with an existing module and copy it to the new format name, as in your case zpl.c. Next, modify it to support the format. You can choose from read and write support or just read or write. This is controlled in the RegisterZPLFormat() method. Next modify the Makefile.am and include ZPL (just copy another format and make appropriate changes). If the format has a magic number add it to config/magic.xml and if it has any aliases add it to config/coder.xml. Edit magick/static.h and magick/static.c and add your Register/Unregister methods there. Now rebuild the autoconf/automake files and make and install your new format. Test it and the consider contributing the module to the ImageMagick project under the license. Post a URL to your module and we will download it and include it in a future ImageMagick release.