animated gif colours

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
zeusiv
Posts: 13
Joined: 2011-06-02T09:00:41-07:00
Authentication code: 8675308

Re: animated gif colours

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: animated gif colours

Post 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.
zeusiv
Posts: 13
Joined: 2011-06-02T09:00:41-07:00
Authentication code: 8675308

Re: animated gif colours

Post 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?
zeusiv
Posts: 13
Joined: 2011-06-02T09:00:41-07:00
Authentication code: 8675308

Re: animated gif colours

Post 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
zeusiv
Posts: 13
Joined: 2011-06-02T09:00:41-07:00
Authentication code: 8675308

Re: animated gif colours

Post by zeusiv »

that solved it :roll: :lol: :lol:
thanks for all your help fmw42
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: animated gif colours

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply