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
Christian Zagarskas commented
I have the same problem
Note - by deleting the decimals from the X/Y coordinates I have been able to resolve the issue but I should not have to do that, and its especially a problem when exporting/rearranging 100's of small artboards with icons and very specific APP development media that needs to be exact sizes.
I guess my report here is a duplicate, so I upvoted and added a video here
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.
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.
AS of Jan. 26, 2021, this is not yet fixed.
Justin Lowery commented
This bug is still present in Illustrator 25, CC 2021. So it is incorrect to mark it as resolved.
Justin Lowery commented
Can you please make it not round up when the artboard pixel position is set in floats? This is not a feature, but a serious bug! This has made my life **** for weeks as I have tried adding bleeds to all my images due to white and colored edges being tacked on at export, on both Mac and iPad versions of Illustrator! People who don't know about this will be driven mad by all these extra pixels and colored edges being added onto their exports, especially when, like me you have 32 layouts under deadline and all of them have these stupid extra pixels being added on seemingly at random. And if you miss them then clients catch them and complain that the file sizes are wrong. It is absolutely unacceptable. This must be fixed ASAP. Illustrator should discard the added pixel rather than adding it on. All exports should perfectly match the artboard size, regardless of placement on the canvas.
Latest version of 2019, I always get 1pixel added to the horizontal. Artboards are all pixel perfect.
Jonathan B commented
I don't think this ever got fixed mine still does it in CC 23.0 Windows. Even if I align the it to be pixel perfect that doesn't always solve the problem when exporting the png.
The fix is to downgrade to version 15.3 where it still works. The grad tool also works as well.
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.
Just embarrassed ourselves in front of our biggest customer, thanks a lot for still not fixing this bug.
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!
here is the solution https://www.youtube.com/watch?v=kBgVyXYwDoI
still struggling with this :( how can this be fixed?
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.
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 :)
Oh man, would love to see a fix for this!
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.
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.