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

How to make a white transparent background for icon?


Recommended Posts

For some reason, we need icon/texture with transparent background, and this transparent background needs to be white instead of black or something else.

You can check this article, this is the reason we need this: http://www.adriancourreges.com/blog/2017/05/09/beware-of-transparent-pixels/

Now, my workflow in Affinity Designer is, an icon, and a white transparent rectangle at back, center the icon with the rectangle, then export it to png using file->export.

The way I test it, is using XnView MP to open the png, then right click the image viewer, check "use alpha channel". Then the alpha channel will be removed and show the original color.

Problem is, after I export it, the background is black transparent, not white transparent. See screenshots. Screenshot 1 is a home button icon and a transparent rect. Screenshot 2 is the color setting of the transparent rect. Screenshot 3 is the view in XnView, with alpha channel removed.

Then I tested with only a little bit of alpha, by moving the alpha slider a little to right, export it to png, and the alpha is correct white alpha, not black. But it's not the ideal result because it shows a little bit white instead of complete transparent.

How to do white transparent background with Affinity?

screenshot1.png

screenshot2.png

screenshot3.png

Link to comment
Share on other sites

  • Staff

Hi cdytoby,

Could you attach the .afdesign file for this?

I think i know what is happening, but really need the file to confirm this.  Also the 2nd rectangle you are setting to transparent, is this just being used as a guide, so you get the sizing correct ect?  If so, you could try deleting that and then creating a slice the size of the rectangle you've deleted and exporting that.  

Link to comment
Share on other sites

On 5/21/2019 at 4:18 PM, stokerg said:

Hi cdytoby,

Could you attach the .afdesign file for this?

I think i know what is happening, but really need the file to confirm this.  Also the 2nd rectangle you are setting to transparent, is this just being used as a guide, so you get the sizing correct ect?  If so, you could try deleting that and then creating a slice the size of the rectangle you've deleted and exporting that.  

Well, yes and no.

The transparent rectangle is used for 2 purposes. 1 is to make sure its correct size, I need the icon have some padding around it. 2 is make sure there is a "white transparent background", so that the visual issue is solved. 

Here, transparent background means, the color code should be (255,255,255,0) instead of (0,0,0,0). Both are not visible and transparent, but the color is different.

I'll attach a afdesign later, because I'm not allowed to upload the whole file.

Link to comment
Share on other sites

On 5/21/2019 at 4:18 PM, stokerg said:

Hi cdytoby,

Could you attach the .afdesign file for this?

I think i know what is happening, but really need the file to confirm this.  Also the 2nd rectangle you are setting to transparent, is this just being used as a guide, so you get the sizing correct ect?  If so, you could try deleting that and then creating a slice the size of the rectangle you've deleted and exporting that.  

Here is the test afdesign file.

Test.afdesign

Link to comment
Share on other sites

  • 2 weeks later...

After I have exported the file to png from Affinity, I open it in XnView MP and from the view menu make sure Use Alpha is checked, this is what I see
Screen-Shot-2019-06-04-at-19-54-18.png

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

I think it has something to do with 8bit indexed attributes, as the use transparent index is greyed out but checked.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

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.