Skip to main content
Synthoras
Participating Frequently
Oct 13, 2020 10:57 AM UTC
Answered

FIX IT: Illustrator adding 1 pixel to the exported image

Illustrator has this annoying bug where it adds 1 pixel to an exported JPEG or PNG if the artboard it originates from has got a decimal value in its position. This is very frustrating for someone that pays for these programs and requires precision.

 

Is there an easy way to remove the decimals without always having to click on each artboard and check?

 

It is appalling.

    Ton Frederiks
    Ton FrederiksCorrect answer
    Community Expert
    Oct 13, 2020 12:14 PM UTC

    Double click the intersection of the rulers to set the zero point for the first artboard.

    To move all other artboards, choose Rearrange Artboards and give a spacing in points or pixels.

    7 replies

    Albeitadrift
    Inspiring
    Oct 29, 2025 9:35 AM UTC

    This solution hasn't solved it for me. 
    I have had to make another file copy artboards over to a larger canvas (as I couldnt rearrange without them falling off) initially copy paste just yielded a rainbow spinning wheel for 5 seconds then no paste. 
    Copying them in blocks of 6 worked. \
    However after zeroing artboard 1 (I can see the ruler realign the zero to the corner of artboard 1.
    But then rearranging artboards and utilising the pixel/points to 60, then rearranges, but the artboard positions are then still having decimals and when exported still have extra pixel. 
    Even the first artboard moves and is no longer 'zero'ed' either. 

    Translate
    mariom93920726
    Participating Frequently
    Feb 4, 2025 4:23 PM UTC

    Made an script ( with help of perplexity) 

    Tried it, and it works for me.  Basically  what it does it goes through an document art boards and fixes the decimal pixels ...

     

     

    // Get the active document
    var doc = app.activeDocument;

    // Loop through each artboard
    for (var i = 0; i < doc.artboards.length; i++) {
    // Set the active artboard
    doc.artboards.setActiveArtboardIndex(i);

    // Get the current artboard rectangle
    var artboardRect = doc.artboards[i].artboardRect;

    // Round the coordinates to whole numbers
    var newX1 = Math.round(artboardRect[0]);
    var newY1 = Math.round(artboardRect[1]);
    var newX2 = Math.round(artboardRect[2]);
    var newY2 = Math.round(artboardRect[3]);

    // Set the new artboard rectangle with whole number coordinates
    doc.artboards[i].artboardRect = [newX1, newY1, newX2, newY2];
    }

    // Now you can proceed to export your artboards using the desired method

     

     

    Name it as you wish, save as .jsx and install in Illustrator Script folder

    Usage: Run the script on open document with already created set of artboards (File-Scripts)

     

     

    Translate
    Monika Gause
    Community Expert
    Community Expert
    Oct 13, 2020 12:43 PM UTC

    Is the artboard aligned to the pixel grid?

    Do you resample the artwork when exporting?

    Translate
    Ton Frederiks
    Community Expert
    Community Expert
    Oct 13, 2020 12:16 PM UTC

    Also check if the size of the artboards contain fractional pixel values and export at 72 ppi or multiples thereof.

    Translate
    Ton Frederiks
    Community Expert
    Ton FrederiksCommunity ExpertCorrect answer
    Community Expert
    Oct 13, 2020 12:14 PM UTC

    Double click the intersection of the rulers to set the zero point for the first artboard.

    To move all other artboards, choose Rearrange Artboards and give a spacing in points or pixels.

    Translate
    Participant
    Oct 12, 2026 6:54 AM UTC

    BROTHER!! Thank you for this! 

    Translate
    Just Shoot Me
    Legend
    Oct 13, 2020 11:10 AM UTC

    I moved your post over from the poorly named "Using the Community" forum, which is for getting help using this forum system, to a better forum.


    I hope this helps. Best of luck to you.

    Translate