Page 2 of 2

Re: animated gif colours

Posted: 2011-06-03T08:40:01-07:00
by zeusiv
unbelievable

convert -size 1000x1000 xc:"rgba(0,0,0,0)" `
-fill green -draw "rectangle 200,200 400,400" `
-fill red -draw "rectangle 300,300 500,500" `
-fill blue -draw "rectangle 400,400 600,600" `
-fill yellow -draw "rectangle 500,500 700,700" `
-fill cyan -draw "rectangle 600,600 800,800" `
-fill magenta -draw "rectangle 700,700 900,900" `
tp.png

Image

convert tp.png tp.gif

Image

Re: animated gif colours

Posted: 2011-06-03T09:56:56-07:00
by fmw42
convert -size 1000x1000 xc:"rgba(0,0,0,0)" `
-fill green -draw "rectangle 200,200 400,400" `
-fill red -draw "rectangle 300,300 500,500" `
-fill blue -draw "rectangle 400,400 600,600" `
-fill yellow -draw "rectangle 500,500 700,700" `
-fill cyan -draw "rectangle 600,600 800,800" `
-fill magenta -draw "rectangle 700,700 900,900" `
tp.png
You don't say what version of IM nor what platform. Line feeds are not `, but \ on unix and ^ on Windows


This works perfectly fine for me on IM 6.7.0.2 Q16 Mac OSX Tiger


convert -size 1000x1000 xc:"rgba(0,0,0,0)" \
-fill green -draw "rectangle 200,200 400,400" \
-fill red -draw "rectangle 300,300 500,500" \
-fill blue -draw "rectangle 400,400 600,600" \
-fill yellow -draw "rectangle 500,500 700,700" \
-fill cyan -draw "rectangle 600,600 800,800" \
-fill magenta -draw "rectangle 700,700 900,900" \
tp.png

convert tp.png tp.gif

Both images have the same colors.

Re: animated gif colours

Posted: 2011-06-03T11:55:06-07:00
by zeusiv
zeusiv wrote:p.s.
convert -version
Version: ImageMagick 6.6.9-8 2011-05-04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

OS: windows 7 64 bit
powershell uses a backtick for continuation

maybe it is a 64bit thing

is there a special version for 64bit machines?

Re: animated gif colours

Posted: 2011-06-03T12:56:53-07:00
by zeusiv
looking at my downloads i got the 64bit version
ImageMagick-6.6.9-8-Q16-windows-x64-static.exe
downloading the
ImageMagick-6.7.0-3-Q16-windows-x64-static.exe version now
see if that helps

Re: animated gif colours

Posted: 2011-06-03T14:16:16-07:00
by zeusiv
that solved it :roll: :lol: :lol:
thanks for all your help fmw42

Re: animated gif colours

Posted: 2011-06-03T18:01:37-07:00
by anthony
Note you do not have to have lots of separate -draw commands you can do it with just one draw command,
... -draw '
fill green rectangle 200,200 400,400
fill red rectangle 300,300 500,500
fill blue rectangle 400,400 600,600
fill yellow rectangle 500,500 700,700
fill cyan rectangle 600,600 800,800
fill magenta rectangle 700,700 900,900
' ...
Under UNIX you don't actually need '\' within the multi-line single quoted argument, (unless you use csh or tcsh)

The MVG draw command language can also be written as a "MVG" file and just read in.
For details see IM Examples, Draw, MVG Reading
http://www.imagemagick.org/Usage/draw/#reading