Jump to content

Recommended Posts

Posted

Dear Community,

Is there any chance to create slices programatically, automatically in Affinity Photo. I have to export a picture with different aspect ratios, and It would be the best way to prepare the slices on multiple images (hundreds of files).

I have to do these same steps for hunderds of affinity files: set two slices.

Thanks: Bela

 

image.thumb.png.44fcead9204c2c7a03ada943e070a739.png

Posted
27 minutes ago, RBeci said:

Is there any chance to create slices programatically, automatically in Affinity Photo.

I am almost certain there is not possible using only AP but someone may have an idea of how to do that.

All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Posted
8 hours ago, RBeci said:

Is there any chance to create slices programatically, automatically in Affinity Photo.

Not in/with APh.

But it should be easy to do that with some tool like ImageMagick and/or via Scripting in any scripting language. - See for example ...

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Posted
6 minutes ago, v_kyr said:

Not in/with APh.

But it should be easy to do that with some tool like ImageMagick and/or via Scripting in any scripting language. - See for example ...

OH, Thank you so much for you advices!

But It would be great If that would be in AP because after primary placement i have to relocate the slices to proper positions.

Posted
26 minutes ago, RBeci said:

But It would be great If that would be in AP because after primary placement i have to relocate the slices to proper positions.

Well you also can perform placements/move transforms with tools like ImageMagick, but you need to know the coordinate pixel values where to place things, as there's no interactive WYSIWYG GUI preview for this in this scripting approach.

For APh itself such things could be (hopefully) done in future, once they included scripting capabilities to the tool.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Posted
1 hour ago, RBeci said:

But It would be great If that would be in AP because after primary placement i have to relocate the slices to proper positions.

I don't understand that but here's an example using ImageMagick from the command line

magick *.webp -crop 400x300+10+50 +repage -quality 90 -set filename:f %t_%wx%h %[filename:f].jpg

will process all the webp files in a folder taking a slice 400 width, 300 height from X=10, Y=50, you can get these values from Photo after making your slices
then it will save a jpeg at quality 90 with the image dimensions appended to the filename

For multiple slices create a batch file, note % has to be %% in Windows, no idea about Mac eg
magick *.webp -crop 400x300+10+50 +repage -quality 90 -set filename:f %%t_%%wx%%h %%[filename:f].jpg
magick *.webp -crop 200x250+50+150 +repage -quality 90 -set filename:f %%t_%%wx%%h %%[filename:f].jpg
magick *.webp -crop 350x350+100+150 +repage -quality 90 -set filename:f %%t_%%wx%%h %%[filename:f].jpg

image.png.26b12121e52ce8dcfafc87e410c99d83.png

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

  • 2 weeks later...

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.