RBeci Posted May 25, 2023 Posted May 25, 2023 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 Quote
R C-R Posted May 25, 2023 Posted May 25, 2023 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. RBeci 1 Quote 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 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
Staff Callum Posted May 25, 2023 Staff Posted May 25, 2023 As far as I'm aware this isn't possible I'm afraid. RBeci 1 Quote Please tag me using @ in your reply so I can be sure to respond ASAP.
v_kyr Posted May 25, 2023 Posted May 25, 2023 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 ... ImageMagick Extracting a region of an image with ImageMagick Extract a subset of an image with ImageMagick ... etc. RBeci 1 Quote ☛ 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
RBeci Posted May 25, 2023 Author Posted May 25, 2023 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 ... ImageMagick Extracting a region of an image with ImageMagick Extract a subset of an image with ImageMagick ... etc. 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. Quote
v_kyr Posted May 25, 2023 Posted May 25, 2023 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. Quote ☛ 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
David in Яuislip Posted May 25, 2023 Posted May 25, 2023 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 RBeci 1 Quote 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
Recommended Posts
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.