-
Posts
14,573 -
Joined
-
Last visited
-
Days Won
264
Content Type
Events
Profiles
Forums
Blogs
Gallery
Downloads
Posts posted by Ego Eram Reputo
-
-
You can't do it for all layers in one go. You need to do one layer, then repeat for the other layers. Like this:
- Use the Paneling plugin to move the contents of the first layer
- Activate the next layer
- Press F8 to repeat step 1 on the active layer.
- goto step 2 for as many layers as you need to move.
- 1
-
Also check out the status bar when the Clone Stamp is active
- 1
-
A couple of leads you might find valuable.....
https://forums.getpaint.net/topic/112561-change-color/?do=findComment&comment=543800
-
Some progress.......
// Name: Box Outlining GPU // Submenu: test // Author: // Title: // Version: // Desc: // Keywords: // URL: // Help: // For help writing a GPU Drawing plugin: https://boltbait.com/pdn/CodeLab/help/tutorial/drawing/ #region UICode IntSliderControl Amount2 = 35; // [15,100] Size IntSliderControl Amount3 = 9; // [2,25] Spacing #endregion protected override unsafe void OnDraw(IDeviceContext deviceContext) { deviceContext.DrawImage(Environment.SourceImage); // preserve background // find out where our selection is located RectInt32 selection = Environment.Selection.RenderBounds; // variables int boxSize = Amount2/2; int Spacing = Amount3+1; int doubleSpacing = Amount3*2; int thickness = 2; int rndHeight, rndWidth; int step = boxSize*7/10; // define your brush and stroke style ISolidColorBrush fillBrush = deviceContext.CreateSolidColorBrush(LinearColors.LightGray); ISolidColorBrush outlineBrush = deviceContext.CreateSolidColorBrush(LinearColors.Black); IStrokeStyle boxStrokeStyle = deviceContext.Factory.CreateStrokeStyle(StrokeStyleProperties.Default); // setup drawing mode deviceContext.AntialiasMode = AntialiasMode.Aliased; // or .PerPrimitive Random rnd = new Random(); for (int y = selection.Top; y < selection.Bottom; y += step) { for (int x = selection.Left; x < selection.Right; x += step) { //if source pixel is opaque ) rndWidth = rnd.Next(Spacing, doubleSpacing); rndHeight = rnd.Next(Spacing, doubleSpacing); deviceContext.FillRectangle(x-rndWidth, y-rndHeight, boxSize, boxSize, fillBrush); deviceContext.DrawRectangle(x-rndWidth, y-rndHeight, boxSize, boxSize, outlineBrush, thickness, boxStrokeStyle); } } }
I haven't figured out how to poll the source pixel yet, so I'm just filling selections at the moment. Still, I think looks great!
- 1
- 2
- 1
-
11 hours ago, fd2 said:
I want to call few plugins in a row.
Seen the latest API documentation? https://paintdotnet.github.io/apidocs/api/index.html
There are a great many effects you can access and chain together. For example, see https://paintdotnet.github.io/apidocs/api/PaintDotNet.Effects.Gpu.html
- 1
-
Hmmmm..... Windows Defender is warning me about that file ^^
-
21 hours ago, Tactilis said:
I think the OPDG uses a fixed set of box sizes
Hadn't considered that. I'll have a look and see if I can make six or seven boxes work.
16 hours ago, BoltBait said:Here is a classic script to help you determine when you are on the edge of a selection...
Nice! Thank you @BoltBait
14 hours ago, Red ochre said:Hope that helps... I've found it better to use 'using' statements to ensure graphics objects get disposed of.
Thanks Red.
12 hours ago, Rick Brewster said:FWIW, the classic effect system is getting deprecated, and soon -- I strongly encourage you to switch to BitmapEffect or GpuEffect (or probably [PropertyBased]GpuDrawingEffect in this case).
Quite right. I will change of course. The posted code was something from a year or so ago (I just had another play with it to remember where I got to).
- 1
-
I could use a little help on this one
I'm trying to recreate an outlining effect I saw on Watabou's one-page dungeon generator. I want to surround an object with little gray boxes something like this image.
I had a very rough stab at it. Basically my plan was to step through the image and test the transparency of the target pixel. If it was transparent, throw a little box around it. The code I wrote trying to hack this out was truly awful.
Spoiler/* ========================================================================== */ /* */ /* BoxOutline.cs */ /* (c) 2024 Ego Eram Reputo */ /* */ /* Description: surrounds a selection with shaded boxes */ /* */ /* ========================================================================== */ // Name: BoxOutline // Author: Ego Eram Reputo // Submenu: Render // URL: http://www.getpaint.net/redirect/plugins.html #region UICode IntSliderControl Amount2 = 25; // [15,100] Box Size ReseedButtonControl Amount1 = 0; // Reseed IntSliderControl Amount3 = 5; // [1,25] Spacing #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.SelectionBounds; int boxSize = Amount2/2; int Spacing = Amount3; int rndHeight, rndWidth, m,p; ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; Graphics g = new RenderArgs(dst).Graphics; g.Clip = new Region(rect); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; Pen outlinePen = new Pen(PrimaryColor, 2); SolidBrush solidBrush = new SolidBrush(Color.Beige); dst.CopySurface(src,rect.Location,rect); for (int y = selection.Top; y < selection.Bottom; y += boxSize+Spacing) { for (int x = selection.Left; x < selection.Right; x += boxSize+Spacing) { if (src[x,y].A >0 ) { rndHeight = RandomNumber.Next( boxSize/2.0 )+RandomNumber.Next(boxSize/2); rndWidth = RandomNumber.Next(boxSize/2)+RandomNumber.Next(boxSize/2); m=x-rndWidth-boxSize/2+1; if (m<0) {m=0;} p=y-rndHeight-boxSize/2+4; if (p<0) {p=0;} g.FillRectangle(solidBrush, m-rndWidth, p-rndHeight, boxSize*2+rndWidth, boxSize*2+rndHeight); g.DrawRectangle(outlinePen, m-rndWidth, p-rndHeight, boxSize*2+rndWidth, boxSize*2+rndHeight); } } } }
Results were ......promising!? (at least it was working right 😁)
Does anyone want to help me write something a little more elegant?
- 2
-
On 3/17/2024 at 12:57 AM, xod said:
Since I have no intention of redoing it, I think it would be best to delete this post. Anyway, it's not a big loss for the pdn community.
I disagree. I think this plugin is too good to lose.
If you're willing to release the source code I'm sure someone will recompile and publish it.
- 1
-
The easiest way to duplicate a Shape is this:
- Draw your Shape on a blank layer
- Duplicate the layer
It's one extra click for each duplication.
-
Thanks @Tactilis.
I can't see Bayer as an option in AdvDith.
Simulate Color Depth does have Bayer Ordered 8x8. Beware this plugin crashes if you attempt to use the Stucki dithering method.
-
@xod - I've just added this to the plugin index in the April 2024 update. I've belatedly realized it is still pending the rewrite Rick suggested. Are you intending to re-release it soon?
-
April Update
One new plugin this month:
Warp text along a path xod Writes text along a user-specified path. The plugin uses the SkiaSharp library, so you need to put all three files from the ZIP file into the Effects folder.
*please note* this plugin is currently undergoing revision/rerwrite to make it conform to standards.
There is also the inclusion of an older plugin - which had been missed (thanks @toe_head2001) Alpha Mask (aka Apply Alpha Mask) from @BoltBait's Plugin Pack.
- 1
- 1
-
I tried to find a Bayer dither, but couldn't locate one.
-
^^ Confirmed. Crash seems to be related to setting the Dither Method to Stucki.
Error message:
SpoilerFile: C:\Program Files\paint.net\Effects\SimulateColorDepth.dll
Name: SimulateColorDepthEffect.SimulateColorDepthEffectPlugin
Version: 1.0.4211.27729
Author: Cookies
Copyright: Copyright © Cookies
Website: http://cookies.dcsrvdls.com/
Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception
---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at SimulateColorDepthEffect.ErrorDiffusionSimple.ProcessDither(Surface src, Surface dst, PdnRegion reg, Rectangle rect, Int32 BitDepth)
at SimulateColorDepthEffect.SimulateColorDepthEffectPlugin.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)
at PaintDotNet.Effects.Effect.ClassicEffectRenderer.Render(ReadOnlySpan`1 renderRects) in D:\src\pdn\src_5_0_x\Effects.Core\Effects\Effect.cs:line 616
at PaintDotNet.Effects.ClassicEffectDriver.OnRendererRender(IClassicEffectRenderer renderer, ILockedBitmap`1 dstBitmap, ReadOnlySpan`1 renderRects) in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\ClassicEffectDriver.cs:line 95
at PaintDotNet.Effects.EffectDriver`1.RenderWithClipMask(PooledNativeList`1 rois, Result`1 lazyClipMaskRenderer) in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\EffectDriver`1.cs:line 346
at PaintDotNet.Effects.EffectDriver`1.RendererContext.RenderTile(Int32 tileIndex) in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\EffectDriver`1.cs:line 254
at PaintDotNet.Effects.EffectDriver`1.RendererContext.RenderNextTile() in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\EffectDriver`1.cs:line 249
at PaintDotNet.Effects.EffectDriver`1.<>c__DisplayClass51_0.<ThreadFunction>b__0() in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\EffectDriver`1.cs:line 384
--- End of inner exception stack trace ---
at PaintDotNet.Effects.EffectDriver`1.DrainExceptions() in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\EffectDriver`1.cs:line 538
at PaintDotNet.Effects.EffectDriver`1.Abort() in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\EffectDriver`1.cs:line 494
at PaintDotNet.Effects.EffectDriver`1.Start(EffectConfigToken effectToken) in D:\src\pdn\src_5_0_x\PaintDotNet\Effects\EffectDriver`1.cs:line 437
at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass47_3.<RunEffectImpl>b__6() in D:\src\pdn\src_5_0_x\PaintDotNet\Menus\EffectMenuBase.cs:line 1003Diagnostics:
Application paint.net 5.0.13 (Stable 5.13.8830.42291)
Build Date Tuesday, 5 March 2024
Install type ClassicLanguage: en-US
DPI 1 (1.00x scale)
UI/Canvas GPU True
Rendering GPU 🚀 Performance (NVIDIA GeForce GTX 1060 6GB)
Remote session False
Animations True
Translucent windows True
Windows Ink TrueOS Windows 10 Home x64 (10.0.19045.0)
Runtime .NET 7.0.16 x64Physical Memory 24,416 MB (15,363 MB free)
Paging File 28,000 MB (15,598 MB free)CPU Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
Speed ~3193 MHz
Cores / Threads 4 / 4
Features SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2Monitor 1
Resolution 1920 x 1080, 60 Hz
DPI 96 (1.00x scale)
Coordinates (L=0, T=0, R=1920, B=1080)
Bit depth 8
Color space RgbFullGamma22NoneP709
Connected to NVIDIA GeForce GTX 1060 6GBMonitor 2
Resolution 1920 x 1080, 60 Hz
DPI 96 (1.00x scale)
Coordinates (L=1920, T=115, R=3840, B=1195)
Bit depth 8
Color space RgbFullGamma22NoneP709
Connected to Intel(R) HD Graphics 4600Video Card NVIDIA GeForce GTX 1060 6GB
Hardware Acceleration Supported
Dedicated Video RAM 6,052 MB
Dedicated System RAM 0 MB
Shared System RAM 12,208 MB
Driver Version 27.21.14.5751
Vendor ID 0x10DE
Device ID 0x1C03
Subsystem ID 0x32831462
Revision 161
LUID 0x0000A1C5
Flags AcgCompatible, SupportMonitoredFences, KeyedMutexConformance
Graphics Preemption PixelBoundary
Compute Preemption DispatchBoundary
Outputs 1
Feature Level Level_12_1
Features Doubles, ComputeShadersEtc
DXGI Formats A8_UNorm, B8G8R8A8_UNorm, R16G16B16A16_UNorm, R16G16B16A16_Float, R32G32B32A32_Float
Buffer Precisions UInt8Normalized, UInt8NormalizedSrgb, UInt16Normalized, Float16, Float32
Maximum Bitmap Size 16384Video Card Intel(R) HD Graphics 4600
Hardware Acceleration Supported
Dedicated Video RAM 112 MB
Dedicated System RAM 0 MB
Shared System RAM 2,048 MB
Driver Version 20.19.15.4835
Vendor ID 0x8086
Device ID 0x0412
Subsystem ID 0x85341043
Revision 6
LUID 0x0000ADEE
Flags SupportMonitoredFences, KeyedMutexConformance
Graphics Preemption PrimitiveBoundary
Compute Preemption ThreadGroupBoundary
Outputs 1
Feature Level Level_11_1
Features Doubles, ComputeShadersEtc
DXGI Formats A8_UNorm, B8G8R8A8_UNorm, R16G16B16A16_UNorm, R16G16B16A16_Float, R32G32B32A32_Float
Buffer Precisions UInt8Normalized, UInt8NormalizedSrgb, UInt16Normalized, Float16, Float32
Maximum Bitmap Size 16384Video Card Microsoft Basic Render Driver
Hardware Acceleration N/A
Dedicated Video RAM 0 MB
Dedicated System RAM 0 MB
Shared System RAM 12,208 MB
Driver Version 10.0.19041.3636
Vendor ID 0x1414
Device ID 0x008C
Subsystem ID 0x00000000
Revision 0
LUID 0x0000AD9C
Flags Software, AcgCompatible, SupportMonitoredFences, KeyedMutexConformance
Graphics Preemption InstructionBoundary
Compute Preemption InstructionBoundary
Outputs 0
Feature Level Level_12_1
Features Doubles, ComputeShadersEtc
DXGI Formats A8_UNorm, B8G8R8A8_UNorm, R16G16B16A16_UNorm, R16G16B16A16_Float, R32G32B32A32_Float
Buffer Precisions UInt8Normalized, UInt8NormalizedSrgb, UInt16Normalized, Float16, Float32
Maximum Bitmap Size 8388608 -
^this.
Make the selection & hit the M key twice to enter "modify-the-selection-mode". Click & drag the nubs and/or rotate the selection border the until you have the perfect alignment of the selection rectangle. Press M once more to revert to normal "Move" mode so you can drag/rotate/resize the image region.
Or, if you want to modify the selection border on the fly.....
Hold down the second mouse button (in addition to the first)! The selection border can be dragged around as you are making the selection. In this mode, the keyboard arrow keys move the selection border by one pixel (or 10 pixels if the CTRL key is also held down) for pixel-perfect placement.
-
-
If you have a library of components as images, TileWorld might be useful.
- 1
-
We try to make it as easy as possible. As @toe_head2001 and @Pixey have explained, you can change the language in the Paint.net settings.
The paint.net documentation can also be translated:
-
Have you considered installing the MS Store version? Updates magically happen in the background.
-
16 minutes ago, Steelking22 said:
.I would find the ability to draw an "Eraser LIne" (straight or curved) VERY useful. Draw the line with the line drawing tool, then click on the eraser,
Workaround:
- Draw your line on a new blank layer.
- Activate the Magic Wand tool 🪄
- Click on the transparent area (not the line) to select everything except the line
- Invert the selection with Ctrl + I
- Activate the layer you want the line removed from
- Press the Delete key
- Hide or delete the layer you drew the line on.
16 minutes ago, Steelking22 said:2. Is Paint.net capable of this type of Text Formation?
Yes, try this brand new plugin by @xod:
-
Google Translate:
QuoteGood morning. Is it possible to reduce the size of a photo, while retaining the number of pixels and the entire photo? In other words, is it possible to reduce the size of a photo while retaining all its quality? I would be happy to have an answer on this. Thank you and good luck to you.
Reducing the image size reduces the number of pixels.
- If you want to print the photo at a smaller size, try increasing the DPI (Dots Per Inch) setting in the printing dialog.
- If you want the file size to be smaller, choose Save As and specify the JPG extension, then lower the quality setting. Specify a different file name so you don't overwrite the original image.
-
11 hours ago, Tankertonian said:
Sorry didn't make it clear. I uninstalled paint.net properly via Control Panel. I later found some residual files, which I removed.
There may still be files lurking around. Do try the link that @Tactilis suggested:
12 hours ago, Tactilis said:Try using this utility to fully remove the broken installation:
-
7 hours ago, Tactilis said:
Nice lateral thinking to block your colors together so they provide a larger target for the mouse pointer.Agreed! ⭐
BoltBait's Text Fun Factory v2.1 - Updated January 5, 2024
in Plugins - Publishing ONLY!
Posted
Not unless the new version of PDN requires it. Plugin breaking changes do occur, but rarely.