Jump to content
How to Install Plugins ×

Cutout Effect Plug-In


Illnab1024

Recommended Posts

Here it is: the Cutout Effect Plugin.

This is Based on Seared Ice's Tutorial here.

It is also implemented from a Plugin request here.

Enjoy.

Download the dll here.

Download the simple source and Visual Studio solution here.

Here is a formula for how many colors there will be:

C = (256/I)^4

Edited; file moved to getpaint.net

~~

Link to comment
Share on other sites

  • 11 months later...
  • 4 years later...

Several times I tried to use the cutout effect and each time got only a Plugin Error message telling me to restart Paint.Net.

post-81070-132306938564_thumb.png

I went to the effects folder in PDN to remove the cutouteffect dll, before installing a newly downloaded version of the dll, but there was no cutouteffect dll to remove (or anything similar); and yet '"cutout" still appears in the effects drop-down menu.

post-81070-132306976923_thumb.png

So, I put the newly downloaded dll in the effects folder and restarted PDN. "Cutout" then appeared twice in the drop-down menu, but clicking on either one just returned the original plugin error message.

post-81070-132307007982_thumb.png

I removed the dll from the effects folder and restarted but only one of listing's of "cutout" had disappeared from the drop-down menu.

1. How can "cutout" still appear in the drop-down menu when there is no cutouteffect dll in the Effects Folder ?

and

2. What else, besides delete the dll from the Effects folder, can I do to to remove "cutout" from the drop-down menu ?

Link to comment
Share on other sites

Cutout is part of Illnab's plugin pack (illnabPlugins.dll).

Unfortunately - if you remove the dll then the other effects ( Alpha Mask, Cutout Effect, Advanced Greyscale, Point Warp, Polar to Rect) won't work either. It's all-or-nothing I'm afraid :/

If you're not using the other effects, then simply remove the dll mentioned.

I'm not sure if reinstalling the stand-alone cutout effect (from the dll link in the first post of this thread) will reproduce the error or not.

Link to comment
Share on other sites

Thanks. I'd forgotten that I deleted "cutouteffect.dll when I installed Illnab's plugin pack. That explains the drop-down-menu-cutout-icon-without-corresponding-cutouteffect dll-mystery.

FYI: The cutout effect just produces an error message regardless of which dll is installed separately. Oh well—so sad.

Link to comment
Share on other sites

From the source file on the first post you could compile your own DLL with CodeLab:

// Name: CutOut Effect
// Title: CutOut Effect
// Author: Illnab1024
// Submenu: Color
// URL: http://forums.getpaint.net/index.php?/topic/1533-cutout-effect-plug-in/

#region UICode
int Amount1=32;	//[1,255]Amount
#endregion

void Render(Surface dst, Surface src, Rectangle rect)
{
int interval = (Amount1);
int R;
int B;
int G;
int A;
float divR;
float divB;
float divG;
float divA;

ColorBgra CurrentPixel;
for (int y = rect.Top; y < rect.Bottom; y++)
{
	for (int x = rect.Left; x < rect.Right; x++)
	{
		ColorBgra source = src[x, y];
		divR = source.R / interval;
		divB = source.B / interval;
		divG = source.G / interval;
		divA = source.A / interval;
		R = (int)System.Math.Ceiling(divR);
		B = (int)System.Math.Ceiling(divB);
		G = (int)System.Math.Ceiling(divG);
		A = (int)System.Math.Ceiling(divA);
		R *= interval;
		B *= interval;
		G *= interval;
		A = 255; //A * interval;
		ColorBgra fin = dst[x, y];
		fin.R = (byte)(R);
		fin.B = (byte)(;
		fin.G = (byte)(G);
		fin.A = (byte)(A);
		dst[x, y] = fin;
	}
}
}

Save this code as Cutout.cs

Open this file within CodeLab

Save as DLL

Close/open PDN

tada...

  • Upvote 1
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.

×
×
  • Create New...