Jump to content
You must now use your email address to sign in [click for more info] ×

Exported PNG has boundaries outside of the object


Recommended Posts

I have made a small icon in Designer, and I would like to export it to a png file. I select the object and click on Export. However, there is empty space on one of the sides. See the images below. What have I dont to inflict this situation upon myself?

Designer Persona:

49984274_Screenshot2021-03-17at16_08_40.png.d7e0e7ecb55caeeb3fba46d41dcbceef.png

Export Persona:

1912041201_Screenshot2021-03-17at16_08_46.png.bdf49d820480aea8576f7e3c5d6d1bc3.png

PNG Preview

2087833766_Screenshot2021-03-17at16_09_06.png.7395c3418acde317bc6cc3fc201c7757.png

icons.afdesign

Link to comment
Share on other sites

  • Staff

The reason for the incorrect size is the stroke alignment which is centred - parts that lay outside the object boundary do not count for the total width/height indicated in the Transform panel. If you convert the stroke into a shape (menu Layer > Expand Stroke) and do the same for the arrow (you may want to add the two objects that compose the arrow after you expand its stroke so they become a single object again) and export it you will see that the export size do match the dimensions displayed in the Transform panel (with an additional pixel in each dimension - see below for more details about this). You can't set the stroke of open paths to inside (only for closed paths).

The additional pixel comes from the fact the larger object (the rectangle) is not correctly pixel aligned (its X, Y coordinates are not integer values). You may have to go to Affinity Preferences, User Interface, Decimal Places for Units Types section and increase the Pixels value to three or more so you can see more of the fractional part displayed in the Transform panel if necessary. If you correct the X, Y coordinates in the transform panel removing the fractional part then the object will export without that additional pixel in both dimensions matching the values displayed in the Transform panel.

The best way to ensure the objects are correctly pixel aligned while you created them is to use the preset UI Design in the Snapping Manager (menu View > Snapping Manager)

Link to comment
Share on other sites

1 hour ago, MEB said:

The reason for the incorrect size is the stroke alignment which is centred - parts that lay outside the object boundary do not count for the total width/height indicated in the Transform panel. If you convert the stroke into a shape (menu Layer > Expand Stroke) and do the same for the arrow (you may want to add the two objects that compose the arrow after you expand its stroke so they become a single object again) and export it you will see that the export size do match the dimensions displayed in the Transform panel (with an additional pixel in each dimension - see below for more details about this). You can't set the stroke of open paths to inside (only for closed paths).

The additional pixel comes from the fact the larger object (the rectangle) is not correctly pixel aligned (its X, Y coordinates are not integer values). You may have to go to Affinity Preferences, User Interface, Decimal Places for Units Types section and increase the Pixels value to three or more so you can see more of the fractional part displayed in the Transform panel if necessary. If you correct the X, Y coordinates in the transform panel removing the fractional part then the object will export without that additional pixel in both dimensions matching the values displayed in the Transform panel.

The best way to ensure the objects are correctly pixel aligned while you created them is to use the preset UI Design in the Snapping Manager (menu View > Snapping Manager)

Cool, thanks for helping me out! I got it working the way I wanted.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.