PDA

View Full Version : Batch resizing of tokens



lachancery
February 1st, 2012, 05:05
I have downloaded/bought tokens of various dimensions. I would like to scale all of them to a specific grid size. I've been doing this task manually with Gimp (don't have a license of Photoshop). Is there a batch script out there to automate this task?

Trenloe
February 1st, 2012, 08:30
I just use a photo resizing tool. Like fotosizer (https://www.fotosizer.com/) which is free and does the job.

Dakadin
February 1st, 2012, 16:09
I've successfully used this with GIMP: https://registry.gimp.org/node/24464.

I just used a DOS command to run it as a batch depending on which parameter I was modifying. Here are samples setting the parameters to 100.


First Parameter
for %1 in (*) do "C:\Program Files (x86)\GIMP-2.0\bin\gimp-console-2.6" -i -b "(resize_match_dpi \"%1\" \"%1\" 100 0)" -b "(gimp-quit 0)"

Second Parameter
for %1 in (*) do "C:\Program Files (x86)\GIMP-2.0\bin\gimp-console-2.6" -i -b "(resize_match_dpi \"%1\" \"%1\" 0 100)" -b "(gimp-quit 0)"

psicodelix
February 1st, 2012, 22:15
Irfanview has a batch conversion utility too...

Griogre
February 2nd, 2012, 00:23
I love IrfanView but it doesn't handle transparency unless it has changed recently so if you have top down tokens you probably can't use it.

wbcreighton
February 3rd, 2012, 05:55
You could look here:

https://www.fantasygrounds.com/forums/showthread.php?t=10812

Gives instructions on using Imagemagick to resize images and create a png file. Might be useful. There is also an outdated script for downloading images of DnD miniatures from web sites. I used the script and batch files to create DnD and Star Wars token from web site images.