Convert creates black instead of transparent GIFs from 3x1 up to 256x1 sizes

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
Eovne
Posts: 1
Joined: 2018-05-31T02:41:35-07:00
Authentication code: 1152

Convert creates black instead of transparent GIFs from 3x1 up to 256x1 sizes

Post by Eovne » 2018-05-31T02:53:09-07:00

>convert -version
Version: ImageMagick 6.7.7-10 2017-07-31 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
>uname -a
Linux ubuntu 4.4.0-124-generic #148~14.04.1-Ubuntu SMP Thu May 3 07:26:53 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

this command:
>convert -size 100x1 canvas:transparent 100x1.gif

creates odd gif file 521 bytes in size which looks black any way I look at it. it is true for any width from 3 to 256 and for heights 1 and 2 at least
on the other hand, this one works just fine:
>convert -size 257x1 canvas:transparent gif:- | convert - -crop 100x1+0+0 +repage 100x1.gif

it produces perfectly transparent 49 bytes gif of needed size

WBR Eugene

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

Re: Convert creates black instead of transparent GIFs from 3x1 up to 256x1 sizes

Post by snibgo » 2018-05-31T03:21:25-07:00

Code: Select all

convert -size 100x1 canvas:transparent 100x1.gif
The result is transparent in more recent versions of IM, such as v6.9.5-3 and v6.9.9.40. Your version, v6.7.7-10 is very old. I suggest you upgrade.
snibgo's IM pages: im.snibgo.com

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

Re: Convert creates black instead of transparent GIFs from 3x1 up to 256x1 sizes

Post by fmw42 » 2018-05-31T09:20:16-07:00

I can confirm your issue on 6.7.7.10 Q16 Mac OSX Sierra. But as snibgo says, it works with more current versions of ImageMagick. So the only thing you can do is upgrade. I tested on 6.7.8.9 and it works fine there.

Post Reply