Search found 8 matches

by ElPeta
2020-03-25T20:29:17-07:00
Forum: Users
Topic: Convert Windows batch script to C#
Replies: 3
Views: 1234

Re: Convert Windows batch script to C#

Thanks Snibgo. The difficulty is that I don't know how to do this. How do I build the "composite" command within a loop, and then call it?
by ElPeta
2020-03-25T17:44:48-07:00
Forum: Users
Topic: Convert Windows batch script to C#
Replies: 3
Views: 1234

Convert Windows batch script to C#

Hi all, I have a windows batch script that adds a watermark to every jpg file it finds on a given folder, and sequentially renames it to "IMGxxx.jpg". It works perfectly, but I want to put it in a Windows form in C#. I have already referenced Magick.NET in my C# solution, but syntax is way different...
by ElPeta
2020-03-07T14:05:43-07:00
Forum: Users
Topic: "identify" command in nested FOR loop (windows batch)
Replies: 3
Views: 1612

Re: "identify" command in nested FOR loop (windows batch)

snibgo wrote:
2020-03-01T12:34:05-07:00
You have a loop with "for ... do ... do ...". It should have only one "do".
Thanks, snibgo. But I'm trying to do two nested FOR cycles. Obvioulsy I am doing it wrong, but I can't find why!
by ElPeta
2020-03-01T12:11:14-07:00
Forum: Users
Topic: "identify" command in nested FOR loop (windows batch)
Replies: 3
Views: 1612

"identify" command in nested FOR loop (windows batch)

Hi all, Trying to do a Windows batch script that recursively adds a watermark, and changes its size proportionally according to the size of each image within a folder. Pretty much, this is what script should do: 1. Count the number of files inside a folder to afterwards use variable in for loop. 1a....
by ElPeta
2020-02-16T22:20:30-07:00
Forum: Users
Topic: Store results of "convert" to variable in windows batch script
Replies: 3
Views: 1500

Re: Store results of "convert" to variable in windows batch script

snibgo wrote:
2020-02-16T18:19:30-07:00
A Windows BAT script:

Code: Select all

for /F "usebackq" %%L in (`magick ^
  identify -ping -format "width=%%w\nheight=%%h" ^
  picture.jpg`) do set %%L
This sets the variables named "width" and "height".
Thanks so much, @snibgo!! That does precisely what I need.

Also, thanks for your input, Fred!!!
by ElPeta
2020-02-16T17:58:37-07:00
Forum: Users
Topic: Store results of "convert" to variable in windows batch script
Replies: 3
Views: 1500

Store results of "convert" to variable in windows batch script

Hi all, I'm working on a script that recursively adds a watermark to a series of images of different sizes in a folder. I need to modify the size of the watermark for each picture so that it is to the image it is being added to. To achieve that, I need to find out the width and height of the image, ...
by ElPeta
2019-08-30T23:06:39-07:00
Forum: Users
Topic: Add watermark to several files with different sizes from command line
Replies: 2
Views: 4468

Re: Add watermark to several files with different sizes from command line

Thanks so much, Fred! That worked like a charm! :D
by ElPeta
2019-08-30T17:08:39-07:00
Forum: Users
Topic: Add watermark to several files with different sizes from command line
Replies: 2
Views: 4468

Add watermark to several files with different sizes from command line

Hi all, First time user, loving IM so far! I am creating a batch script (Windows) that programatically adds the same watermark to many pictures. My script already works, however, since the pictures are different sizes, watermark is not consistently added at the same position. Also, I need the waterm...