Batch Edits with Affinity Photo 2

We live in a wonderful age of content! There are amazing artists making content available online on platforms like Patreon and Itch.io. One such creator that I discovered was Steven Colling. He creates wonderful resources that I thought would work perfect for my Hex Crawls.

However, after I downloaded the hex tiles, I realized they weren't cropped for use with FoundryVTT. After a bit of experimentation I discovered that Foundry needs Hex tiles to be cropped properly, so I set to work with Affinity Photo. Here is my process incase you need to do the same thing.

I recommend making a back up of the files before proceeding.

Before we open Affinity, some file clean up.

Open the folder where your hexes are and move the "overlays folders" out of the main folder. We do this because we don't want the batch process to touch these files (they are sized differently than the hex tiles). 

Also delete the folders you don't need. I only use the "flat" hexes so I deleted the "pointy" folders.

In your Finder, do a search in the main image folder to find all the .txt files that are included with the images. 

These are for the tile edit tool that can be used to customize the tiles, but aren't needed for my use case.

Delete these.

Open a hex file in Affinity Photo. You can see that there is a region around the hex that we need to remove before we can use the image in FoundryVTT.

You can see in the "Transform" box that the image is 725w x 628h.

Go to the "Macro" panel and click the red record button. If it isn't open, find it in the "Window" menu.

Go to "Resize Canvas" in the Document menu and set the canvass size to 725 x 628. Be sure to turn off the restrain option (the link between the width and height) and resize from the middle (the white box in the middle).

You will see that the canvas is now the same size as the hex.

Hit the stop button in the "Macro" panel.

Add this new macro to the library using the button third from the right (the one with the plus sign).

Name the macro and check for it in your "Library" panel. I called mine "Isle_of_New".

Again, if the Library window isn't visible, open it from the Window menu.

Close the image you were working on. Don't Save it, as you will batch process this later.

Select "New Batch Job" from the File menu.

Set the batch job up based on your needs. I set mine to overwrite the files with PNGs. Select the macro(s) you want to use and click "Apply" to move them over to the "Applied Macros" window.

Click the "Add" button at the bottom of the left pane to add the images you want to batch convert.

On Mac, you can use shift and command keys to select multiple files. To select all the files at once, do a search in the folder with all your sub-folders for ".png" to select all images at once.

You will see all the files in the left hand pane.

Click OK.

The window will close and you will see the batch files being processed (unless they are done already).

Confirm that the files were cropped.

Your files are now ready for use in FoundryVTT. Next time we will explore how ti use these files in FoundryVTT.

Enjoy.