Extra pixel added to image size when exported
When I use "Export for Screens" export option to batch-export artboards many of the resulting JPGs are a pixel larger vertically and/or horizontally that the artboard dimensions within Illustrator. For example I exported a dozen images with artboard sizes of 1200px wide and 1200px high. After exporting the resulting JPGs have a dimension of 1201px wide and/or high. This only happens on some of the exported files and only some of those are effected vertically and horizontally.
Mac OS X Mojave 10.14.4
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.
Peter Furstenberg commented
Since upgrading to Illustrator 27.2 assets exports at the incorrect size. The exporter adds additional empty pixels around the asset.
1. Create a new document.
2. Create a square exactly 200x200px (Only happens when xy coordinate is not a perfect pixel)
3. Add asset to the Asset Panel
The result for me is a 201x201px asset with an extra pixel to the right and bottom.
Other assets (I've tested) export 213x214 px, 201x211 px
Attached is another asset that completely exports wrong.
(macOS Ventura 13.1 (22C65))
Slingshot Design commented
For many reasons I want my images for web to be an exact size.
When I have multiple artboards and use the Export for screens option, most of the time the images that are outputted are a slightly different size to my artboards.
For example if an artboard is 1440 x 690 the image outputted might be 1441 x 691. Or sometimes just one of the dimensions will be wrong like 1440 x 691.
I can get around this for one artboard by double clicking in the corner of the rulers to reset the artboard x & y but any other artboards will still output at the wrong size.
For this reason, Export for screens has been mostly useless for me since it was first introduced and I still have to use Export > Save for web for every artboard.
Hi, I have the solution, it's almost this one.
In my side it's about the artboard position (X, Y), must be an integer.
So artboard position or dimension, but yes this is annoying.
Une illustration dans un plan de travail qui fait 240px de large.
Si mon plan de travail est par exemple positionné: x:10.458 et y: 5.879
J'exporte en png, mon fichier fera 241px.
Je repositionne mon plan de travail: x:10.00 et y: 6.00
J'exporte à nouveau et mon ficher fera bien 240px.
C'est un problème qui existe depuis plusieurs générations, et c'est embêtant quand on fait de la précision pour du web.
This is rubbish. I've been fighting with extra pixels for years. It got better, but these still happen occasionally.
Izabela, can you please share the file which results this (especially 8px!)?
The content is not that important, I believe, just artboards.
Put it here in the comments or send it over to firstname.lastname@example.org if you don’t want to do it publicly (then please state the link to this report for better tracking — https://illustrator.uservoice.com/forums/601447/suggestions/45798424)
And please provide the exact steps you are performing: which export method, which settings, etc. Maybe record a video even, or a GIF — this would help developers to jump to this sooner.
Illustrator is adding pixels when exporting:
My artboard is pixel perfect, it is positioned well and Illustrator is adding 1 pixel to it's width
Yesterday it added 8pixels to the lenght of a file.
I cropped it off in Photoshop, but it is annoying that it is changing the intended file dimensions when exporting and adding an extra step to the workflow.
Marcos G commented
Pudiste resolverlo? Tengo el mismo problema
Christian Zagarskas commented
Here is a VIDEO proving the problem exists and how to recreate it
Problem: when exporting a specific size, lets say 1000x1000 px square 1:1 ratio, Illustrator creates an image that is off by 1px (width/height, or both)
make an artboard that is 1000x1000 pixels, NUDGE the artboard on the screen so the X/Y coordinates begin to use decimal places. Export the artboard, you will see that the greater the offset of the X/Y coordinate the more the deviance of the W/H, up to 1 pixel.
This causes problems when using media in applications that have strict settings for sizes.
Irrespective of wherever my artboard is placed on the screen my explicitly set size should be honored/enforced during the export.
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.
We need a fix to this. Option to align to whole XY coordinates or just make it pixel perfect anyway.
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/)
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?
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.
Probably won’t be necessary when main problem gets fixed.
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.
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.