When did floodfill syntax change?

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.
Posts: 5
Joined: 2018-12-07T01:06:31-07:00
Authentication code: 1152

When did floodfill syntax change?

Post by hackerb9 »

A while ago I wrote a script, mktrans, that gives any image antialiased transparency using a floodfill. I was testing it on the development version of Ubuntu (Cosmic Cuttlefish) and was surprised it no longer works because the floodfill syntax has changed. The version of ImageMagick that comes with Cosmic Cuttlefish currently is 6.9.10. Specifically,
Version: ImageMagick 6.9.10-8 Q16 i686 20180723 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
My script works fine on Debian GNU/Linux, but they offer an older version of ImageMagick (6.9.7-4 Q16 x86_64 20170114 ).

Here is an example that shows the problem. (Note, I'm outputting to sixel, presuming a terminal like mlterm or xterm/vt340 that can display images inline).

This is the syntax that works in the older version of ImageMagick (6.9.7):

Code: Select all

convert logo: -fill saddlebrown -floodfill +0+0 white sixel:-
But, I had to swap the colors to get it to work in the newer version (6.9.10):

Code: Select all

convert logo: -fill  white -floodfill +0+0 saddlebrown sixel:-
When did this change? I tried searching around, but couldn't find the needle in the haystack of ImageMagick documentation and bug reports.

Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: When did floodfill syntax change?

Post by snibgo »

See my bug report viewtopic.php?f=3&t=34636&sid=86fd4ba8c ... dbc869a407

I haven't downloaded a fixed version, so can't confirm your finding. Please post a reproducible example, with input images (if any) and output images.
snibgo's IM pages: im.snibgo.com

User avatar
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: When did floodfill syntax change?

Post by fmw42 »

I do not know anything about the change to -floodfill. But I always use -draw "color x,y floodfill" -alpha off. That could be a workaround for you.

Perhaps you should post your issue with -floodfill to the Bugs forum.