Development of an extension for ImageMagick

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
nagame
Posts: 10
Joined: 2018-02-18T16:43:03-07:00
Authentication code: 1152

Development of an extension for ImageMagick

Post by nagame »

Hello,

I use ImageMagick a lot in my command line scripts (lots of Linux shell) for automatic processing and format conversion. I would like to develop a filter extension for ImageMagick. What is the best method?

My goal is to add a custom filter just before converting to the output format.

Ex: convert -resize 50x80 -colorspace 'sRGB' -background white -alpha remove -alpha off -trim ... -customfilter "myfilter, myparam1, myparam2" file.eps file.jpg

The filter is an image processing (before conversion to the output format) that is really specific to my job. I would prefer C ++ language but I can adapt another language.

Thank you for your help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Development of an extension for ImageMagick

Post by snibgo »

IM has that facility, but the keyword is "-process" not "-customfilter".

A process module can do anything you want. Typically it modifies all the images in the current list, or replaces them all with a single image. I have published some at Process modules. They are written in C, and are linked in to IM when it is built. I expect they could be written in C++ instead.

PS: your command should read the input, do the processing, then write the output.
snibgo's IM pages: im.snibgo.com
nagame
Posts: 10
Joined: 2018-02-18T16:43:03-07:00
Authentication code: 1152

Re: Development of an extension for ImageMagick

Post by nagame »

I thank you for that precise answer. It's perfect, we will be able to realize our filter.
Post Reply