Command to create this simple image?

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?".
Post Reply
Severian
Posts: 3
Joined: 2016-05-13T18:03:34-07:00
Authentication code: 1151

Command to create this simple image?

Post by Severian »

Hi, I'm trying to use imageMagick to create this:
Image
(just the colors, the numbers are for reference)

My goal is to compare it with the same image created by a program I made. I tried reading convert usage but, being honest, I ended up confused and without a clue.

So, is there a command that can directly create this?

Thanks in advance
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Command to create this simple image?

Post by snibgo »

Something like this:

Code: Select all

convert -size 50x50 ( xc:blue xc:lime +append ) ( xc:red xc:white +append ) -append -bordercolor black -border 2 x.png
snibgo's IM pages: im.snibgo.com
Severian
Posts: 3
Joined: 2016-05-13T18:03:34-07:00
Authentication code: 1151

Re: Command to create this simple image?

Post by Severian »

Cool, that didn't work (syntax error on "(" or something like that) but following the idea I managed to do it.

Thanks a lot!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Command to create this simple image?

Post by snibgo »

You didn't say what shell you used. If you had problems with "(" then I deduce you use bash, so should escape parentheses.

Code: Select all

convert -size 50x50 \( xc:blue xc:lime +append \) \( xc:red xc:white +append \) -append -bordercolor black -border 2 x.png
snibgo's IM pages: im.snibgo.com
Severian
Posts: 3
Joined: 2016-05-13T18:03:34-07:00
Authentication code: 1151

Re: Command to create this simple image?

Post by Severian »

Yeah, forgot about that. Thank you very much!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Command to create this simple image?

Post by fmw42 »

Please always provide your IM version and platform when asking questions, since syntax differs.

See viewtopic.php?f=1&t=9620, which is the top-most link on this forum.
Post Reply