Page 1 of 1

Development of an extension for ImageMagick

Posted: 2018-03-01T15:08:23-07:00
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.

Re: Development of an extension for ImageMagick

Posted: 2018-03-01T16:01:30-07:00
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.

Re: Development of an extension for ImageMagick

Posted: 2018-03-01T16:28:07-07:00
by fmw42

Re: Development of an extension for ImageMagick

Posted: 2018-03-10T15:12:39-07:00
by nagame
I thank you for that precise answer. It's perfect, we will be able to realize our filter.