Wrong exported image size if artboard coordinates are float
AI 21.1.0 macOS.
In attached AI file there are 1 artboard if you just export it for Screens you will get an image size 105px × 104px, however in AI it's sized as 104x104px.
Check that X coordinate of artboard is 172.34 px, so it's float. Just change it to 172px and re-publish and image will be 104x104.
So, coordinates of artboard should affect into output png image.
If you will export artboards in any fractional scale or by specifying height and width you will get correct output.
The best way to not get an extra pixel is keep your artboard coordinates in integers. You can achieve that by changing the reference point of artboard to top left and typing in the nearest integer or do Make Pixel Perfect(Object > Make Pixel Perfect). If size of your artboard is increased please manage that accordingly and export.
Thanks & Regards
Jasper Hedegaard Bojsen commented
Tried it and it didn't work. I still get 72x72 px on an artboard of 71x71px.
The artboard is placed as x:2000pt, y:1300pt.
I'm running 184.108.40.206 Rc2
Not fixed. I haven't changed float 172.34 coordinate or artboard. I've exported this file as File->Export->Export For Screens.
Result was image 105x104, but should be 104x104 as artboard size.
Yes, I'm using a beta build 22.0.0.
Here is my bug about this problem https://illustrator.uservoice.com/forums/601447-illustrator-bugs/suggestions/30992416-wrong-png-size-if-artboard-coordinates-in-float
This is because you artboards or slices coordinates is in float position like 123.45, but you need to set it to 124 for example.
When exporting artboards via 'Export for Screens' 1 pixel is added randomly horizontally and/or vertically to the export.
Bug appears in both Windows and macOS.
Last version to not contain the bug was 2015.3