Wrong exported image size (extra pixel added) if artboard coordinates are non-integer, not pixel-perfect
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.
Also, should be related too:
https://illustrator.uservoice.com/forums/601447-illustrator-bugs/suggestions/20530969-export-for-screens-adds-extra-pixels-at-to-exports
AI 21.1.0 macOS
-
Video_2025-01-07_214212.mp4 7263 KB -
Export As.png 2 KB -
Script.png 2 KB -
Export for Screens.png 2 KB -
Asset Export.png 1 KB -
file_differences.gif 150 KB -
Screenshot 2024-05-29 at 12.02.53 PM.png 20 KB -
Screenshot 2024-04-18 at 4.53.13 PM.jpg 459 KB -
FL-MASTER-weblogo WIDTH CORRECTED IN PHOTOSHOP.png 5 KB -
FL-MASTER-weblogo ORIGINAL ILLUSTRATOR OUTPUT.png 4 KB -
FARELANES-logo-menu-Apex.jpg 21 KB -
illustrator bug.jpg 238 KB -
Screen Shot 2021-12-02 at 9.51.52 am.png 1758 KB -
exporting-issue.png 59 KB -
4x5 RATIO chandelier1midnightoncandy.jpg 2283 KB -
2021-06-16 14-20-32.mp4 4208 KB -
illustrator_export_bug_2.png 28 KB -
illustrator_export_bug.png 40 KB -
SD21-000-SittingDuckWebinar-ads-GW-v1.ai 4912 KB -
sample exports.ai 1202 KB -
Screenshot 2020-10-27 at 14.34.35.png 614 KB -
Screenshot 2020-10-27 at 14.34.08.png 677 KB -
Screenshot 2020-10-27 at 14.34.35.png 614 KB -
Screenshot 2020-10-27 at 14.34.08.png 677 KB -
bug_01.gif 109 KB -
artbaord_antialiasing_issue.png 289 KB -
2urn-shot_1226.png 280 KB -
Export wrong size.ai 155 KB -
pixel-preview-vs-export.png 21 KB -
ilbg.png 17 KB -
Illustrator_export_for_screens_bug.jpg 142 KB -
bug.ai 355 KB -
Test_1.jpg 63 KB -
Test.ai 681 KB -
bug.ai 355 KB -
Illustrator_export_for_screens_bug.jpg 142 KB

This issue is probably happening because the artboard dimensions are not appropriate for raster export (i.e. are in decimals).
If you make x and y values as the whole numbers in the transform panel (not in decimal), then the extra pixels will not be added to the exported image.
That is the workaround, and it’s reported that it’s not always the case.
At the same time — Ai knows the size of artboards to be exported and yet it does not deliver the set sizes, which is not fair. The team is going to rethink the algorithm.
-
Ruud van den Berg commented
This is a sample document. When exported, it even becomes a 120006 x 9006 PNG
-
Strange... Would you mind sharing the copy of the file here, please? Remove everything, but keep the layout of artboards.
I am testing this and can’t reproduce, so perhaps it’s file-specific. Needs a close look. -
Ruud van den Berg commented
The artboard is also (exactly) 2880 x 2160 px and properly aligned
-
Can you check the coordinates of the artboards, please? Are these integer numbers, without any fraction?
-
Ruud van den Berg commented
Most of my work is a 2880 x 2160 px (300 dpi) PDF (AI). When I export at 300 ppi/supersampling as PNG it becomes 12001 x 9001 px in stead of 12000 x 9000 px. The additional pixels are transparent.
-
Do not worry. I just wanted to make sure this is the same popular problem reported earlier — it is.
The main reason this happens — fractional coordinates the artboard has. Once you reset rulers, this should get exported fine (although some report it does not help).This explains it, but doesn’t excuse though... and it should be fixed eventually.
As I said before in the comments to this report, Ai knows the final size a user wants, and it should stick to it. -
K-O commented
sorry, for one by one. site wont allow for upload of a zip.
-
K-O commented
export selection jpg
-
K-O commented
artboard export for screens png
-
K-O commented
artboard export for screens jpg
-
K-O commented
ai file
-
K-O commented
Here is the ai and the accompanying exported examples.
Settings: apparent from file and only options available are that antialiasing is on. But, in normal use, aa MUST be on to allow the art to export and look correct.But antialiasing of the edge is making the border. Its seems as though ai, renders the art with white pixels off the artboard/object boundaries and this creates the light border.
To function properly, AI should not antialias the edge.One Correction: I said that legacy export doesnt have this issue, but in this test, it did.
I didnt dive any deeper since I want export for screen to work properly. It needs much more work to be reliable. Currently, for important work, I need to cut and paste assets into photoshop then save for web.Export for screens needs: gif, color profiles, edge fix, rotated photos rendering fix. I think there are already requests on all of these scattered about.
-
Either attach here if you are OK with making it public, or via email: sharewithai@adobe.com (in this case also put the link to this report: http://illustrator.uservoice.com/forums/601447/suggestions/48293624)
-
K-O commented
What method should I use to share?
-
K-O, can you please share both the test file and the exact setting you used to export the image?
The team would need these to replicate the problem. -
K-O commented
When images are exported via Export for Screens, a white anti-aliased line edge border is created, added to the art. This does not occur under the legacy export. This is visible when the artwork has a flood of color, is solid color.
This is a bug. It's an undesired action. 0% of users want or benefit from the action as-is. Please fix it.
-
Captain Digital commented
When I export a file to a bitmap format [could be Export -> Export for Screens, Export -> Export As... or Save for Web (Legacy)...] Illustrator adds a white row and/or column of pixels to the exported size. In other words, if your artboard is set to 250 x 75 pixels, Illustrator will export the bitmap as 250 x 76, or sometimes 251 x 76. I suspect this has something to do with how you are saving the file's size/aspect ratio internally. Shouldn't matter if I have the file configured for inches, pixels, points or anything else - when I tell Illustrator to export something 250 x 75, I expect to get 250 x 75px, and NOT 250 x 76. This is particularly galling when preparing graphics for website layouts. an extra white row or column of white pixels means I have to pull in every graphic into Photoshop, to lop off the extra row and/or column.
BTW - the only way I can successfully export a transparent PNG now is to export screens (artboards). It will ***** up the size (adding pixels), but at least the background will be transparent. All other export methods result in a solid white background.
-
A separate report was made about a similar problem but for assets:
https://illustrator.uservoice.com/forums/601447/suggestions/48077885 -
Ana Mitrovic commented
This has been a problem for years and it's infuriating. When exporting artboards illustrator will often add a pixel or two to the dimension, even no bleed has been configured. Say your artboard is 128x128px; illustrator exports 129x129px.
This is the only workaround I found and I can't believe more people haven't noticed: https://logosbynick.com/illustrator-exports-1-pixel-more/
I truly can't believe this is the only solution. -
Ton commented
To Dridd,
I totally agree, this should be fixed, I was just trying to describe how to avoid it.