Jump to content

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 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

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
	
	

			
		

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

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;

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

  • 2 weeks later...

Cycle HSV appears in a new menu named Colors - this should be Color.

Link to comment
Share on other sites

  • 4 months later...

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.

 

what I do all summer Emote Cursor Pack 'noob gallery

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

Link to comment
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.   :)

Link to comment
Share on other sites

To get it onto the background, open the background in paint.net and paste the ghost onto a new layer.

  • Upvote 1

 

what I do all summer Emote Cursor Pack 'noob gallery

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

Link to comment
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 ~

Link to comment
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

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

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 :)

Link to comment
Share on other sites

  • 2 weeks later...

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:

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...