Jump to content

Recommended Posts

Posted

I'm trying to use Affinity Photo to resize various images (book covers) proportionally to fit centrally onto a white canvas 720px square. I'd also like them to save as the name of the file ready for upload to our website. I'm a newbie to Affinity and batch processing generally. Thanks. 

Posted

My macros scale the image proportionally, but to not fit to a canvas. The Macro below applies a similar macro to the others, but scales the document to 720px max. It then Resizes the canvas to 720px square, with the image centred on a transparent background. Let me know if you wanted a white background.

Fit to 720px square.afmacro

It should work as part of a batch process.

John

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

  • 4 weeks later...
Posted

Hi John,

Thanks for you're reply and macro. Sorry it's taken so long to get back to you, things have been a bit strange for the past month or so.

I've installed the macro and run it as a batch process, half the files were produced brilliant results but the other half something strange happened. I think it's enlarged the image but cropped it to the original size.

I've at attached some examples in case anyone can shed any light on the issue.

Thanks,

Daniel 

9781781723982.jpg

9780571338757.jpg

9780571338757.jpg

9781781723982.jpg

  • 3 years later...
Posted
On 3/23/2020 at 7:58 AM, John Rostron said:

My macros scale the image proportionally, but to not fit to a canvas. The Macro below applies a similar macro to the others, but scales the document to 720px max. It then Resizes the canvas to 720px square, with the image centred on a transparent background. Let me know if you wanted a white background.

Fit to 720px square.afmacro 1.35 kB · 10 downloads

It should work as part of a batch process.

John

 

This macro works great, but there were a couple things I wanted to ask how to do on there.

Like how can I make it 1500px and black background?

Fit to 720px square.afmacro

Posted

@KFreshDetroit, Sorry for the delay.

You can easily amend the first part of the macro to resize to 1500px. However, you will need to set the background colour to black before you run the macro (unless any Affinity guru can tell me otherwise).

Here is the resizing macro:

Layer > Unlock
Layer > Rasterize and Trim

Filter > Distort > Equations     
 
(Enter the following in the x and y fields,  then Apply)
   (x/1500)*max(h,w)
   (y/
1500)*max(h,w)
Document > Clip Canvas
Layer > Rasterize

Select > Alpha Range > Select Partially Transparent
Edit > Fill> Inpainting
Select > Deselect

The second part would be:

Document > Resize Canvas
   Unlock the link between width and height, set both to 1500. Click on [Resize].
Layer > New Fill Layer
   (This creates a Black Fill Layer on top of your image, assuming your background colour is set to black. )
Arrange > Move Back One
   This moves the layer behind your image

Here is the macro:

Fit to 1500px square.afmacro

John

 

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.