Page 1 of 1

-draw DstIn

Posted: 2019-10-05T06:59:27-07:00
by Marcel71
Hi Guys,

Could you confirm if this is a bug or not?

I am trying to cut out a piece of text from an animated gif. In IM6 this was giving a different result then in IM7

Input image:
Image

Command (In IM7 i put 'magick' before the convert).

Code: Select all

convert animated_transparent.gif -coalesce -alpha set -respect-parentheses \( -background none -fill red -font Arial-Bold -pointsize 100 label:"Birdy" -virtual-pixel background -bordercolor none -border 40% -write mpr:text -delete 0--1 \) -gravity NorthWest -draw "image DstIn 0,0 0,0 'mpr:text[0]'" -background none -write mpr:stroke -background "#00bfff" -shadow 100x6+0+0 null: \( mpr:stroke \) -layers composite -trim +repage out.gif
Result in IM6.8.7-9
Image

Result in IM7.0.8-66
Image

There are 2 problems with IM7
1) It does not clear the background image, while this should be the case according to the documentation:
These 'clearing' methods are: 'Src', 'In', 'Dst_In', 'Out', 'Dst_ATop', and 'Clear'.
2) It does not handle the animated frames properly so the end image is moving left-right.

The wrong output was created on Ubuntu 18.04
Version: ImageMagick 7.0.8-66 Q16 x86_64 2019-09-29 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib

Re: -draw DstIn

Posted: 2019-10-05T11:24:08-07:00
by Marcel71
Never Mind above, I got a work-around in IM 7 I think :)

Re: -draw DstIn

Posted: 2019-10-05T11:43:05-07:00
by magick
Let us know your work-around. IMv7 behavior differs from IMv6 per https://imagemagick.org/script/porting.php but in some cases, it could be a bug.