Jump to content

Pratyush

Members
  • Posts

    249
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Pratyush

  1. I had forced the group number to be an integer, but in XOD's suggestion that was missing. I will try including that and test.
  2. Hi @pyrochild , I use Curve++ more than paint.net's own curve. Please make one Dark theme for it so that I can collude with PDN's dark theme.
  3. Thanks for reminding that I thought that its Dark theme automatically activates when PDN is dark. Its dark theme is very pleasing.
  4. Hi @xod there is something happening, In the end there are some more stripes are getting rendered (no. of extra stripes is (quantity of gradual stripes)/(No. of repetition)-1, if both are divisible).
  5. Hi @xod , How did it worked? Normally when we go for horizontal lines , it gets divided into ROI's due to multi threading.
  6. Hi, I added feature for repeating stripes. I was trying to add choice of vertical and horizontal stripes. In case of vertical stripes it's working fine. But when I try to create horizontal stripes it gets some problem. Here is code. // Name: Gradual Stripes // Submenu: Render // Author: Pratyush // Title: Gradual Stripes // Version: 1.2.0 // Desc: Draws stripes with gradual change in shades // Keywords: Stripes|Grayscale|Lines // URL: // Help: #region UICode IntSliderControl Amount1 = 5; // [2,64] Quantity of Gradual Stripes IntSliderControl Amount2 = 1; // [1,10] No. of repeatation ColorWheelControl Amount3 = ColorBgra.FromBgr(0,0,0); // [PrimaryColor] Primary Color ColorWheelControl Amount4 = ColorBgra.FromBgr(255,255,255); // [SecondaryColor] Secondary Color CheckboxControl Amount5 = false; // [0,1] Vertical #endregion void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra PC = Amount3; ColorBgra SC = Amount4; // Step 0 is the first step, how much left to do: Amount - 1 int Maxgroup = Amount1 - 1; //Maxgroup = Maxgroup; // Define the size of step per Channel // assuming PC is the start and SC is the end int stepR = (SC.R - PC.R) / Maxgroup; int stepG = (SC.G - PC.G) / Maxgroup; int stepB = (SC.B - PC.B) / Maxgroup; int stepA = 0; //(PC.A + SC.A) / Maxgroup; ColorBgra CurrentPixel; float divide; // qunatity of shade to cover the canvas if (Amount5 == false) { divide = (float)rect.Width / Amount1; divide = divide/Amount2; 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 group = (int)(x / divide); group = group%Amount1; CurrentPixel.R = (byte)(PC.R + stepR * group); CurrentPixel.G = (byte)(PC.G + stepG * group); CurrentPixel.B = (byte)(PC.B + stepB * group); CurrentPixel.A = (byte)(PC.A + stepA * group); dst[x,y] = CurrentPixel; } } } else { divide = (float)rect.Height / Amount1; divide = divide/Amount2; 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 group = (int)(y / divide); group = group%Amount1; CurrentPixel.R = (byte)(PC.R + stepR * group); CurrentPixel.G = (byte)(PC.G + stepG * group); CurrentPixel.B = (byte)(PC.B + stepB * group); CurrentPixel.A = (byte)(PC.A + stepA * group); dst[x,y] = CurrentPixel; } } } } But in case of horizontal i get following. What should we need to do get output.
  7. Hi All, This plugin makes stripes with specified number. It begins with 1st color and after changing its shade step by step it converges to secondary color. Version 2.0 is entirely rewritten. Many thanks to @BoltBait for all of his effort making this effect a reality. New version respects the selection and doesn't gets distorted with its border. (For those who like distortion property of earlier version I have also kept previous plugin here, Both can installed together as they have different DLL version number, New plugin will has a slightly different icon.) New UI: If it is rendered on an active selection (in case of older version), the renders depends upon the shape of selection. Version 2.0 Download v1.3 Download v2.0
  8. Can you update the download location for the plugin. Its links are blocked in my country.
  9. Just for sake of history of reporting bugs I am quoting it here. boltbait's reply. I coded a fix for this. It will be in the next release of CodeLab. Basically, it will ignore any commented out lines. If you use the UIBuilder, when you click OK, those lines will be deleted.
  10. Yup, you were right. after changing its value now stripes start from Primary Color and end with Secondary Color. I was feeling something is miss because both side doesn't matching to primary and secondary color.
  11. @MadJik Thanks for your help, my code is done and it run and build successfully. ( You solved it. ) But I want the stripes left start from zero and right less This value makes the last right shade equal to secondary color, while first left shade not equal to primary color. g1 = (PrimaryColor.R *(n - i) + (i)*SecondaryColor.R)/n But I prefer that first left shade to be equal to primary color, (RHS can be different) so I had used this code. g1 = (PrimaryColor.R *(n - i) + (i -1)*SecondaryColor.R)/n That should I need to do to achieve that
  12. Hi @BoltBait @toe_head2001 , I am trying to write a plugin in codelab. When I run the code in Codelab, it works perfectly. but problem is When I try see see preview some error happens. And I am also not able to build dll. PFA below the my script and icon file for dll. The effect is not complete but work in progress. I will be happy If you can find out what went wrong and how to build dll. I need this effect for some important work. ( I need to draw stripes on canvas with any specified number.) // Name: Gradual Stripes // Submenu: Render // Author: Pratyush // Title: Gradual Stripes // Version: 1.0.0 // Desc: Draws stripes with gradual change in shades // Keywords: Stripes|Grayscale|Lines // URL: // Help: #region UICode IntSliderControl Amount1 = 9; // [0,64] Slider 1 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++) { int n = Amount1; int[] A = new int[n+1]; int i; /* initialize elements of array n */ A[0] = rect.Left; if (IsCancelRequested) return; for ( i = 1; i <= n; i++ ) { A[ i ] = (rect.Left*(n - i) + i*rect.Right)/n; for (int x = A[i-1]; x < A[i]; x++) { CurrentPixel = src[x,y]; //int p = PrimaryColor.R; int g1,g2,g3,g4; g1 = (PrimaryColor.R *(n - i) + (i -1)*SecondaryColor.R)/n; g2 = (PrimaryColor.G *(n - i) + (i -1)*SecondaryColor.G)/n; g3 = (PrimaryColor.B *(n - i) + (i -1)*SecondaryColor.B)/n; g4 = (PrimaryColor.A *(n - i) + (i -1)*SecondaryColor.A)/n; CurrentPixel.R = (byte)g1; CurrentPixel.G = (byte)g2; CurrentPixel.B = (byte)g3; CurrentPixel.A = (byte)g4; dst[x,y] = CurrentPixel; } } } } MyScript_2.cs
  13. Hi @chris100100 Please update to latest PDN version 4.0.21 . This defect of introduced in 4.0.20. Rick has just released the patch i.e. new version for PDN. The new version has been uploaded in Microsoft store .
  14. From here to here. How far codelab has come. May be someone can review it. EDIT: *May be someone can review Codelab as a tool
  15. @ReMake Thank you for making compilation. I was thinking to put together all of post related to presets, since you are listing them together, I can freely concentrate on making preset post.
  16. Once support period for windows 7 (i.e. 2020) is completed will we have some chance for new new blend mode in PDN. Since all of the person will have option to upgrade to v4.0.
  17. Good , that it reverts back to how it is in the code editor once preview is closed. It would be very annoying if set values changes in editor to anything arbitrary after running previews. But one can find it useful if there is an seperate option in file menu (or whichever menu indentation option is) to use functional UI to set or change value variable in Editor.
  18. Hey Bolt, does that mean we can change sliders (of UI) to change values in editor dynamically while working in codelab? EDIT: Once I reach home I will test that.
  19. @Seerose Thanks seeroje. I am happy if someone finds my attachment helpful.
  20. Can such object operations be defined, which let to change all of the channels together such these codes can to changed together as Instead of this CurrentPixel.R = PrimaryColor.R + 25; CurrentPixel.G = PrimaryColor.G + 25; CurrentPixel.B = PrimaryColor.B + 25; CurrentPixel.A = PrimaryColor.A + 25; we can simply use. CurrentPixel = PrimaryColor + 25;
  21. @Ishi That was work in progress, I have upload it now.
  22. If you have simple grayscale gradient in skyline and use these presets, you can have different type sky. Download
  23. @toe_head2001 Try again. I have changed the link.
×
×
  • Create New...