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

Slice Auto-size does not respect the actual size of the layer.


Recommended Posts

I have an Affinity Designer document with a number of layers, each representing a single asset for an app.  I am in the process if migrating away from Photoshop.

In the Designer persona, the size of a layer can be seen easily by clicking on the layer and looking in the proper sheet below:

image.png.9eeebb68d75a223c2dcaf2905d6763e0.png

So because I need to use the Export Slices feature I naturally want the slice to match this as closely as possible.

In the Export persona, I find that I have to manually adjust the size and position of the slice for virtually every layer which is very frustrating and slow.

Here is what I've had to do manually:

image.png.0c4894e51e42feb9dbccb2b73dc946f5.png

and if I click on "Revert to Auto Sized", I get:

image.png.73a38868bec76522bce77c86827ce75a.png

So is there a way for the auto size to follow the size of the layer?  What determines this extra boundary or margin?

Thanks

pkclsoft

Link to comment
Share on other sites

What are the contents of that Group in your first screenshot? Why are you clicking on Revert to Auto Sized? It seems correct in your second screenshot already.

Can you share a sample .afdesign document that demonstrates the problem?

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Thanks Walt,

I'm clicking on "Revert to Auto Sized" to demonstrate what I see as a problem.  When I first create the slice from the layer it uses the same slice dimensions as those the "Revert to Auto Sized" button produces.

I guess I'm just trying to understand why the auto size is not a "tight" rectangle around the largest size of the layer and it's contents.

Attached is a cut down of the file containing the pictured layer.  In this I have manually altered the slice size to what I think it should be.  Clicking on the "Revert to Auto Sized" button, to my mind, should give the same result.  I'm trying to understand why it doesn't.  that way, maybe I can improve my process somewhat.

 

demo of slice problem.afdesign

Link to comment
Share on other sites

I've seen that happen, but I've gone to the trouble, especially in the example, of making sure that none of the nested layers exceed the bounds of the hexagon layer, which is the 102.8x118.8 pixels (which I round up to 103x119 for the slice).  So if I'd done it right, and that is the largest layer in themebutton.png, where are the other pixels coming from?

Link to comment
Share on other sites

The issue seems to be with the “Layer 2” layer.
Deleting that layer and then recreating the slice from the themebutton.png group gives a 104x120 slice.
Switching the Outer Shadow and Bevel/Emboss effects OFF, then re-creating the slice, has the same effect.
Only switching one of those effects OFF doesn’t have the same effect.
My guess is that one of those effects (or both) is making the software calculate a larger size, maybe because they are effects which extend beyond the visible part of the layer itself (e.g. a shadow will need to go outside of the shape to be seen).
The group contains all of the layers within it which includes the result of the effects on those layers.

Link to comment
Share on other sites

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.