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.
-
Alyson DM commented
Manually going and checking the exact positioning or dimensions of each artboard is not very efficient. If the artboards could ONLY align to an exact pixel position, that would solve this issue. I don't know why there would be the option to use a fraction of a pixel anyways. This issue is one of the reasons I now use Adobe XD.
-
Dylan Liddell commented
So annoying, just had to go through a bunch of images and take a pixel off the size to fit a template i was exporting as.
-
Hans, your previous request about the same issue has been merged into a more general one. This one has to be merged as well. Why do you keep posting this as a separate request? To bring some attention to it and not to the main one, and dilute the applied focus? :)
-
Hans commented
We need a fix to this. Option to align to whole XY coordinates or just make it pixel perfect anyway.
-
Hans commented
Many times when exporting an image file, Illustrator creates a blurry line near the edge of the image, even if the design extends all the way to the edge. Sometimes an extra pixel is added to the exported file. This is because the artboard is not set to a whole number intersection (XY coordinates having decimals). You can re-align your artboard to a whole number intersection to avoid this, but it can take a very long time to do manually when you work with multiple artboards. A solution would be an option for snapping the artboard to whole XY number intersections. This will ensure perfect pixel exports and you don't have to worry about it anymore. We need a solution to ths. Exports should ALWAYS be pixel perfect even though XY coordinates are not whole. Make it snap or make it pixel perfect anyway.
-
Hans commented
Many times when exporting an image file, Illustrator creates a blurry line near the edge of the image, even if the design extends all the way to the edge. Sometimes an extra pixel is added to the exported file. This is because the artboard is not set to a whole number intersection (XY coordinates having decimals). You can re-align your artboard to a whole number intersection to avoid this, but it can take a very long time to do manually when you work with multiple artboards. A solution would be an option for snapping the artboard to whole XY number intersections. This will ensure perfect pixel exports and you don't have to worry about it anymore. To me this is more of a bug than a feature request. Exports should ALWAYS be pixel perfect!
-
Kaspars Kursišs commented
The issue is especially bad, since artboards are by deafult very often positioned on a decimal location when creating them, resulting in unavoidable "rounding error" when exporting. A fix would be very welcome, if not prolonged, since the issue is arround at least since 2013 (explained here: https://logosbynick.com/illustrator-exports-1-pixel-more/)
-
Anonymous commented
Might I suggest a temporary alert to the user, so that we don't submit final files with the wrong dimensions to suppliers and clients?
-
Bernardo commented
When I export an ai file in jpg I noticed that the exported file has 1 pixel more in both dimensions.
Of course I could do something wrong, but I think it's a bug in the program. -
Matt Loftiss commented
In illustrator when "exporting as png" files are 1px too large. Temporary solution found was “save for web” as png.
-
Related request:
https://illustrator.uservoice.com/forums/333657/suggestions/44429721
Probably won’t be necessary when main problem gets fixed. -
Anonymous commented
Making X and Y values whole numbers doesn't work for me. I still regularly get extra pixels (screenshot attached). There's no reason in my case why Illustrator should be adding that extra pixel.
-
Anonymous commented
Illustrator frequently exports artboards with extra pixels.
I always ensure the artboards are positioned on whole pixel values (check the screenshot), yet this doesn't seem to help.
Note that this happens when you use the Export For Screens option, but not if you use the Legacy save for web.
-
Michał Kowalik commented
Hi. I have a different working solution ✔ Picture atach.
-
Tejas commented
"Save for Web" does not not have this issue.
-
Spas Genev commented
Exporting PNG files with the "Export for screens" adds additional pixel in both width and height values. I don't see a logical explanation, it shouldn't be the bleed option.
-
It might relate to a known problem when artboards’ coordinates have fractional values.
Try to position them exactly on grid, with integer coordinates and check if the problem stays. -
traceybgibbons commented
When exporting multiple artboards illustrator seems to randomly add .003 inches to any random edge of the file. Notice the white edge on the top and left hand side of the image. This doesn't happen on single artboards, only when a document has multiple artboards.
-
Trifox commented
Windows 10
Adobe Illustrator (Desktop) 25.2.3When saving banner ads in illustrator individually (Save for Web Legacy) the files come out the right size. When batch exporting with 'Export for Screens' some of my ads end up with 1 extra pixel on width. Normally nobody would notice this, but my ads can't be used when they have just 1 extra pixel. So for now, I have to manually export each one. Please fix this bug, as it costs me extra time now.
Video here: https://youtu.be/n3sM9o1OK4U
-
Kaja, make sure that your artboard’s coordinates (X, Y) are integer.