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

'Create Slice' button creates mis-aligned and incorrectly sized slices


Recommended Posts

Hi Everyone,

 

I'm not sure if this is a bug or because it's something I'm doing wrong but quite often AD (for no obvious reason) gets confused about the size and position of a slice.

 

For example, at 0,0 I have a image (various layers in a group) that is 256x256px in size (there are no layers that have bounding boxes that exceed these dimensions). If I select it in the Layers tab of the Export Persona and hit the 'Create Slice' button, it creates a slice 272x272 at -8,-8. I have a page with dozens of images on them and I'm having to manually correct the size and position of each slice.

 

Can anyone shed any light on this?

 

Cheers,

Neil

lightpillar.com

Link to comment
Share on other sites

  • Staff

The slice box calculation takes into account line/stroke widths and layer affects, but it is a best guess approximation.  It is also rounded and oversized to whole pixels.

 

You may found a bug if it's oversizing more than a couple of pixels (if you have no layer effects).

 

One option to help clean slice box creation is to make your nodes a child of a clean rectangle layer, on pixel with no fill or line.  It will clip the children, but the slice will be calculated on that box.

SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB
Link to comment
Share on other sites

I think it's a bug. The largest layer in the group is a 256px circle that has an internal 8px Outline fx. If I disable this, it correctly creates a 256x256px slice.

 

It clearly thinks the outline is external when it is not. Looks like a genuine bug to me.

 

Your suggestion of moving the children into a parent object helps get around the issue.

 

Cheers,

Neil

lightpillar.com

Link to comment
Share on other sites

  • Staff

Upload a test file and I'll take a look.

SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB
Link to comment
Share on other sites

Hi Ben,

 

File attached.

 

It shows a 224x224px circle with a 16px outline fx (sitting on a 256px square for visual reference).

 

When you 'Create Slice', it creates a 258x258px slice. I was expecting the same difference as I first reported so there must be something at play influencing the miscalculation - I just can't figure out what so hopefully the debugger will tell you.

 

Cheers,

Neil

Outline Slices Bug.afdesign

lightpillar.com

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.