Jump to content

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

   Desktop: new:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090  (old: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970 )
   Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Affinity Photo 1.10.5 (.1342) and 1.10.5.1342 Beta   / Affinity Designer 1.10.5 (.1342) and 1.10.5.1342 Beta  / Affinity Publisher 1.10.5 (.1342) and 1.10.5.1282 Beta
 iPad Pro M1, 12.9", iPadOS 15.6.1, Apple Pencil 2, Magic Keyboard

  Affinity Photo 1.10.5 (.280) and 1.10.2 (.266) Beta / Affinity Designer 1.10.5 (.21) and 1.10.3 (.19) Beta 

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

There are various effects – Outer Shadow, Bevel/Emboss, etc. – applied to some of layers inside the themebutton.png group and some of these will probably affect the overall dimensions of the export.

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

So perhaps if I mask the group it will prevent this, but that is a little heavy handed.  I must admit that Photoshop had similar issues at times.  OK.  I'll play with this and see what I can work out.

Many thanks.

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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.