Jump to content

How to remove all transparent pixels (blended edges) ?

Recommended Posts

Hello everyone, this is my first topic on this forum.


First of all, I used the search form and did not find any solution to my problem. If I missed it, well I'm sorry... probably used wrong key words.


I would like to know if there is a simple and easy way to remove all transparent pixels and make them opaque in an intelligent way. Here are some pictures so you could easily understand what I mean :




On this image (resized by 1000% for better view, real size was 150px). You can clearly see (if not click on imgur direct link) that borders between each color is blurred with what I call transparent pixels. I want to remove/color them all.


The result would be something like this :





On this image there is only three colors, and that's exactly what I need. I actually did this manually but it's very laborious. I used alternatively magic stick with adjusted % trolerance and fill tool... it takes 10 steps, more or less. Yellowest transparent pixels became strong yellow, brownest transparent pixels became strong brown etc.


What I'm looking for is a plugin/tool/solution to go from first image to second image in one click... or at least an easiest way that the manual one i currently use. I said intelligent way because the hypothetic plugin or tool needs to color transparent pixels smartly with one of the two neighboring colors of each border, like I did.


In fact this image is a small part of a huge 10k pixels world map where each color is a country and blue is water. If I start doing this manually it will take 1 month, if not more... because there are also extra steps precisely caused by these transparent pixels (I currently isolate each country, make copy/paste of each border etc...). If this simple solution exists, I could convert the entire map in 1 minute ! So better ask now before starting pointless work.


Thank you all for reading or answering.

Have a nice day.

Link to comment
Share on other sites

Those are not transparent pixels; they are blended pixels. Therefore, adjusting the opacity will not solve your issue.

(I've edited the title of this topic to reflect it's about blending)


One way you can reduce the colors in the image with the Selective Palette plugin.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • toe_head2001 changed the title to How to remove all transparent pixels (blended edges) ?

I concur with @toe_head2001

Without downloading the pic I assumed you were dealing with transparency. The plugin of choice for me though would be

. It allows you to reduce the image to 3 colors very easily and you do not have to install a whole pack just for 1 plugin. Hope this helps.

Took about 10 minutes. 


Edited by AndrewDavid
Added Pic


Link to comment
Share on other sites

Thank you for your replies.


I tested BoltBait's transparency plugin earlier this week but it did not change anything.

TR's Color Reducer and Selective Palette are exactly what I needed, espacially Selective Palette. Just tested it on the yellow/brown image and it works perfectly.

However TRCR annoyingly change the 3 main colors and in ~15 minutes of test I have not been able to acheive the desired result like you did AndrewDavid. But it's usefull to easily reduce image weight which is also a problem in my project so I keep it.


Thank you guys you saved me a lot of time !

Link to comment
Share on other sites

If you are not too worried about making the absolutely best possible decision between which eventual color a blended pixel becomes, the method I'd use is:

  1. Select the color picker.
  2. Select a pixel from the middle of a color plane, say, the yellow one.
  3. Select the magic wand selection tool.
  4. Select a pixel in the middle of the color plane again.
  5. Adjust the Tolerance level, until you feel satisfied with which pixels will become yellow and which should remain for the adjacent colors.
  6. Press Backspace to fill all selected pixels with the primary color.

You can also use the color separation (Ctrl+Shift+P) for a first reduction, too. You will probably not find a setting that immediately splits the blended edges perfectly, because if you have three colors, you'll have to allow 3 different values for red, green and blue, and therefore allow 9 colors overall, but it's quite a reduction from the original set of possible colors.

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.

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.

  • Create New...