barkbark00 Posted May 21, 2007 Share Posted May 21, 2007 Hmmm... that gives me an interesting idea...I wonder if a file type plugin could be written that would "open" a dll file by copying it to the effects folder. This would allow someone to right-click on an effects dll and choose "open with Paint.net" to install the effect. Then you'd be screwed if you set PdN as the default program for handling .dll's! Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
pyrochild Posted May 21, 2007 Share Posted May 21, 2007 well it's not like most of us have anything else set as the default handler for dll's. do you? Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
lloydo Posted May 30, 2007 Share Posted May 30, 2007 What is the symbol you use at the end???? Quote Broken toaster = (Rushes to HomeBase!) Link to comment Share on other sites More sharing options...
BoltBait Posted May 30, 2007 Share Posted May 30, 2007 What is the symbol you use at the end???? I don't understand your question. Could you be more specific? The "end" of what, exactly? What error are you seeing? Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
lloydo Posted May 30, 2007 Share Posted May 30, 2007 What is the symbol you use at the end???? I don't understand your question. Could you be more specific? The "end" of what, exactly? What error are you seeing? type or namespace definition, or end of file expected (CS1002)Do you know what this is? Quote Broken toaster = (Rushes to HomeBase!) Link to comment Share on other sites More sharing options...
BoltBait Posted May 30, 2007 Share Posted May 30, 2007 What is the symbol you use at the end???? I don't understand your question. Could you be more specific? The "end" of what, exactly? What error are you seeing? type or namespace definition, or end of file expected (CS1002)Do you know what this is? Show me your code. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
lloydo Posted May 30, 2007 Share Posted May 30, 2007 void Render(Surface dst, Surface src, Rectangle rect) { // How big is your box of chalk? double BaseColors = 72; // 1-360, step 1, Default = 72 PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; double Q = 360 / BaseColors; double H = 0,S = 0,V = 0; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) ( if (selectionRegion.IsVisible(x, y)) CurrentPixel = src[x,y]; ; (CurrentPixel.R,CurrentPixel.G,CurrentPixel.B,ref H,ref) S,ref V); (CS1026) H = Q*(double)Math.Round(H/Q); // Normalize Hue if (S > .15) // Compress Saturation ( S = ( (0.35*(S-0.15)) / (1.0-0.15) ) + 0.15; ) if (V > 0.05) // Compress Value ( V = ( (0.15*(V-0.05)) / (1.0-0.05) ) + 0.85; ) ; else // Near Black Pixels { S = 0; // turn them gray V += 0.75; } EvanHSVtoRGB(H,S,V,ref CurrentPixel.R,ref CurrentPixel.G,ref CurrentPixel.; dst[x,y] = CurrentPixel; } } } } Quote Broken toaster = (Rushes to HomeBase!) Link to comment Share on other sites More sharing options...
BoltBait Posted May 30, 2007 Share Posted May 30, 2007 Check for places where you have ( instead of { By the way, your code looks very familiar... http://boltbait.googlepages.com/pastel You didn't do a very good job of copy-and-paste. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
lloydo Posted May 30, 2007 Share Posted May 30, 2007 void Render{Surface dst, Surface src, Rectangle rect} { // How big is your box of chalk? double BaseColors = 72; // 1-360, step 1, Default = 72 PdnRegion selectionRegion = EnvironmentParameters.GetSelection{src.Bounds}; Rectangle selection = this.EnvironmentParameters.GetSelection{src.Bounds}.GetBoundsInt{}; ColorBgra CurrentPixel; double Q = 360 / BaseColors; double H = 0,S = 0,V = 0; for(int y = rect.Top; y < rect.Bottom; y++} { for {int x = rect.Left; x < rect.Right; x++} { if {selectionRegion.IsVisible{x, y}} CurrentPixel = src[x,y]; ; {CurrentPixel.R,CurrentPixel.G,CurrentPixel.B,ref H,ref} S,ref V}; {CS1026} H = Q*{double}Math.Round{H/Q}; // Normalize Hue if {S > .15} // Compress Saturation { S = { {0.35*{S-0.15}} / {1.0-0.15} } + 0.15; } {V > 0.05} // Compress Value { V = { {0.15*{V-0.05}} / {1.0-0.05} } + 0.85; } ; else // Near Black Pixels { S = 0; // turn them gray V += 0.75; } EvanHSVtoRGB(H,S,V,ref CurrentPixel.R,ref CurrentPixel.G,ref CurrentPixel.B}; dst[x,y] = CurrentPixel; } } } } Just made more errors Can you correct all the errors then send back to me? Quote Broken toaster = (Rushes to HomeBase!) Link to comment Share on other sites More sharing options...
lloydo Posted May 30, 2007 Share Posted May 30, 2007 By the way, your code looks very familiar... http://boltbait.googlepages.com/pastel You didn't do a very good job of copy-and-paste. ok you found out i was editing your pastel source code please dont ban me , please!! Quote Broken toaster = (Rushes to HomeBase!) Link to comment Share on other sites More sharing options...
BoltBait Posted May 30, 2007 Share Posted May 30, 2007 I'm not going to ban you for that. Just stop putting bugs into my code! Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
OmgWtfBbq Posted June 2, 2007 Share Posted June 2, 2007 Ah I don't know C# or any of that and I dont really want to. But I DO want to make any bloody potato that you guys stick on here in C# into a dll but it won't let me. Anything I should know to figure this out? Quote Link to comment Share on other sites More sharing options...
Yata Posted June 2, 2007 Share Posted June 2, 2007 I would assume you copy paste the code into codelab in PDN, click make DLL and bam. Quote "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former" [ dA Paint.NET Chat :: Yata on dA ] Link to comment Share on other sites More sharing options...
MadJik Posted June 2, 2007 Share Posted June 2, 2007 Code without error message BUT still not working due to bad programing: int Amount1=72; //[1,360]How big is your box of chalk? void Render(Surface dst, Surface src, Rectangle rect) { double BaseColors = (double)Amount1; PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; double Q = 360 / BaseColors; double H = 0,S = 0,V = 0; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; H = Q * (double)Math.Round(H / Q); // Normalize Hue if (S > 0.15) // Compress Saturation { S = ((0.35 * (S - 0.15)) / (1.0 - 0.15)) + 0.15; } if (V > 0.05) // Compress Value { V = ((0.15 * (V - 0.05)) / (1.0 - 0.05)) + 0.85; } else // Near Black Pixels { S = 0; // turn them gray V += 0.75; } //EvanHSVtoRGB(H,S,V,ref CurrentPixel.R,ref CurrentPixel.G,ref CurrentPixel.; dst[x,y] = CurrentPixel; } } } } 1. Never use {} for function, it's only needed for groups of instructions. 2. Use () for all the functions. 3. Semi-column ';' is needed at the end of an instruction 4. S, V are always at 0! You need to affect them a value somewhere! 5. EvanHSVtoRGB isn't a built-in function, to use it, you have to add its code at the end. 6. I have added Amount1, that will allow you to have a slider when you will build the DLL. Now please go on... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
OmgWtfBbq Posted June 2, 2007 Share Posted June 2, 2007 I would assume you copy paste the code into codelab in PDN, click make DLL and bam. Wait nevermind. I accidentally clicked into user interface before. Stupidity =.=" Quote Link to comment Share on other sites More sharing options...
lloydo Posted June 2, 2007 Share Posted June 2, 2007 Code without error message BUT still not working due to bad programing: int Amount1=72; //[1,360]How big is your box of chalk? void Render(Surface dst, Surface src, Rectangle rect) { double BaseColors = (double)Amount1; PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; double Q = 360 / BaseColors; double H = 0,S = 0,V = 0; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; H = Q * (double)Math.Round(H / Q); // Normalize Hue if (S > 0.15) // Compress Saturation { S = ((0.35 * (S - 0.15)) / (1.0 - 0.15)) + 0.15; } if (V > 0.05) // Compress Value { V = ((0.15 * (V - 0.05)) / (1.0 - 0.05)) + 0.85; } else // Near Black Pixels { S = 0; // turn them gray V += 0.75; } //EvanHSVtoRGB(H,S,V,ref CurrentPixel.R,ref CurrentPixel.G,ref CurrentPixel.; dst[x,y] = CurrentPixel; } } } } 1. Never use {} for function, it's only needed for groups of instructions. 2. Use () for all the functions. 3. Semi-column ';' is needed at the end of an instruction 4. S, V are always at 0! You need to affect them a value somewhere! 5. EvanHSVtoRGB isn't a built-in function, to use it, you have to add its code at the end. 6. I have added Amount1, that will allow you to have a slider when you will build the DLL. Now please go on... Ok the code is now perfect thanks to madjik ( thanks dude! ) the only thing is that access to my effects folder is denied and im on my administrator account... Quote Broken toaster = (Rushes to HomeBase!) Link to comment Share on other sites More sharing options...
pyrochild Posted June 15, 2007 Share Posted June 15, 2007 Hey hey hey BoltBait! I've gone and found a bug! When you use the Delete key to make a change to the code, it does not seem to realize that the code has changed and therefore does not recompile... Minor, I know, but I just thought I'd let you know. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
BoltBait Posted June 15, 2007 Share Posted June 15, 2007 Hey hey hey BoltBait! I've gone and found a bug!When you use the Delete key to make a change to the code, it does not seem to realize that the code has changed and therefore does not recompile... Minor, I know, but I just thought I'd let you know. Page one called... they want their bug report back... http://paintdotnet.12.forumer.com/viewt ... =4617#4617 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
pyrochild Posted June 15, 2007 Share Posted June 15, 2007 :oops: I searched! I swear I did! Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
OmgWtfBbq Posted June 16, 2007 Share Posted June 16, 2007 Hey hey hey BoltBait! I've gone and found a bug!When you use the Delete key to make a change to the code, it does not seem to realize that the code has changed and therefore does not recompile... Minor, I know, but I just thought I'd let you know. Page one called... they want their bug report back... http://paintdotnet.12.forumer.com/viewt ... =4617#4617 Owned Quote Link to comment Share on other sites More sharing options...
Andrew D Posted September 7, 2007 Share Posted September 7, 2007 Rick (or BB I guess) will you ever be releasing the codelab script, for us to browse and look at? Quote Link to comment Share on other sites More sharing options...
BoltBait Posted September 7, 2007 Share Posted September 7, 2007 Rick (or BB I guess) will you ever be releasing the codelab script, for us to browse and look at? You mean the source code to CodeLab? If so, it is available for download on my page. (Link in sig) Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Andrew D Posted September 7, 2007 Share Posted September 7, 2007 Rick (or BB I guess) will you ever be releasing the codelab script, for us to browse and look at? You mean the source code to CodeLab? If so, it is available for download on my page. (Link in sig) One final question, where do you get Visual Studio from? Quote Link to comment Share on other sites More sharing options...
MattBlackLamb Posted September 7, 2007 Share Posted September 7, 2007 Microsoft, try searching microsofts site for it There's a free version & a version that you have to pay money for. Quote dA Son, someday you will make a girl happy for a short period of time. Then she'll leave you & be with men that are ten times better than you can imagine. These men are called musicians. Link to comment Share on other sites More sharing options...
Andrew D Posted September 7, 2007 Share Posted September 7, 2007 Microsoft, try searching microsofts site for it There's a free version & a version that you have to pay money for. Thanks. I'll download it when I've learnt enough C# that I can transfer it to another program, which leads the question, is there anywhere where you can learn it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.