7

I made a file size 320*370, however they become 321*370 while I export them into png?? Things happen to every files unless there is only one artboard in the file. Always 1 px more from what I originally set. Any idea how can this be fixed?

3
  • 2
    Is your artboard exactly on the pixel or is it ioffset?
    – joojaa
    Commented Dec 8, 2016 at 10:50
  • 2
    There is a chance your inage is not pixel perfectly aligned, and the extra pixel is an anti alias column.
    – Rafael
    Commented Dec 8, 2016 at 21:44
  • My exports were also 1 pixel off in some of my images. Aligning my artboards to the pixel grid as joojaa recommended resolved the issue. Commented Oct 29, 2017 at 22:20

6 Answers 6

4

This is caused when the artboard has decimal value in the X and Y coordinates, and also when the size of the artboard is decimal as well. Make sure that your artboards have whole values for the X and Y coordinates, as well as the Width and Height dimensions.

Try to rearrange them by putting a whole integer value between them and see if that helps.

1
  • This is the answer that solved my problem, and should be the accepted answer.
    – emonigma
    Commented Apr 2, 2020 at 14:34
1

My exports were also 1 pixel off in some of my images. Aligning my artboards to the pixel grid as joojaa recommended resolved the issue.

1
  1. Make sure each object you want to export is in separate artboards.
  2. Select all the objects.
  3. Go to File -> Export Selection.
  4. Go to 'Artboards' tab, Tick off the 'Include Bleed' box under the artboard range.
  5. Set the artboard range and choose your desired format.
  6. Click 'Export Artboard'.

Done! Now every images that you exported will be as the same as the artboard sizes you set.

1

All of the answers here are partial. For consistent results you need to use all the techniques listed here:

  1. Your artboard must be exactly on X and Y coordinates (eg: x:270 y: 179, not x:269.96 y: 179.21). Turn on your pixel grid (View > Pixel Preview) and turn on Snap To Pixel (View > Snap to Pixel) when drawing new artboards, or just type round numbers into the Artboard Properties panel (for x, y, width and height).

  2. Either make sure none of your artwork could bleed outside the edges of your artboard OR (better) turn OFF "Include Bleeds" when you use Export for Screens. Remember that for most strokes, if the stroke aligns with the edge of your artboard, chances are it actually spills outside the boundaries of your artboard because strokes by default are centered on the line.

  3. If all the above isn't working for you, you can always fall back to Save for Web (Legacy) where you can clearly see the pixel dimensions while exporting and there are no surprises.

1

Your art is outside your artboard. Export but don't use the artboard size, rather draw a square that contains all boxes. So if, for example, you have a text box and your text is 320, but the text box is 324, then the export will be 324.

Use "Save for web" and choose Artboard Size when saving for PNG.

0

Does the same thing happen whether you Save As or Save for web? The Save for web is much better because it gives more options (exact sizing and image quality). And Save for web offers previews of the final PNG with pre-calculated file size.

Not the answer you're looking for? Browse other questions tagged or ask your own question.