Jump to content

Full Spectrum Posterizer Plugin


Recommended Posts

The stock Posterizer appears to lack some ability to fine tune the image. So I wrote the Full Spectrum Posterizer to give the Artist a much finer level of adjustment.

 

Menus: Color->FSPosterizer

 

 

FSPost.zip

 

 

Time to go all Andy Warhol on you:

 

Warhol.png?raw=1

 

and for the Geeks like me The Code:

 

Spoiler

// Submenu: Color
// Name: FSPosterizer
// Title: Full Spectrum Posterizer - v1.0
// Author: TechnoRobbo
// URL: http://www.technorobbo

#region UICode
int Amount1 = 128; // [1,255] Red
int Amount2 = 128; // [1,255] Green
int Amount3 = 128; // [1,255] Blue
#endregion

void Render(Surface dst, Surface src, Rectangle rect)
{
    ColorBgra CP;
    ColorBgra CO;
    double divs;
    double tmp;

    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        for (int x = rect.Left; x < rect.Right; x++)
        {
            CP = src[x,y];
            CO=CP;
            tmp=CP.R;
            divs=256-Amount1;
            CO.R=(byte)(tmp - (tmp % divs));
            tmp=CP.G ;
            divs=256-Amount2;
            CO.G =(byte)(tmp - (tmp % divs));
            tmp=CP.B ;
            divs=256-Amount3;
            CO.B =(byte)(tmp - (tmp % divs));
            
            dst[x,y] = CO;
        }
    }
}

 

 

  • Upvote 1

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

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.

 Share

×
×
  • Create New...