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
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.
-
Fotis commented
- Operating System: Windows10, Siri on MacOS
- Steps: File > Export > Export for Screens > Formats: Scale
- Expected results: Icons in DxD pixels
- Actual result: Icons in (D+1)x(D+1) pixelsCannot export Artboard correctly with multiple scales. The output image files are larger. Some more pixels added without a reason.
Example(ilbg.png): When I try to export my Artboard in 16,24,...,256 px size then the exported pngs are 17,25,...,257 px larger!!!!!
-
Jeffrey commented
I'm having the same problems as the others here. Even with the artboard being on a whole pixel integer I'm still getting 1 pixel added. I took your advice and made my artboards on the integer. This worked for 12 out of the 13 artboards.
So werid. shouldn't this be built into pixel snapping? -
Deono commented
I'm also having this issue, but even with the floats rounded up I'm getting some exports with added pixels. I have an artboard that I duplicate many times, the only thing different in each artboard is the color fill of the paths and layer names, but my collected assets are exporting at different sizes, i.e. some paths are exported at 300x300 as they should be, others 301x300, or 300x301. Again, the only thing different is the color, how does changing red to blue add a pixel? This causes my animations to jump around and it's very annoying, especially with smaller pieces.
-
ian commented
…Except that keeping my artboard coordinates in integers has no effect. My artboards are set to whole numbers, and Export As… / Export for Screens is simply not working properly.
I'm still getting A x B+1 dimensions, unless I use "Export for Web".
-
Anonymous commented
I am having the same issue - I would think it would be fixed by now?
-
Anonymous commented
Having the same issue. Exporting artboards adds "1" extra pixel to the dimension. Very annoying bug!
-
Jotham commented
@Nitish Agarwal Even with the artboard being on a whole pixel integer I'm still getting 1 pixel added if I need to output multiple sizes from the same artboard i.e. 72ppi, 120ppi, 200ppi. 72ppi works correctly but the 120ppi and 200ppi still add the pixel regardless of artboard placement.
As you've mentioned before, if you output from "export for screens" you can manually type in the pixels you want the file (1200, 2000, etc) , but I'm finding it takes FOUR times as long to output this way vs export as (20 seconds vs 5 seconds) which severely slows down workflow as I'm having to do this on 100's of files.
Nitish please have the engineers take a look at this again as it's been nearly 3 years we've been waiting for a fix. Export as works perfectly in version 2015.3 regardless of integer placement so I'm not sure why you guys can't look back to see what the previous engineers did to fix this between 2015.2 and 2015.3 and replicate it?
-
Anonymous commented
When exporting artboards in Illustrator I am experiencing a pixel shift in file size exporting to a jpeg
(ie 728x90 banner ad is exporting as 730x92)
File/Export/Export as/jpeg artboard
-
Mark commented
This is still a bug! Yes, rounding the artboards to whole integers does work - if you are working in pixels. However, I'm currently working in mm because I'm designing a business card and it needs to be 88x58mm with a 3mm bleed. Even if I round the artboards to whole integers when working in mm, working from the Top Left of each artboard, it still exports different sizes. Eg. my Illustrator file with seven artboards each of exactly 88x58mm, with the top left corners set at (0,0) (100,0) (200,0) (300,0) etc. outputs some JPG's as 1040x686px and some at 1041x686px.
If I want to position a guide line at exactly 3mm for a bleed I then have to get a calculator and work out the measurement in pixels and set the position in Illustrator by typing in 35.45px
Until they change paper sizes to be in pixels then can I suggest you prioritize Illustrator to work correctly in mm, inches, cm, etc. etc.
Thanks :) -
David commented
There is a weird bug in illustrator that always add or take away a few pixel to the overall dimension of the object when exported. I export my objects in 72ppi and have to use Photoshop to crop it to the correct size. Please fix as this is very annoying. For Example: 1920x1080 will be something like 1923x1081.
-
Ian commented
I agree with what Andy E. has said. In addition. I can't think of a situation I would actually want an artboard not snapped to an integer.
In our office we have documents with up to a hundred artboards, sometimes more when exporting either screens or assets (this has been somewhat fixed by Asset Export, but not completely) making it tedious to make sure every artboard is aligned with a integer position value.
Another issue is I often make copies of a screen on an artboard by holding alt and dragging a copy of the artboard close by - this has cause many alignment issues in the past from artboard to artboard when exporting a raster file from them.
-
Andy Engelkemier commented
I agree with you Nitish. Creating any new artboard should default to having their position in whole integers. It should be more difficult to position an artboard in a floating integer. This has caused Many Many problems here.
We have found the only good workaround is to create One artboard with a position with a whole integer. Then create a bunch of Objects with that artboard active and snap to pixel turned on. Then convert those to artboards.
But even still, I think there are some rounding problems with illustrator because we still occasionally have some artboards that we have to adjust later. (when we notice there's actually a misalignment. It may happen more often and we just don't notice).
I can't actually think of a reason Ever to have the artboard's top left corner not be a whole integer. Please force that to a default. Let people change it if required.
We've had many discussions here, cussing at Adobe for this problem. It causes us to have a bad day, so we get more foul. And here I am finally posting about it.
An issue I'm seeing is that the default option for artboard is that the artboard is measured from the center. Well, if your width and height is an odd number of pixels vs an even number of pixels, then wouldn't one of those options cause the edge pixels to be half pixels in terms of the workspace? See how that could be a problem? I feel like there's your rounding issue right there. Artboards should be calculated from corners only, with the default likely being the top left.
-
AdminNitish Agarwal (Illustrator on Web/iPad Team) (Lead Software Engineer, Adobe Illustrator) commented
Hi Bogdan,
Export using any fractional scale or height/width, you will get the expected dimensions. If you have artboard and art both pixel aligned then this problem does not comes up. If you can share your file share at nitiagar@adobe.com so that we can look into and analyze what is wrong in the file.
Thanks & Regards
Nitish Agarwal
Illustrator Team -
Bogdan Popa commented
Having the same problem with Export for screens. Trying to export a 600x600px jpeg, the end result is a jpeg with 600x601 pixels. Thank you,
-
Volodymyr commented
And also, I have many other sizes, not all them are 104. So I should publish only same sizes with specified width and heigh.. no..
-
Volodymyr commented
I have a 250 artboards.. positioned by structure I need for view, and yes, I have to move and set them. Super awkward.
-
AdminNitish Agarwal (Illustrator on Web/iPad Team) (Lead Software Engineer, Adobe Illustrator) commented
We are trying to fix this issue but in the meanwhile you can use the work around. Specify height by clicking on the drop down near 1x and then enter the height that you want and it will you the exact result.
Thanks & Regards
Nitish Agarwal
Illustrator Team -
Volodymyr commented
@Nitish-Agarwal
I'm exporting just like that:http://i.piccy.info/i9/f1ea3bffe88c085a70725caeb23adb32/1509371307/36838/1155442/Screen_Shot.png
About what specifying height you tell'n me I don't know, but it's wrong.
The best wat to not get extra pixel - is to fix this bug.
I told already that when 172px set it's ok, but it's awkward and it's a bug you need to fix. -
Volodymyr commented
I don't know why old bug wan't fixed and closed. But make sure you follow instructions to reproduce it.
1. Open attached file
2. File->Export->Export For Screens.
3. Export Artboad - and result will be image with size 105x104px, but should be 104x104 as artboard size in document.So they are different, and this depends on coordinates of artboard, which is float - 172.34 and if you change it to 172 or 170, whatever and then re-export you will get 104x104 image size on output.
-
Volodymyr commented
I've created new https://illustrator.uservoice.com/forums/601447-illustrator-bugs/suggestions/32041915--bug-wrong-png-size-if-artboard-coordinates-in-fl
please vote for it.