bures Posted May 12, 2020 Posted May 12, 2020 I have a document containing some artboards. The size of all of them is 16 × 16 px. When I do export to bitmap file the size is not equal to artboard size (e.g. 17 × 16, 17 × 17 px). Why are these dimensions different from artboard size? navigator.afdesign Quote
walt.farrell Posted May 12, 2020 Posted May 12, 2020 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: 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. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.2.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
bures Posted May 12, 2020 Author Posted May 12, 2020 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. Quote
walt.farrell Posted May 12, 2020 Posted May 12, 2020 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. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.2.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
bures Posted May 12, 2020 Author Posted May 12, 2020 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: 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. Quote
Old Bruce Posted May 13, 2020 Posted May 13, 2020 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. Quote Mac Pro (Late 2013) Mac OS 12.7.6 Affinity Designer 2.5.7 | Affinity Photo 2.5.7 | Affinity Publisher 2.5.7 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that.
Recommended Posts
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.