Sign in to follow this  
TechnoRobbo

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

 

 

Time to go all Andy Warhol on you:

 

Warhol.png?raw=1

 

and for the Geeks like me The Code:

 

Hidden Content:
// Submenu: Color
// Name: FSPosterizer
// Title: Full Spectrum Posterizer - v1.0
// Author: 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;
        }
    }
}
 

FSPost.zip

Edited by TechnoRobbo
  • Upvote 1

Share this post


Link to post
Share on other sites

Nice example Drew. It looks like a poster for a gangland movie ;)

Cheers Nitenurse - I have just been informed by my son that I look like 'Big Vern' from Viz comic. B) 

  • Upvote 2

Share this post


Link to post
Share on other sites

Cheers Nitenurse - I have just been informed by my son that I look like 'Big Vern' from Viz comic. B)

Classic. Scarily you do ... just hope Sharon and Tracey don't jump on you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this