Wrong exported image size (extra pixel added) if artboard coordinates are non-integer
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.
ALso, should be related too:
https://illustrator.uservoice.com/forums/601447-illustrator-bugs/suggestions/20530969-export-for-screens-adds-extra-pixels-at-to-exports
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.
-
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.
-
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.
-
Charles commented
AI 2019 CC (and all past versions going back to CS3 - that I am aware of):
Here's the bug:
When I export images in Illustrator via "Export for Screens" or the legacy "Export" - my images ALWAYS come out having 1 extra pixel added to their size.
The legacy "Save for Web" is the only export option that doesn't do this, however, there's no way to save multiple images for web - and I'm usually creating a lot of web banners that need to be exported in bulk (usually in a time crunch).
For example, my developers need the dimensions of my image files to be exactly 300x600, and when I export all of my banner ads in Illustrator, they inevitably without fail, will save them as 300x601.
When I downloaded AI 2019 CC, I was very hopeful that this would be fixed, but to my disappointment it is still an issue. I know that this has been a bug for many years and I would love to see this get fixed so that I can go back to creating my web banners on Illustrator without the fear that they'll save at the wrong size.
-
yasuhiro matsuzoe commented
If 107 px is specified for vertical width and horizontal width in the export of artboard, it will be exported at 108 px.