Jump to content

How to smooth areas of color together without anti-aliasing?


Recommended Posts

Hi, I'm creating a template and each color that's in the .png file must match a string in a config file.  Therefore, only colors I specify can be included in the .png file.

 

I drew some shapes, then resized the whole image by 500%.  As you can guess, huge blocky jaggies are everywhere, as seen here:  https://imgur.com/LQg1VvX

 

I believe I tried all the filters, and Dent came closest to what I need, but it introduced "random" colors by anti-aliasing, as seen here: https://imgur.com/reCsjsN

 

I am looking to apply a smoothing filter to this whole map, only using the colors that are currently included.  (Here's the full map if you were curious: https://imgur.com/4n3Akjk )

 

Thanks much!

Edited by dracho
added links
Link to comment
Share on other sites

A plugin that might me useful for this is Recolor Using Palette.

 

A trick I tried that seemed to have potential is to  Gaussian blur the image by about eight pixels, enlarge it, then replace the pixels in the enlarged image with the selected colors using Recolor Using Palette or a similar plugin. Sometimes there are regions where two colors meet that get that wrong color. Those can be selected with the Magic Wand (with a low tolerance) and filled with the correct color, or filled with the Paint Bucket.

 

I only tried it fro a small example, so I don't know if it's practical for a full image.

 

EDIT: After a quick try with the full map, I doubt my idea is very useful. An approach that might be worth a shot is to vectorize the map with InkScape.

Link to comment
Share on other sites

6 hours ago, toe_head2001 said:

One option would be to use the Selective Palette plugin.

 

This sounds promising, "allow the user to build up a list of colours, and then it converts each pixel in the image to the closest colour on the list."

 

However, there isn't a version for 4.0.21.  Must I downgrade paint.net in order to use this?  Thanks.

Link to comment
Share on other sites

30 minutes ago, dracho said:

However, there isn't a version for 4.0.21.  Must I downgrade paint.net in order to use this?

 

The download for Paint.NET 3.5.4 works in 4.0.21.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

43 minutes ago, dracho said:

Are you sure about that? 

 

Yes, I tested it before posting the reply.

 

Did you place all 3 files in the Effects folder?

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

11 minutes ago, null54 said:

 

Yes, I tested it before posting the reply.

 

Did you place all 3 files in the Effects folder?

Yes.  Here's a crashlog:  https://paste.ubuntu.com/p/dgWtNwkmQT/

 

Err... that crash only happens when I select Effects Lab, which I thought was the menu the new plugin added, but apparently there are more to choose from in the list of effects.  I will see if I have any luck with them.

 

OK, I found the Selective Palette dialog.  It seems like this might work, but I guess I first need to save a palette that includes only the colors in my current .png file.  Once I figure that out, I should be able to import that palette into Selective Palette and... cross that bridge when I get to it.  Thanks.

Edited by dracho
Link to comment
Share on other sites

Unfortunately I don't think Selective Palette is going to work for me.

 

Say I have two biomes (two different colors) next to each other.  One is dark green and one is light green.  Inevitably there will be some medium green pixels after I apply the effects.  I could eliminate the medium green by using Selective Palette but medium green is actually a valid color in another part of the map.  I don't want a large biome next to another large biome with a minuscule amount of third biome between them.

 

There are 187 biomes, and I don't think I can ever be assured that each pixel is perfect via this method.

 

I just really need a smoothing filter that doesn't introduce new 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.

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.

×
×
  • Create New...