Page 1 of 1

Newbee

Posted: 2017-01-10T14:16:15-07:00
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

Re: Newbee

Posted: 2017-01-10T17:19:11-07:00
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.

Re: Newbee

Posted: 2017-01-10T19:11:25-07:00
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 ...")

Re: Newbee

Posted: 2017-01-11T05:14:14-07:00
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!

Re: Newbee

Posted: 2017-01-11T12:09:52-07:00
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

Re: Newbee

Posted: 2017-01-12T00:43:54-07:00
by gre2gor
Ok great. It was just what I need :D

Thank you!

best regards
grega