Developing New Module

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.
Locked
john_thur

Developing New Module

Post 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.

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: Developing New Module

Post 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.

Locked