Jump to content

Recommended Posts

Posted

Some time ago I created a set of macros to resize an image to a fixed maximum size, as described here. Recently @DanThePhotoMan asked about resizing to a fixed minumum size here. I have revisited these macros and created two sets, one resizing to fixed maximum size and the others to a fixed minimum size. They are all based on the following sequence for the maximum set:

Layer > Unlock
Layer > Rasterize and Trim

Filter > Distort > Equations        Enter the following in the x and y fields, substituting your own maximum size, then Apply
   (x/MAXSIZE)*max(h,w)
   (y/
MAXSIZE)*max(h,w)
Document > Clip Canvas
Layer > Rasterize

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

Where MAXSIZE is from the following pixel sizes: 640, 800, 1000, 1280, 1600, 2000.

The set to resize to minimum is similar except that it uses min(w,h) instead of max(w,h) in step 3 (Equations).

There is also a pair of macros to resize to an arbitrary size (up to 4000px). This macro pauses to allow you to enter a parameter a. It is convenient to enter this parameter in the form of MAXSIZE/4000, where MAXSIZE is the maximum (or minimum) required size. For example, if you wanted to resize to 3000px, you would enter 3000/4000, which evaluates to 0.75. (You could enter 0.75 if you wanted.)

Note that the resizing algorithm in the Equations process is not defined.

Here are the macros as a library (.afmacros) file.

Resize.afmacros

John

@Traveler @Gnobelix @affwin @firstdefence

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 months later...
Posted

Thank you John, I haven't taken all that in yet (to early lol) 
But at a glance , resizing is not my problem in a macro. Setting "export'' into a macro seems the impossible task . Yep; I'm lazy and an extra click is just too work rof lol
Will look more closely latter :) 
 

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.