Newbee

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
gre2gor
Posts: 3
Joined: 2017-01-10T13:56:29-07:00
Authentication code: 1151

Newbee

Post by gre2gor »

Hi,
I am totaly new here. I was looking to do some scripting trough Powershell and GIMP and some friendly guy suggested that I should take a look at Imagemagick. It has been a while since I had some scripting with Ghost and EPS.
I am a non professional streamer, who streams my sons ice hockey games. I would like to have some scripted graphics in my broadcast.

I am asking gurus here if they can point me in the right direction and maybe even give me some jump start with some samples.

I have a graphic for the shootout in the game. Curently I am using Photoshop with Action that draws me on "x" or "o" and then exports as ATEM image to be loaded in Blackmagic ATEM TV Studio. I wonder if this task is doable with Imagemagick? It all happens on the same computer. Which Imagemagick version should I choose? You can see the image on this URL.
https://s30.postimg.org/d4edq2fy9/shootout.png

Image has to be 1920x1080 with ALPHA mask and saved as a TGA. I can load this image with Powershell. The part that loads this image I have alreay in Powershell. I would just need a script that draws this "x" or "o" and result based on the values that Powershell script directs.

Thank you in advance for any help or time you will spend helping me.

Best regards
Grega
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Newbee

Post by snibgo »

Do the "o" and "x" come from graphics files with pixels, or are they painted as vectors? Either way, IM can do it.

If you haven't used IM before, it's probably best to start with v7. However, most of the documentation refers to v6.

I don't know Powershell and can't help with that. But PS can simply execute IM commands, with parameters that would give the position for the "x" or whatever.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Newbee

Post by fmw42 »

For command line Imagemagick and newbies, see the IM 6 examples docs. Then replace convert with magick for IM 7.

http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
http://www.imagemagick.org/script/comma ... ptions.php

I do not know Powershell, but perhaps you can simply make calls to IM command line with some exec() like command in Powershell. Many programming tools allow calls to other tools. For example in PHP you can use exec(" ... IM command line ...")
gre2gor
Posts: 3
Joined: 2017-01-10T13:56:29-07:00
Authentication code: 1151

Re: Newbee

Post by gre2gor »

I managed to get a working exe now ...

is there a chance somebody would want to write me a script that adds yellow "x" on my image? With so many options in Imagemagick... I am somehow lost. It yould be a huge push for me.
Thank you!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Newbee

Post by fmw42 »

Use -annotate to draw the character "x" where desired.

Example using the IM internal image (logo:). For real images, it would be name.suffix and no ":"

The X will be placed in the bottom right corner (southeast)

Code: Select all

convert logo: -font arial -pointsize 48 -gravity southeast -fill yellow -annotate +0+0 "X" logo_x.png
Image

You can adjust the position using -gravity and also changing the +0+0.

See
http://www.imagemagick.org/Usage/text/#annotate
http://www.imagemagick.org/script/comma ... hp#gravity
gre2gor
Posts: 3
Joined: 2017-01-10T13:56:29-07:00
Authentication code: 1151

Re: Newbee

Post by gre2gor »

Ok great. It was just what I need :D

Thank you!

best regards
grega
Post Reply