Jump to content
How to Install Plugins ×

MadJik' all plugins (last updated: 2018-04-07)


MadJik

Recommended Posts

Lol, he just doesn't want to tell you the desired path, MadJik...

Meanwhile, may I suggest that you update the plugins which are not showing the source picture in the window where you can decide the center of the effect? At the moment it just looks weird and degrades your plugins.

Done...with some bonus...

////Last changes: need to create/update the plugins topics (soon)

Vibrato (colored)

Moire (colored)

Gravity (slider per color)

Center X,Y with small image...

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 2 weeks later...
  • 3 weeks later...
  • 2 weeks later...

ThreadsMarker is an utility to help you to understand that the rectangles of interest aren't strictly sorted, and so we need to adapt the code to work regardless the sequence of the rect or the Y value (I think I'm not clear, but I can't find other words for now).

Read the code and the comments, it should help you to understand this utility:

// Count one by one and color in scale per channel the pixels in the usual x,y loops.
// You could think you will create a gradient, but surprise!

//Set the steps per channel
int Amount1=2;  //[-100,100]Red Step
int Amount2=2;  //[-100,100]Green Step
int Amount3=2;  //[-100,100]Blue Step

// Define the counter to be unique regardless the (multi)threads
[ThreadStatic]
public static int threadCount = 0;

void Render(Surface dst, Surface src, Rectangle rect)
{
 // Count + 1
 ++threadCount;

 ColorBgra CurrentPixel;
 for(int y = rect.Top; y < rect.Bottom; y++)
 {
   for (int x = rect.Left; x < rect.Right; x++)
   {
     CurrentPixel = src[x,y];
     CurrentPixel.R = (byte)((threadCount * Amount1) % 255);
     CurrentPixel.G = (byte)((threadCount * Amount2) % 255);
     CurrentPixel.B = (byte)((threadCount * Amount3) % 255);
     dst[x,y] = CurrentPixel;
   }
 }
}

Link to comment
Share on other sites

  • 3 weeks later...

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.

×
×
  • Create New...