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

Wrong artboard export image size


Recommended Posts

Thanks for including the sample file, @bures.

You should go to Preferences, User Interface, and increase the number of decimal places displayed for px units. If you do that, you will see (using the Transform panel), a combination of these issues:

  • Artboards that are not located on integer X/Y coordinates; and/or
  • Artboards that do not have integer pixel dimensions.

For example, Artboard 2 plocha has both a non-integer X and a non-integer Y:

image.png.dd4fbb24e48045812f7a48e57f4a643a.png

If you are set to only show 1 decimal place both of those would round down, giving X=20 and W=16.

When you have non-integer values, Affinity needs to expand the size of the exported object to account for the fractional pixels.

Using Snapping, with Force Pixel Alignment, can help prevent that from happening in the first place. Sometimes (but sometimes not) also setting Move by Whole Pixels can help, but I would start with it off. You also need to be careful that when you are duplicating or moving artboards after they are created, that you do not use the Alt key, which overrides snapping.

-- 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 checked artboard dimensions. All sizes were 16 × 16 px. But some of artboard had X or Y not precise (16.04 px).

But I am confused because:

  • I put down exactly 16 to both text boxes (W & H). Affinity should take this exact number.
  • I assume that Affinity rounds numbers. Why 16.0488 is rounded to 17? It does not make sense.
Link to comment
Share on other sites

19 minutes ago, bures said:

Thanks Walt.I checked artboard dimensions. All sizes were 16 × 16 px. But some of artboard had X or Y not precise (16.04 px).

You're welcome. But as I showed above, at least 2 plocha also had a W that wasn't an integer.

20 minutes ago, bures said:

I put down exactly 16 to both text boxes (W & H). Affinity should take this exact number.

I'm not sure I understand you, but if you actually typed 16 into those boxes you should have gotten exactly 16.

21 minutes ago, bures said:

I assume that Affinity rounds numbers. Why 16.0488 is rounded to 17? It does not make sense.

Affinity rounds numbers for display purposes, so 16.048 would display as 16 unless you're showing at least two decimal places.

For export, however, what would you want Affinity to do with the extra .048 pixel of width?

There are only three choices:

1. Include it, giving an output size of 17 px because the output formats can't have fractions of a pixel.

2. Trim .048 px from the left edge, changing your composition, and giving 16 px.

3. Like 2, but trim from the right edge. Again, this is changing your composition.

With non-integer W or H it seems reasonable to me to include the extra pixel. I've never understood why this also happens with non-integer X or Y values, though.

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

31 minutes ago, walt.farrell said:

I'm not sure I understand you, but if you actually typed 16 into those boxes you should have gotten exactly 16.

Affinity rounds numbers for display purposes, so 16.048 would display as 16 unless you're showing at least two decimal places.

For export, however, what would you want Affinity to do with the extra .048 pixel of width?

See the image:

artboard-xy.jpg.496c8372a11815fe5dc4e6ad34a39b1b.jpg

Size is perfect in this case.

  • Affinity should round decimals, not trim.
  • Affinity should use exact entered number regardless of decimal numbers shown.
  • Position should not affect dimensions of exported images.

 

Link to comment
Share on other sites

21 hours ago, bures said:

Affinity should use exact entered number regardless of decimal numbers shown.

If you are dealing with Pixels (PNG is in Pixels) then you will get an integer number, the choice was made to round up not truncate.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | 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

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.