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

Shape background colour bleeds outside shape outline when exporting PNG


Recommended Posts

I have found that with export of white circles with black outline, the white background colour is bleeding out beyond the black outline when exporting it. As a result, instead of transparent black at the edges, the colour is transparent grey. This becomes very obvious when on a black background.

This can be seen in the attached Affinity Designer save file. Both circles are diameter 100px. The difference between them is;

Left Ellipse / slice1; Outline stroke aligned to inside of shape outline - the edge in the output is grey + transparency. Output image size 100x100px.

Right Ellipse / slice2; Outline stroke aligned to centre of shape outline - the edge in the output is black + transparency. Output image size 102x102px.

 

It seems to me that when the outline stroke is aligned to inside of shape, the width of the stroke should be subtracted from the size of the shape when output for correct output.

I use the option "Outline stroke aligned to inside of shape outline" to ensure that the output images are a known size.

 

slice1.png

slice2.png

CircleOutlineIssue.afdesign

Link to comment
Share on other sites

Welcome to the forums @Shermanica

As for the right-hand circle, I think this is expected behaviour because the stroke covers multiple ‘sub-pixels’ (it’s 1.262 pixels across and it’s applied to a curve), but the result can possibly be changed with the Blend Options to a certain degree, maybe, depending on what you want.

As for the left-hand circle, I don’t know if this is a bug or not; it might be how the developers want it to be.

However, I can say that clipping the circle inside another circle of the same size – without a stroke – and setting “Use Precise Clipping” to ON in Preferences / Performance seems to mitigate the issue a little. (You can see the difference if you use the Pixel View Mode.)

It’s not an ideal ‘fix’ but it might be worth keeping in mind.

I’d be interested to hear the official response about this because I’m curious about it now.

Link to comment
Share on other sites

A 'workaround' perhaps to ensure you maintain the 100 px x 100 px exported size would be to use a centred stroke, copy the stroke weight from the stroke panel and subtract it from the width and height of your circle...

100 px 0.302994 pt

This results in an exported 100 px x 100 px pixel perfect circle without the issue you see when using an inside stroke...

 

Affinity Designer 2.4.0.2301 | Affinity Photo 2.4.0.2301 | Affinity Publisher 2.4.0.2301
Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.6.8

Link to comment
Share on other sites

  • Staff

Hi All,

I've asked for a developers opinion on wether the stroke aligned to insides export behaviour is by design or not. I will update this thread once I have more info.

Thanks
C

Please tag me using @ in your reply so I can be sure to respond ASAP.

Link to comment
Share on other sites

44 minutes ago, Chris B said:

Does applying a horizontal coverage map in Blend Ranges sort the colour bleeding?

Not really, it looks dreadful as you lose the anti-aliasing...

The best approach I've found is to keep the circle at the desired diameter, e.g., 100 px and then using a centred stroke, simply subtract the stroke width from both the width and height of the circle (bottom right image). This results in a perfect 100 px x 100 px, anti-aliased image without the colour bleed...

The first three images show a Horizontal Coverage Map placed at the Top, Middle and Bottom of the Coverage Map graph respectively using an Inside Stroke, the fourth image shows the scenario described above using a centred stroke and subtracting the stroke width from both the width and height of the circle using the default Coverage Map...

This obviously doesn't remedy the initial issue regarding the bleed when using an Inside Stroke so is only a workaround but a very easy one where the objective is to maintain the circle diameter...

1874266021_CircleOutline.thumb.png.bebab0a7169b867150e6c2816049ebae.png

Affinity Designer 2.4.0.2301 | Affinity Photo 2.4.0.2301 | Affinity Publisher 2.4.0.2301
Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.6.8

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.