-draw DstIn

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Marcel71
Posts: 49
Joined: 2011-04-13T13:57:34-07:00
Authentication code: 8675308

-draw DstIn

Post 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
Marcel71
Posts: 49
Joined: 2011-04-13T13:57:34-07:00
Authentication code: 8675308

Re: -draw DstIn

Post by Marcel71 »

Never Mind above, I got a work-around in IM 7 I think :)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -draw DstIn

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