Jump to content

ReMake

Members
  • Posts

    1,246
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by ReMake

  1. Sometimes New Zealand is named the Shaky Isles. Every year in New Zealand is registered around 20,000 earthquakes. Scott, as far as I know , You live in the North of the South island. I hope the consequences of the earthquake hasn't touched You?
  2. The .NET Framework installation process can take from 15 to 45 minutes depending on the specs of your PC.
  3. Very attractive and fascinating. Wonderful works!
  4. Great plug-in and tutorial. Thank You for the Source Code - this is a cool tutorial too!
  5. Welcome to the forum, Bob! I hope you will find here a lot of useful things for your works. Use the Plugin Index by Ego Eram Reputo to make it easier for you to find the necessary effect. Good luck.
  6. Interesting and very useful plug-in. If it's interesting for You: this is a .dlc file with the translation into Russian.
  7. Try this: http://forums.getpaint.net/index.php?/topic/31590-unable-to-install-paintnet/#entry424258
  8. Maximilian, Seerose! Thank you both for the appreciation of my efforts.
  9. I've updated the effect, because I've detected an error. You can look it yourself. Create an image of size 18x18 pixels. Apply to him the Lines/Grid effect with options: Lines Width=4 and Interval Width=4. Select pixel grid option (View -> Pixel grid). As you can see that lines and intervals are the same size to 4 pixels. Now select the Inverse checkbox and note the width of the intervals. It's equal to 3 pixels, but must be 4 pixels. This error I fixed in the new version.
  10. Thank You, Maximilian! Good fast work. I will follow Your wishes.
  11. Very nice work (bardzo piękny), Pixey! Thank You very much!
  12. Thanks Seerose for Your appreciation of my work and for Your kind words.
  13. Thank You, sashwilko for the kind words. And thanks for the picture (I had to change the browser and I haven't seen it before) .
  14. Thank You, racerx. Fixed. Cood a quick example.
  15. This effect is a result of a writing by me CodeLab - First Steps (Neon Edges) tutorial. You can find it: Effects -> Stylize -> Neon Edges Download from my PluginPack This effect is simulate the neon glow of edges into the image. It allows you to set the line thickness and the intensity of its glow. It is also possible the changing colors of the lines using the hue and saturation. With check box Eliminate the dark areas, you can convert the dark areas of the image to the transparency. This can be useful if you wish to keep this image on any background. For example, like this: Before: After, with a dark blue background:
  16. I think at least sometimes you notice the attractive glow of a neon sign. Perhaps you would like to have the effect imitating this glow. Let's make experiment with the image before to create our new effect . Load some any image. Apply to the image the Outline effect (Effects -> Stylize -> Outline). Set a Thickness to 8 and Intensity to 60. Now our image looks so: Apply to the image the Invert Colors effect (Adjustments -> Invert Colors). Look at the image. We have gained the effect simulating a neon glow. Yet do not close resulting image. Let's create our effect now. Open your source image in the new window. Start CodeLab (Effects-> Advanced-> CodeLab). Choose in the menu File -> New. In a dialogue box Script Editor click a No button. The dialogue window the New Source (Template) will be presented to you. In the drop-down list choose Outline and in the one of two drop-down list PixelOp choose Invert. Click the Generate Code button. We will receive the following script of effect: #region UICode int Amount1 = 3; // [1,200] Thickness int Amount2 = 50; // [1,100] Intensity #endregion // Setup for using pixel op private UnaryPixelOps.Invert invertOp = new UnaryPixelOps.Invert(); // Here is the main render loop function void Render(Surface dst, Surface src, Rectangle rect) { // Setup for calling the Outline effect OutlineEffect outlineEffect = new OutlineEffect(); PropertyCollection outlineProps = outlineEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken outlineParameters = new PropertyBasedEffectConfigToken(outlineProps); outlineParameters.SetPropertyValue(OutlineEffect.PropertyNames.Thickness, Amount1); outlineParameters.SetPropertyValue(OutlineEffect.PropertyNames.Intensity, Amount2); outlineEffect.SetRenderInfo(outlineParameters, new RenderArgs(dst), new RenderArgs(src)); // Call the Outline function outlineEffect.Render(new Rectangle[1] { rect }, 0, 1); // Now in the main render loop, the dst canvas has an outlined version of the src canvas for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = dst[x,y]; // TODO: Add additional pixel processing code here CurrentPixel = invertOp.Apply(CurrentPixel); dst[x,y] = CurrentPixel; } } } It was established experimentally that for the Thickness variable most acceptable range from 1 to 25, and for the Intensity variable - from 15 to 65. Let's change these variables. Open the designer interface (File -> User Interface Designer), select in it the Thickness line and write 25 in the Maximum box. Click the Update button. Select an Intensity line.Write 1 in the Minimum box, in the Maximum box - 50, and in the Default box - 25. Rename this variable to Glow Intensity. Click the Update button, then click button Ok. Change in the line outlineParameters. SetPropertyValue (OutlineEffect. PropertyNames. Intensity, Amount2); variable Amount2 to Amount2+14 (are you remember that the effective value of Intensity variable begins with 15). outlineParameters.SetPropertyValue(OutlineEffect.PropertyNames.Intensity, Amount2+14); Save our script with the NeonEdges_1 name (File -> Save...) and create a DLL file with the same name (File-> Save as DLL...). Check how your effect works with next parameters: Thickness = 8, Glow Intensity = 45. Compare result with the previous image. They are absolutely identical. We have achieved the desired result. But, you might want to change the color of the resulting edges. Go back to the first image. Apply to him the Hue / Saturation effect (Adjustments -> Hue / Saturation) with the different parameters of hue, and saturation. Note that most effectively saturation varies in the range from 100 to 200. Remember that. And again, let's address to the wonderful CodeLab Help (part 3) tutorial by BoltBait. In the Unary Pixel Operations section we have find the processing operations of hue, and saturation. Copy a line from this text: private UnaryPixelOps.HueSaturationLightness saturationOp; and paste it into our script after the line private UnaryPixelOps.Invert invertOp = new UnaryPixelOps.Invert(); Now copy from the tutorial the following lines: // create a saturation operation based on a UI slider saturationOp = new UnaryPixelOps.HueSaturationLightness(0, Amount1, 0); // fix CurrentPixel = saturationOp(CurrentPixel); and paste it after the CurrentPixel = invertOp.Apply(CurrentPixel); line. Do not forget to correct line CurrentPixel = saturationOp(CurrentPixel); to CurrentPixel = saturationOp.Apply(CurrentPixel); Open the designer interface (File -> User Interface Designer), In the drop-down list Control Type, select the Integer Slider. In the Control name box write the Hue. Write -180 in the Minimum box, in the Maximum box - 100, and in the Default box - 0. Click the Add button. Select the Integer Slider in the drop-down list Control type again. In the Control name box write the Saturation. Write 25 in the Default box. Click the Update button, then click button Ok. Now the code block looks as follows: #region UICode int Amount1 = 8; // [1,25] Thickness int Amount2 = 45; // [1,50] Glow Intensity int Amount3 = 0; // [-180,180] Hue int Amount4 = 0; // [0,100] Saturation #endregion Let's change in the line saturationOp = new UnaryPixelOps.HueSaturationLightness(0, Amount1, 0); values in parentheses. Write Amount3 instead first 0, and write (Amount4+100)*2 instead Amount1. Now our script looks like this: #region UICode int Amount1 = 8; // [1,25] Thickness int Amount2 = 45; // [1,50] Glow Intensity int Amount3 = 0; // [-180,180] Hue int Amount4 = 0; // [0,100] Saturation #endregion // Setup for using pixel op private UnaryPixelOps.Invert invertOp = new UnaryPixelOps.Invert(); private UnaryPixelOps.HueSaturationLightness saturationOp; // Here is the main render loop function void Render(Surface dst, Surface src, Rectangle rect) { // Setup for calling the Outline effect OutlineEffect outlineEffect = new OutlineEffect(); PropertyCollection outlineProps = outlineEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken outlineParameters = new PropertyBasedEffectConfigToken(outlineProps); outlineParameters.SetPropertyValue(OutlineEffect.PropertyNames.Thickness, Amount1); outlineParameters.SetPropertyValue(OutlineEffect.PropertyNames.Intensity, Amount2 + 14); outlineEffect.SetRenderInfo(outlineParameters, new RenderArgs(dst), new RenderArgs(src)); // Call the Outline function outlineEffect.Render(new Rectangle[1] { rect }, 0, 1); // Now in the main render loop, the dst canvas has an outlined version of the src canvas for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = dst[x,y]; CurrentPixel = invertOp.Apply(CurrentPixel); // Create a hue & saturation operation based on a UI slider saturationOp = new UnaryPixelOps.HueSaturationLightness(Amount3, (Amount4 + 100)*2, 0); // fix CurrentPixel = saturationOp.Apply(CurrentPixel); // TODO: Add additional pixel processing code here dst[x,y] = CurrentPixel; } } } Save it with the name NeonEdges_2 and create a DLL file with the same name. Check your effect in the work. Maybe you want to eliminate the dark areas of the image to use this image with a different background. For this requires set to each pixel a maximum value of one of the three components R, G, or B. We need an R, G, B and A integer variables, as well as one more control. Open the Designer interface and in the drop-down list Control type, select the Check Box. In the Control name box write Eliminate dark areas. Click Add button and then button Ok. The code block of user interface will look like this: #region UICode int Amount1 = 8; // [1,25] Thickness int Amount2 = 45; // [1,50] Glow Intensity int Amount3 = 0; // [-180,180] Hue int Amount4 = 0; // [0,100] Saturation bool Amount5 = false; // [0,1] Eliminate dark areas #endregion Below the commented line TODO: add the following code: // TODO: Add additional pixel processing code here int R = CurrentPixel.R; int G = CurrentPixel.G; int B = CurrentPixel.B; int A = CurrentPixel.A; if (Amount5) {A = Math.Max(Math.Max(R,G),В);} CurrentPixel.A = Int32Util.ClampToByte(A); It remains to add some information: // Author: ReMake // Submenu: Stylize // Name: Neon Edges // Title: Neon Edges // Desc: The Paint.Net effect that simulates neon edges of the image // Keywords: paint.net|effect|neon|edges // URL: http://www.getpaint.net/redirect/plugins.html and our final script will look like this: // Author: ReMake // Submenu: Stylize // Name: Neon Edges // Title: Neon Edges // Desc: The Paint.Net effect that simulates neon edges of the image // Keywords: paint.net|effect|neon|edges // URL: http://www.getpaint.net/redirect/plugins.html #region UICode int Amount1 = 8; // [1,25] Thickness int Amount2 = 45; // [1,50] Glow Intensity int Amount3 = 0; // [-180,180] Hue int Amount4 = 25; // [0,100] Saturation bool Amount5 = false; // [0,1] Eliminate dark areas #endregion // Setup for using pixel op private UnaryPixelOps.Invert invertOp = new UnaryPixelOps.Invert(); private UnaryPixelOps.HueSaturationLightness saturationOp; // Here is the main render loop function void Render(Surface dst, Surface src, Rectangle rect) { // Setup for calling the Outline effect OutlineEffect outlineEffect = new OutlineEffect(); PropertyCollection outlineProps = outlineEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken outlineParameters = new PropertyBasedEffectConfigToken(outlineProps); outlineParameters.SetPropertyValue(OutlineEffect.PropertyNames.Thickness, Amount1); outlineParameters.SetPropertyValue(OutlineEffect.PropertyNames.Intensity, Amount2 + 14); outlineEffect.SetRenderInfo(outlineParameters, new RenderArgs(dst), new RenderArgs(src)); // Call the Outline function outlineEffect.Render(new Rectangle[1] { rect }, 0, 1); // Now in the main render loop, the dst canvas has an outlined version of the src canvas for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = dst[x, y]; CurrentPixel = invertOp.Apply(CurrentPixel); // Create a hue & saturation operation based on a UI slider saturationOp = new UnaryPixelOps.HueSaturationLightness(Amount3, (Amount4 + 100) * 2, 0); CurrentPixel = saturationOp.Apply(CurrentPixel); // TODO: Add additional pixel processing code here int R = CurrentPixel.R; int G = CurrentPixel.G; int B = CurrentPixel.B; int A = CurrentPixel.A; if (Amount5) // Define the highest value for the alpha channel { A = Math.Max(Math.Max(R, G), В); } CurrentPixel.A = Int32Util.ClampToByte(A); dst[x, y] = CurrentPixel; } } } It's necessary to create an icon for the interface of our effect from the PNG file, which have the size of 16x16 pixels. I have created such icon: . Now let's save our effect as a DLL file: File-> Save as DLL... Almost all information is in the dialog box, which presented to you. Click the Select icon link and select the icon. Click the Build button - your new effect is ready! The user interface of our new effect looks like this. And this is the result of effect's work with a dark blue background, which was placed under the image. I think, it was easy to create this effect. Thanks to BoltBait for his advice about the hue and saturation. This allowed me to find a simple variant of the use of the hue and saturation for this tutorial. Вариант этой темы на русском языке смотрите здесь.
  17. Possibly you repeatedly applied Paint.NET effect Hue / Saturation. Probably you asked a question: whether it is possible to adjust a color saturation separately in each color channel? Yes, it's possible. Let's begin to create this simple effect in CodeLab. Start CodeLab: Effects-> Advanced-> CodeLab. CodeLab dialog box with the script by default will be presented to you: // Name: // Submenu: // Author: // Title: // Version: // Desc: // Keywords: // URL: // Help: #region UICode IntSliderControl Amount1 = 0; // [0,100] Slider 1 Description IntSliderControl Amount2 = 0; // [0,100] Slider 2 Description IntSliderControl Amount3 = 0; // [0,100] Slider 3 Description #endregion void Render(Surface dst, Surface src, Rectangle rect) { // Delete any of these lines you don't need Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int CenterX = ((selection.Right - selection.Left) / 2) + selection.Left; int CenterY = ((selection.Bottom - selection.Top) / 2) + selection.Top; ColorBgra PrimaryColor = EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = EnvironmentParameters.SecondaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; // TODO: Add pixel processing code here // Access RGBA values this way, for example: // CurrentPixel.R = PrimaryColor.R; // CurrentPixel.G = PrimaryColor.G; // CurrentPixel.B = PrimaryColor.B; // CurrentPixel.A = PrimaryColor.A; dst[x,y] = CurrentPixel; } } } Delete next lines: // Delete any of these lines you don't need Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int CenterX = ((selection.Right - selection.Left) / 2) + selection.Left; int CenterY = ((selection.Bottom - selection.Top) / 2) + selection.Top; ColorBgra PrimaryColor = EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = EnvironmentParameters.SecondaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; they will not be necessary for us. Open User Interface Designer: File-> User Interface Designer. Select in it the top line and in the Control name box write Red. Click the Update button. Rename the next controls to Green and Blue accordingly. Now the code block of user interface (UI) will look like this: #region UICode IntSliderControl Amount1 = 0; // [0,100] Red IntSliderControl Amount2 = 0; // [0,100] Green IntSliderControl Amount3 = 0; // [0,100] Blue #endregion As we will adjust each separate color items of pixel, three variables will be necessary for us: R, G and B. Add these lines after CurrentPixel = src [x, y]; int R = CurrentPixel.R; int G = CurrentPixel.G; int B = CurrentPixel.B; We will need one more variable - grey, add it below the lines shown above. int gray = (R+G+B)/3; By trial I defined the formula of adjustment of the color channel: Color = ((100 - AmountX) *gray + AmountX*Color)/100. Let's apply this formula to each of three channels: // TODO: Add pixel processing code here R = ((100 - Amount1)*gray + Amount1*R)/100; G = ((100 - Amount2)*gray + Amount2*G)/100; B = ((100 - Amount3)*gray + Amount3*B)/100; It is necessary to collect the color components of pixel together: CurrentPixel.R = Int32Util.ClampToByte(R); CurrentPixel.G = Int32Util.ClampToByte(G); CurrentPixel.B = Int32Util.ClampToByte(В); Now our script looks like this: #region UICode IntSliderControl Amount1 = 0; // [0,100] Red IntSliderControl Amount2 = 0; // [0,100] Green IntSliderControl Amount3 = 0; // [0,100] Blue #endregion void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; int R = CurrentPixel.R; int G = CurrentPixel.G; int B = CurrentPixel.B; int gray = (R+G+B)/3; // TODO: Add pixel processing code here R = ((100 - Amount1)*gray + Amount1*R)/100; G = ((100 - Amount2)*gray + Amount2*G)/100; B = ((100 - Amount3)*gray + Amount3*B)/100; CurrentPixel.R = Int32Util.ClampToByte(R); CurrentPixel.G = Int32Util.ClampToByte(G); CurrentPixel.B = Int32Util.ClampToByte(B); dst[x,y] = CurrentPixel; } } } Save this script with the SaturationRGB_1 name (File -> Save...) and create a DLL file with the same name (File-> Save as DLL...). Check how your effect works. When all sliders is set to 0, we will have the image of grey colour. If all sliders is set to 100 we will have the not changed source image. Let's continue. Replace the maximum values of Amount in the code block of user interface (UI) to 300 (experiment shows that great values will lead to loss of the image details). Set the minimum values to -200 (smaller values will also lead to loss of the image details). Set the default values to 100. #region UICode IntSliderControl Amount1 = 0; // [-200,300] Red IntSliderControl Amount2 = 0; // [-200,300] Green IntSliderControl Amount3 = 0; // [-200,300] Blue #endregion Let's address to Using CodeLab to Build a DLL by BoltBait. We can find some usefull information in the Default section and we can create similar for our script: // Author: ReMake - name of the effect's author // Name: Saturation RGB - name of effect in the menu // Title: Saturation RGB - a title of the effect's interface // Desc: Saturation RGB - the effect description // Keywords: paint.net|effect|saturation|rgb - a keywords from which your effect can be found in the Internet // URL: http://www.getpaint.net/redirect/plugins.html - your address in a network (or in the forum) Let's place this information before the code block of the interface: // Author: ReMake // Name: Saturation RGB // Title: Saturation RGB // Desc: Saturation RGB // Keywords: paint.net|effect|saturation|rgb // URL: http://www.getpaint.net/redirect/plugins.html #region UICode IntSliderControl Amount1 = 0; // [-200,300] Red IntSliderControl Amount2 = 0; // [-200,300] Green IntSliderControl Amount3 = 0; // [-200,300] Blue #endregion Save this script with the name SaturationRGB. And last, it is necessary to create an icon for the interface of our effect from the PNG file, which have the size of 16x16 pixels. I have created such icon: Now let's save our effect as a DLL file: File-> Save as DLL... Almost all information is in the dialog box, which presented to you. Select the Adjustment item in the Menu Settings. Click the Select icon link and select the icon. Click the Build button - your new effect is ready! The user interface of our new effect looks like this. I think, it was easy to create this effect. It was my first effect! Results of the effect's work you can see in the Saturation RGB topic. Вариант этой темы на русском языке смотрите здесь.
  18. CodeLab 2.5 in Russian You can find the new version of CodeLab in Russian here. Вы можете найти новую версию CodeLab на русском языке здесь.
×
×
  • Create New...