TechnoRobbo

CMY Ghost and Cycle HSV

Recommended Posts

CMY Ghost is a way to mess with the Color and Alpha create wild effects.

 

Version 1.1- is now in the Color Menu.

 

Instrunction Link: http://youtu.be/Vd2WPemHc3g

 

Program reposted on 3:23 PM Sunday, June 9, 2013 (UTC)

 

 

CycleHSV  allows you to do a per pixel cycle the colors space with Saturation and Brightness as well as Hue.

The values roll over with out clamping (a hue of 361 = 1, a saturation of 101 =1 etc). This leads to interesting Posterization effects.

 

Instrunction Link:http://youtu.be/ILS216rYHog

 

 

CMY Ghost

CMY%20Ghost.png?raw=1

 

 

CycleHSV

HSVEyeball.png?raw=1

 

Thank You to Pyrochild for his advice.

CMY Ghost.zip

CycleHSV.zip

Edited by TechnoRobbo
  • Upvote 2

Share this post


Link to post
Share on other sites

Please Explain how. Reposted code per Pyrochild's advice.

#region UICode
int Amount1 = 255; // [0,255] Cyan
int Amount2 = 105; // [0,255] Magents
int Amount3 = 0; // [0,255] Yellow
int Amount4 = 255; // [0,255] Alpha
#endregion


unsafe void Render(Surface dst, Surface src, Rectangle rect)
{
    int scratch = 0;
    int tmpval = 0;
    // Delete any of these lines you don't need
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y);
        ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y);
        for (int x = rect.Left; x < rect.Right; x++)
        {                
            ColorBgra CurrentPixel = *srcPtr;
            scratch= (int)((long)CurrentPixel.R + (long)CurrentPixel.G + (long)CurrentPixel. / 3;
            tmpval=Math.Abs(Amount1-scratch);
            CurrentPixel.R=(Byte)tmpval;
            tmpval=Math.Abs(Amount2-scratch);
            CurrentPixel.G=(Byte)tmpval;
            tmpval=Math.Abs(Amount3-scratch);
            CurrentPixel.B=(Byte)tmpval;
            tmpval=Math.Max(Amount4,scratch);
            CurrentPixel.A=(Byte)tmpval;

            
            
            *dstPtr = CurrentPixel;
            srcPtr++;
            dstPtr++;            
        }
    }
}



			
				


	Edited  by TechnoRobbo
	
	

			
		

Share this post


Link to post
Share on other sites

On multicore processors, Paint.NET divides the image up into many rectangles so that each core can work on part of the image at the same time. Your tmpval and scratch variables are being accessed and used by multiple threads simultaneously. Define them inside your Render function like this so each thread gets its own local variable.

#region UICode

int Amount1 = 255; // [0,255] Cyan

int Amount2 = 105; // [0,255] Magents

int Amount3 = 0; // [0,255] Yellow

int Amount4 = 255; // [0,255] Alpha

#endregion

//int scratch=0;

//int tmpval=0;

unsafe void Render(Surface dst, Surface src, Rectangle rect)

{

int scratch;

int tmpval;

Share this post


Link to post
Share on other sites

That's a possibillity. I thought that since I'm replacing all colors and messing with the alpha, it really wasn't a color filter of sorts. I don't know. Let me put it out to a vote. What do people think the "natural fit"  category is?

Share this post


Link to post
Share on other sites

Good Evening,

 

would it be possible to have a written tutorial on CMY Ghost, i am finding it a little difficult to follow.  My apologies for putting this question under 'questions'.....O dear.

 

Cheers

Share this post


Link to post
Share on other sites

My apologies for putting this question under 'questions'.....O dear.

Well...let's put it this way: you put a specific question (about a plugin) under "general questions" (about paint.net)

Anyhow, as far as I can tell (please correct me if I'm wrong, TR), the plugin turns anything that isn't the color you picked into transparency. You set the ratio of red:green:blue and it gives everything that ratio, and the more it had to change the original pixel to do it, the more transparent the pixel will be.

Share this post


Link to post
Share on other sites

Well...let's put it this way: you put a specific question (about a plugin) under "general questions" (about paint.net)

Anyhow, as far as I can tell (please correct me if I'm wrong, TR), the plugin turns anything that isn't the color you picked into transparency. You set the ratio of red:green:blue and it gives everything that ratio, and the more it had to change the original pixel to do it, the more transparent the pixel will be.

yes thank you - i do realise that, but i am having trouble getting it onto the background....never mind pdnnoob - back to the video again.   :)

Share this post


Link to post
Share on other sites

pdnnoob explained it well. Images with transparency need to go on a layer above the background.

 

thanks, noob

Edited by TechnoRobbo

Share this post


Link to post
Share on other sites

pdnnoob explained it well. Images with transparency need to go on a layer above the background.

 

thanks, noob

thank you TR - all i do with these is desktop backgrounds - just something i like to do that is elegant...i am aware of plagiarism & copyright...this is just for my use only.....all help gratefully accepted....~peace ~

Share this post


Link to post
Share on other sites

pdnnoob explained it well. Images with transparency need to go on a layer above the background.

 

thanks, noob

thank you - i guess you actually looked at the video ...no copy/paste there...... :trophy:  you deserve it for at least watching the video 

Share this post


Link to post
Share on other sites

 

 

thank you - i guess you actually looked at the video ...no copy/paste there......  :trophy:  you deserve it for at least watching the video 

 

 

Oh, I see. Forgive me, this was the first video I created for Paint.net. I wasn't as self aware as I was in the latter videos. Copy and paste was achieved with the hot keys. Watch the video again I added some instructions on the left side. 

 

Hot Keys I used:

  • CTRL + A - selects all of the image
  • CTRL + C - copies the image
  • CTRL + V - pastes the image into the new layer.

 

Edited by TechnoRobbo

Share this post


Link to post
Share on other sites

Oh, I see. Forgive me, this was the first video I created for Paint.net. I wasn't as self aware as I was in the latter videos. Copy and paste was achieved with the hot keys. Watch the video again I added some instructions on the left side. 

 

Hot Keys I used:

  • CTRL + A - selects all of the image
  • CTRL + C - copies the image
  • CTRL + V - pastes the image into the new layer.

 

you clever little Vegemite [high praise from an Aussie] .....i shall return to this tonight :)

Share this post


Link to post
Share on other sites

Oh, I see. Forgive me, this was the first video I created for Paint.net. I wasn't as self aware as I was in the latter videos. Copy and paste was achieved with the hot keys. Watch the video again I added some instructions on the left side. 

 

Hot Keys I used:

  • CTRL + A - selects all of the image
  • CTRL + C - copies the image
  • CTRL + V - pastes the image into the new layer.

 

by jove i have actually done it.....thank you for your patience ..i am gaining on it ...slowly.  :GlowEffect:

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