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.
-
Anonymous commented
The fix is to downgrade to version 15.3 where it still works. The grad tool also works as well.
-
Me commented
Trying to export to rgb jpeg - this is a critical thing for us. It needs to be accurate to the millimetre size we're working in!
If I change my artboard to pixels to check the size, but then change back to millimetres, the size is incorrect. We do not work in pixels! Not all of us work for web. -
Heidi commented
Just embarrassed ourselves in front of our biggest customer, thanks a lot for still not fixing this bug.
-
Mathias Gamper commented
A print file that has been adjusted (RGB, pixel values) and optimized for the web (pixel snapping) shows a perfect alignment in the pixel preview, but has fuzzy edges after being exported to the web (no matter in which of the export dialog boxes).
The same artwork can be copied to a newly created web file and the problem is gone.
File: https://www.dropbox.com/s/metpcvhmg255fv2/Stadt-Aarau_RGB.ai?dl=0 -
Anonymous commented
I've tried as @Nitish Agarwal suggested, but it doesn't work. It's integer and make pixel perfect also didn't work. It's really frustrating, that you can't export with Illustrator properly. Please fix it as soon as possible!
-
Anonymous commented
here is the solution https://www.youtube.com/watch?v=kBgVyXYwDoI
-
Anonymous commented
still struggling with this :( how can this be fixed?
-
Alyssa commented
I'm having the same issue! I've created a load of web ads for my company and most of the 72dpi exports have 1 extra pixel and the uploads are getting rejected. Some of them it's just 1 pixel others are 2 pixels (1 extra length and 1 extra width) and others exported correctly. Completely maddening! And exporting each individually with "save for web" would have taken longer than fixing the exports in Photoshop.
-
Anonymous commented
I've just noticed the same in photoshop. Trying to same templates in CC Libraries and every template has an extra pixel in width...Seems like a small issue but it's driving me mad :)
-
Anonymous commented
Oh man, would love to see a fix for this!
-
Jotham commented
Just installed the 23.0.3 update and the bug is still there. I've been waiting and stuck with version 2015.3 for this to be fixed. @Ashutosh Chaturvedi Do you have any update on this?
-
Morgan Thomas commented
I have had luck with Sharon Dean's method! Make sure your artboards are aligned to the pixel. I usually just copy and paste art boards over and over because it's my process, but whenever I want to export them, I make sure where they are in the document isn't on a decimal pixel.
-
Dana commented
I've had the same issue, and came here to see if there was a solution that didn't involve opening the file in photoshop to shave off a pixel. As a hail-Mary, I tried the legacy "Save for Web" and it exported correctly. Must be something with the new(er) export functions.
-
Morgan Thomas commented
I have the same issues! I will probably be more aware of where I place my artboards, but it's so annoying. I should be able to copy as many artboards as I want and get the same size. I am at the point where I send all of my .ai files to another designer to export out because it's so tedious for me to shave off 1 pixel in photoshop.
-
Ben commented
it's the same when you try to export different icon sizes from 16 to 256 for example. its fkn annoying!!!! pls fix it immidiatley!!!!!
-
Russ commented
This may not be the solution you are looking for, but this can be solved (in both Illustrator and PS) by cropping the unwanted "rim".
-
Jotham commented
Sharon,
That only works if you aren't scaling images though. Keep everything at 72ppi and it's fine, but try outputting at say 100 or 300ppi and the 1 pixel comes back regardless of art board placement. I showed this in the video I made in the earlier link I posted. This worked in 2015.3 regardless of artboard placement. They can make this work without forcing us to move artboards to exact integers. -
Charles commented
Thank you Sharon – I will give that a try and see if it helps :)
-
Sharon Dean commented
I had the same issue until I made sure my art boards lined up on both X and Y axis on whole pixels (ie: x: 25 not x: 25.22 ) . When one of the axises is a decimal, it will add a pixel when exporting.
-
Jotham commented
Been fighting for this fix since 2015. Last stable build that doesn't have this bug is 2015.3. You can go here https://illustrator.uservoice.com/forums/333657-illustrator-feature-requests/suggestions/30992416-wrong-png-size-if-artboard-coordinates-in-float and vote/read about a workaround that takes FOUR times as long to save the same images as legacy export did. It's still currently under review but probably will not get fixed as it's probably more complicated than just looking back at the code for 2015.3 to see why it worked there and not now.