Skip to content

Ben Kraft

My feedback

1 result found

  1. 168 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    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.

    An error occurred while saving the comment
    Ben Kraft commented  · 

    Sounds good, thanks for the tips. Feel free to merge, I appreciate all the help! 👍

    Ben Kraft supported this idea  · 
    An error occurred while saving the comment
    Ben Kraft commented  · 

    @Egor Thanks for the response!

    That's an interesting point, my artboard was originally at a global `X:745` `Y:152.5`, and changing to `X:750` `Y:150` seems to have consolidated all of the results! Great catch and agreed; this seems like something that would cause many further issues.

    It's interesting and now easier to notice that JavaScript handles anti-aliasing *slightly* differently than traditional exports (some small coloration differences). It's barely an issue but curious if you happen to know the reason?

    An error occurred while saving the comment
    Ben Kraft commented  · 

    “Export As” yields very different .png results than “Asset Export”, “Export for Screens”, and JavaScript `doc.exportFile()`, especially when attempting to export an artboard.

    This often is seen as assets being clipped from the edges of artboards resulting in soft edges or “transparency bleeding”, or exporting as different dimensions than the selected artboard.

    The test I ran attempted to export an asset of dimensions 50x250 points fully left-center aligned to an artboard of dimensions 350x250, with an export scaling of 1x. When presented with the option, anti-aliasing was always toggled, and in JavaScript, the settings were:

    ```
    var options = new ExportOptionsPNG24();
    options.antiAliasing = true;
    options.artBoardClipping = true;
    ```

    It appears as though Asset Export and Export for Screens yielded the same results (both with incorrect dimensions and "transparency bleeding"), but different than Export As (correct dimensions, no bleeding) which was different from the JavaScript method (correct dimensions, bleeding).

    This, for me, means I cannot use JavaScript for my exporting and must manually export my assets one by one, which is very tedious.

Feedback and Knowledge Base