VASSAL and ImageMagick

I made a website that collects different tutorials on ImageMagick use in context of wargame counters and VASSAL module design:

vassal.pl/

Maybe some of you will find it useful.

For others (like me) who may have been interested in seeing this content, it appears that the website domain is now unclaimed.

Try here. Perhaps someone can make a Documentation post out of it.

Yours,
Christian

1 Like

Thanks Christian! - that content appears to be exactly what I was looking for!

I can’t make any promises, but I’ll look into capturing it into the Vassal documentation page.

Will that link to the archived website remain valid “forever”, or will it expire after some time?

Cheers,
Jim Hunter.

1 Like

As long as the Wayback machine is funded, it will most likely stay there. However, it would make sense to put it on the VASSAL site as that is the most likely place people will look for such information.

Agreed. I just wanted to know the time urgency.

See here for a script that does the most common operations.

1 Like

Hi Christian,

I did see your post last night. I was very excited to try it but this morning was my first opportunity. It works perfectly, and the timing is perfect for me.

I had previously installed ImageMagick onto my Mac and used it to extract the counters from the counter sheets for the 2024 edition of Normandy '44. I am now ready to try using it to make the counters “pretty”.

My goal is to make them look like the ones that are found in the current (v0.94) version of the Normandy '44 vassal module, like this:

US-4-8

Instead of drop shadows, the top and left sides fade lighter and the bottom and top sides fade to black. This gives them a very nice three dimensional appearance while retaining their original 84x84 pixel dimensions.

The best of my initial attempts to use your script to reproduce this appearance produced this look:

test_out

I used these arguments:

piece_manip.sh --shave 2 2 --rounded 5 --drop 4 black 4 100 test.png

The drop down shadows also give a 3D look, but not the same. Also, the dimensions of the counter have grown to 96x96.

I intend to reach out to the Normandy 44 vassal designers on BoardGameGeek to see if they still have the original formula that they used to produce those counters, but if I am unsuccessful, I will appeal to the vassal community for help.

Thank you very much for producing that script!

Cheers,
Jim Hunter.

1 Like

Looks like something that you’d routinely see people produce from using Paintshop Pro back in the day, using some kind of 3D bevel/buttonize effect that it had.

I’m sure ImageMagick can do the equivalent if you know the syntax backwards and forwards, which I don’t.

Hi Jim et al,

I just made a post in case someone was monitoring this thread :slight_smile:

Great. Good to know that it works.

The image above doesn’t have a drop shadow really. Rather, it’s a shaded “bevel”. However, the --bevel option of piece_manip.sh (which uses magicks -raise operation) only works on the edges of the bounding box of the image. That means, it cannot produce the effect you have above.

I think, perhaps, the right Imagemagick operation is rather -frame (examples) but with a bit more operations. Essentially, starting from an image with rounded corners, I think one need to make another image (-clone), fill it wit some colour, shrink it a bit, then add a frame, turn the colour to transparent, and compose it with the original image.

Hint: Use three back-ticks around “code”, as ``` code ``` (as edited above), to make things like command lines etc. easier to read - or put on separate line, indented by four space, like so

piece_manip.sh --shave 2 2 --rounded 5 --drop 4 black 4 100 test.png

Personally, I prefer the kind of drop shadow you got above, especially because it will cast a shadow on the board and other pieces beneath it - I think that looks better. But, I get you’d like the bevel-like shading too.

When you do

--drop SIZE COLOUR FADE OPACITY 

then SIZE pixels will be added to the bottom and right side of the image, and 1.5 times FADE pixels will be added to the all edges of the image. In your case

84 - 2 * 2 (shave) + 4 (drop SIZE) + 2 * 1.5 * 4 (FADE) = 96

You can set SIZE=0 and shave off a few more pixels. However, a drop-shadow, like the one above, will increase the size of the image.

I’ve updated the script a bit (re-download). Some optimisations and such. But I’ve also added the operation -shade which will do the smooth bevel you have above. See the page on the script.

Yours,
Christian

Hi Christian,

Your addition sounds like it may be exactly what I need. However, the download link found on the updated documentation page downloads a version that does not include the new –shade feature. Have the GitHub contents been updated?

Cheers,
Jim Hunter.

Hi Jim,

Sorry, my mistake - forgot to push the changes. Try now.

Yours,
Christian

Hi Christian,

That worked. I now have the new –shade feature, and I’m playing with it now. I’m still trying various combinations of script options, but it looks like this will fill my need.

I am really grateful for your work on this. It was a huge time saver for me, and I suspect it will be for a lot of other vassal module designers also.

Cheers,
Jim.

BTW, I found a couple of nits with the –long-help output. The line which begins the –shade section is indented too far, and the line which begins the –rounded section has a typo (–rounced).

LOL need to convert all the modules to clipped counter looks to drive the unclippers cra cra lol!