Jump to content
You must now use your email address to sign in [click for more info] ×

How do I export layers that are cropped to the document in Affinity Photo?


Recommended Posts

Quick Explanation

When I try to export slices created from layers, the output files are not cropped to the document. I can "Rasterize & Trim" each layer to get the desired output, but I'd like a non-destructive way to do it. Any ideas?

 

Detailed Explanation

I'm taking photos of a number of products, each of which have 6 photos of the same size.

My goal is to keep one AFPhoto file per product with each of the 6 photos as layers, with all edits made non-destructively, and then export each photo with a lower resolution (for web) in bulk to a designated "Processed Photos" folder.

Here's my current, problematic workflow:

  1. Open up all product photos as layers in one AFPhoto file
  2. Perform various edits, including rotating, cropping, etc to each layer
  3. Create slices from layers in Export Persona
  4. Set up export settings and export each slice to the destination folder

The problem is that the output files are not cropped to the document boundary as shown in AFPhoto.

I can solve this problem by selecting each layer and choosing "Rasterize & Trim", but this is destructive, which I don't want.

Appreciate the help. I'm guessing it's a pretty simple solution, but I'm an amateur at this software.

Link to comment
Share on other sites

6 hours ago, affinitydesignerfan said:

The problem is that the output files are not cropped to the document boundary as shown in AFPhoto.

Can you provide a sample/screenshot? I always export only what is bounded in the relevant Slice.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

Quickest easiest way is to use the bottom layer you already have as a clipping mask for each of the watch pictures. First delete all the slices you currently have then duplicate the bottom layer 6 times and use one for each picture as a clipping mask. Now regenerate the slices by using the layers to slices feature.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

Also, if I rotate the image and then add the rectangular clipping mask, I get another issue (see images). How do I solve this? It seems like you somehow solved it with the last file haakoo... (Edit: the example I gave did not include rotations, but in fact there frequently are attempts to straighten the image)

(Edit 2: The rotation does NOT affect the exported file, so this wasn't an issue after all.)

Screen_Shot_2021-02-01_at_6_48.18_PM.png

Screen_Shot_2021-02-01_at_6_48.27_PM.png

Screen_Shot_2021-02-01_at_9_57.00_PM.png

Link to comment
Share on other sites

The clipping is the last step in the editing process, do that only before you are ready to export.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

  • 2 weeks later...

Honestly, this is absurd. If I wanted to export all of the layers and ignore the document sizing, crop, and positioning that I've made then all Affinity Photo is doing is exporting the original photos back into new files. That's not exporting layers... that's exporting source images back into new files of the same source images! I cannot believe that such a basic Export Layers function is missing when it is absolutely required by just about anyone working with photography for websites. The Export Persona tool is a weird and complicated side step to make you manually do the thing you were trying to automate... but then it doesn't even do that. It doesn't slice to the dimensions of the document, it just goes back to source for every layer. So why bother "slicing"?. I just can't figure out how anyone thought this makes sense? This is a design tool, not a super complicated graphic format conversion app.

Link to comment
Share on other sites

  • 6 months later...
3 hours ago, concep86 said:

Why cant Persona export just the visible area? 

Welcome to the Affinity Forums

If you're talking about a canvas or an artboard, I understand you. 

If you put the layer in a transparent rectangle the size of the canvas, the slice will also be created in the size of the canvas.
But this could be a solution, for fewer number of layers.

Link to comment
Share on other sites

1 hour ago, concep86 said:

I have a file that has 400 layers, perfectly sized and placed.

This sounds like "Frame-By-Frame" animation.

Link to comment
Share on other sites

2 hours ago, concep86 said:

Why cant Persona export just the visible area?  

Export Persona, Layers panel, Select layer, Create Slice? 

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

See attachment.  I have 5 layers selected.  When I click Create Slices...  

My slices all have different sizes.  Seem like the only way to get my files to be the size that I created is to export manually.

FYI,  This is a file I created to standardize the file dimensions for a shopping cart.  Each product has up to 5 images.  So I have hundreds of images to export.

 

Doing it manually would be too painful.  Help!

DIFFERENT-SIZE-SLICES.png

Edited by concep86
Link to comment
Share on other sites

Link to comment
Share on other sites

Variant for AP

1. Create a rectangle the size of the canvas.
2. Place the layer in the rectangle.

But it may be difficult or impossible for you if 400 files, each with 5 layers, have already been created.

Link to comment
Share on other sites

In this kind of a job you could first create slices in the Export Persona for all 400 layers in one operation and then export all slices in one go to desired resolutions. The resulting PNGs would have the original w/h ratio of each image, but they would have the cropped image at canvas w/h ratio on a transparent background. All the exported PNG images could then be trimmed (transparent bg removed) and rasterized and saved to final PNGs by using File > New Batch Job, and applying a macro:

 

 

Trim_and_rasterize.afmacros.afmacro

Link to comment
Share on other sites

  • 8 months 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.