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

Affinity Designer, Export Persona, "Create slice" from layer is 1px bigger than expected.


Recommended Posts

Mac OS 13.2

Affinity Design 2.1.1

Steps:

  1. As designer persona, create an artboard of an arbitrary size.
  2. Assign a 64x64 simple grid to the artboard.
  3. Enable snapping.
  4. Place a small shape in the middle of a grid cell.
  5. Draw a transparent rectangle with no outline from the top-left to the bottom right corner of the same grid cell.
  6. Group the two objects together.
  7. Ensure that the resulting group is 64x64px in size, and its position is at integer coordinates.
  8. Navigate to the export persona.
  9. Open the Layers dock and select the group from step 6.
  10. Press the "Create" slice button at the bottom right.

Expected: A 64x64px slice is created.

Actual: A 64x65px or 65x65 slice is created.

This issue doesn't allow me to quickly export a lot of same-size images. I'm forced to draw or adjust slices manually.

 

Thank you.

 

Screenshot 2023-06-28 at 15.30.36.png

Screenshot 2023-06-28 at 15.33.06.png

Link to comment
Share on other sites

Welcome to the Serif Affinity forums.

Can you share that .afdesign document with us?

If you open your Designer Settings, User Interface, how many decimal places do you have specified for Pixel measurement displays? I recommend at least 3. If you're set on 0 or 1, please set to 3 and check the positions and sizes again.

-- 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.3, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.3.1

Link to comment
Share on other sites

  

5 hours ago, walt.farrell said:

Welcome to the Serif Affinity forums.

Can you share that .afdesign document with us?

If you open your Designer Settings, User Interface, how many decimal places do you have specified for Pixel measurement displays? I recommend at least 3. If you're set on 0 or 1, please set to 3 and check the positions and sizes again.

Thank you, Walt.

I had 1 decimal place set by default. After I changed it to 3, the issue kept happening. However, after I restarted the application, I was no longer able to reproduce the issue.

Edited by Dmitriy Shmilo
Link to comment
Share on other sites

  • 5 weeks later...

Affinity is quite finicky when it comes to creating slices. Every value of your object's transform (X, Y, W, H) should be whole number.

If there's a decimal number, Affinity will round it up and add an extra pixel.

Ex. You have a square with these transform values. (X = 0, Y = 10.6, W = 50, H = 50). If you generated a slice from this object, there's a high chance that the slice generated would have these values (X = 0, Y = 11, W = 50, H = 51).

Aside from objects, your artboards aren't exception from this behavior.

Check the transform values of your artboards. If you're working on an artboard with decimal in its transform values, all the objects inside will generate slices with rounded up values. Regardless if the object doesn't have decimal transform values in itself.

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.