Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

When I export Illustrator artwork as a png file, I get a one pixel grey border at the top and left edges.

There is no background object, but I export (Save for Web and Devices) with matte white background and no transparency. I also tried with a white background object, with it snapped to the artboard and also larger than the artboard by 10 pixels in each direction. I still got the lines at the top and left of the exported image.

I also tried making a new file, with the artboard in pixel units, and selected the option to have objects snap to pixel grid, and then copying and pasting the artwork from the original file. I still got the lines.

share|improve this question
3  
Can you post one of the files so we can take a look? –  Farray Mar 2 '12 at 15:19

4 Answers 4

up vote 5 down vote accepted

After much tearing of hair the following works for me:

  1. Select View > Pixel Preview.
  2. View > Snap to Pixel should be ticked.
  3. You should use Artboards
  4. The Artboards should be laid out by Illustrator not by you, so if you've created, copied or positioned any: Objects > Artboards > Rearrange and choose a whole pixel value for spacing. This will lay the artboards out to exact pixels.
  5. Choose View > Pixel Preview and check the edges of the artwork for unwanted anti-aliasing. It sometimes helps to extend shapes beyond the edges of the artboard.
  6. When you're happy with how it looks, choose File > Export and tick Use Artboards
  7. Antialiasing type selection seems to have little effect on this issue but will effect the way your artwork looks.
share|improve this answer
    
I'd recommend using Slices rather than Artboards. Slices are always pixel boundary aligned, Artboards aren't. –  Marc Edwards Oct 25 '12 at 6:31
1  
@MarcEdwards Whilst this is true, unfortunately slices are way too fiddly and hard to use. Artboards are pixel aligned if you let Illustrator lay them out. –  1ndivisible Oct 25 '12 at 9:45
    
Rearranging artboards helped me! Thanks –  user12132 Apr 12 '13 at 15:47
    
In my case, I must resize my artboard to have exact pixel size BEFORE REARRANGING them e.g. width =50, height =40 (not something like 40.3333). And for rectangles inside artboards, they must have integer value for x,y position and ODD INTEGER value for width and height (e.g. 171, 135, not 170, 134) –  Hải Phong Jun 18 at 10:54
    
The ODD INTEGER is due to your x, y position being at the default anchor location (the center) of the rectangle. Choose a different anchor location (e.g. bottom left) and your coordinates will turn even. –  Henry Chan Aug 11 at 3:47

i had this same problem and realized i had set up my document with a bleed, so when i disabled bleeds and tried exporting again to PNG, i had no problem with white border showing up. click "use artboards" at export.

share|improve this answer

If I recall correctly, choosing "use Artboards" when exporting circumvents this situation.

share|improve this answer

Based on a duplicate question that was just closed, I'd say the problem is that your graphic is not pixel-aligned, so you have an anti-alias artifact showing up. Try creating a new document, turning on "Align New Objects to Pixel Grid," and recreate.

share|improve this answer
1  
Unfortunately this is part of the solution. See my answer. –  1ndivisible Oct 24 '12 at 18:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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