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

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.

Sign in to follow this