It’s been a little over 9 months since I left Facebook, and since then I’ve been hard at work on Paint.NET. (There were two primary reasons for me leaving Facebook: 1) it was way too exhausting, which is also part of the reason I haven’t been blogging much for several years, and 2) I really just wanted to focus on Paint.NET for awhile.)

2018

Looking back on 2018, a lot was accomplished! In the 4.0.20 update back in January I shipped a dark theme, which I originally didn’t see the point of but now I can’t imagine the app without it. After that there was mostly radio silence until I released 4.1 in September. That update had quite a lot of infrastructure changes in it, both in the low-level bowels of my COM interop system (long story…), and in the addition of GPU-powered effects (which was powered using Direct2D, which was dependent on the aforementioned COM stuff). Since then, the 4.1.1 through 4.1.5 updates have focused on fixing a bunch of bugs that have popped up (which has been frustrating), and improving performance (notably for effect loading at startup, and canvas rendering when zoomed out).

2019

What’s next though? Well, I’ll start by quoting a recent article over at HostingAdvice that I did a small interview for:

After 10 years of working at Microsoft and several years at Facebook, Rick decided to focus exclusively on Paint.NET this year. “That means I’ve gone from having 20% of my time available to about 80%,” he said.

“I’m going to be spending a lot of time preparing infrastructure for the next big wave of features going into Paint.NET.”

To that end, Rick hopes to enhance the user interface with more attractive icons, allow users to install custom brushes, and introduce pen and pressure sensitivity for tablets.

With that, let’s start talking directly about what I’m planning and hoping to release in 2019:

App Icons and High-DPI

Paint.NET’s UI is quite functional for high DPI systems without any of the layout problems or truncated text elements that have plagued Windows apps since, well, forever. However, that’s no longer good enough in 2019. For starters, the app icons are all authored for 96 DPI (aka “100% scaling”), and look blurry at higher DPI settings. Upgrading all of that is a project I’ve just started working on, and is what the aforementioned article refers to as “more attractive icons.”

Beyond that, newer versions of Windows support dynamic scaling (changing the scaling without logging out and then in again), and per-monitor DPI. Right now if you change the system DPI while Paint.NET is open, it won’t look very good. Similarly if you move the app over to a monitor with a different DPI setting. This also affects use of Remote Desktop where the remote system’s DPI is different, and use of laptop docking stations when the external monitor’s DPI is different. These all make using Paint.NET in modern scenarios rather clumsy and frustrating. For instance: when I use my laptop with a 4K screen to remote into my desktop with a 2K screen, it sucks that I have to restart Paint.NET so it doesn’t look blurry.

Windows gets a bad rep for having bad high-DPI scaling, and part of the responsibility for fixing that reputation lies with application developers like me. Refreshing the app icons is the next thing I’ll be working on, and then I’ll upgrade the infrastructure for dynamic DPI (probably over the course of several updates). Thankfully these projects seem to be the “final frontier” for High DPI: once they’re done we can finally bury the hatchet on High DPI bugs.

.NET Core 3.0

Richard Lander’s post earlier in the year about .NET Core 3.0 shipping with WinForms and WPF really made my day. The more recent announcement that both WinForms and WPF would be open sourced has fulfilled a long-time dream of mine. I can’t wait to fork the ToolStrip classes and migrate them off of GDI+ 🙂 (this should be a good performance win)

It’s clear that, in the long-term, Paint.NET needs to migrate over to .NET Core. That’s where all of the improvements and bug fixes are being made, and it’s obvious that the .NET Framework is now in maintenance mode. On the engineering side this is mostly a packaging and deployment puzzle of balancing download size amongst several other variables. My initial estimations shows that the download size for Paint.NET could balloon from ~7.5MB (today) to north of 40MB if .NET Core is packaged “locally”. That’s a big sticker shock … but it may just be necessary.

And, for those who’re interested: the move to .NET Core will finally enable a truly portable version of Paint.NET since .NET Core can just be bundled into the local app directory. I’ve been slowly moving towards “app local deployment” of dependencies anyway; e.g. for the v4.1 release I got fed up with the Visual C++ runtime’s installation issues and moved them to be “app local”. The security arguments no longer convince me that it’s worth the massive hassles for both myself and end-users. The straw that broke the camel’s back (so to speak) on this was when the Surface Go shipped with an incorrectly signed version of the Visual C++ runtimes which then prevented Paint.NET from loading at all (remember: the Surface Go runs Windows 10 “S” by default and can only run Store apps).

Improved DDS support

The DDS support in Paint.NET works well, but hasn’t been updated to the newer DDS formats that have become more popular. Nicholas Hayes, aka “null54” on the forum, has written a plugin that provides better DDS support (forum link, and github link). This is a no-brainer for integration into Paint.NET so that everyone can benefit from these improvements (and without having to rename files to have a .dds2 extension, yuck!). Paint.NET is used a lot in the gaming biz, so this should help out a large audience of developers in this arena.

Brushes and Pressure Sensitivity

This is the big one. I’ve been wanting to get to this for years, and it’s finally time to get it done. The first thing to happen is that Paint.NET needs an improved selection of built-in brush stamps (currently only “circle” is implemented). Second, custom brushes need to be supported without the use of a plugin. This will bring brushes up to the same level that Shapes is now at. Third, pen and pressure sensitivity is desperately needed and long overdue. I’ll be posting more details when this project starts taking shape, and I’m hoping to start on it this summer.

(Keep in mind, however, that pressure sensitivity will require at least Windows 8 or maybe 10: the APIs for this do not exist on Windows 7.)

Expanded Plugin System(s)

I really wanted to ship 4.1.2 with GPU support for effect plugins. However, a high-priority security vulnerability forced me to shelve that at the last minute. Now that I’ve had more time to think about this, I’d like to revamp the effect plugin system further — it hasn’t seen much love in the last decade. Providing access to GPU acceleration and Direct2D is an obvious next step, but I also have an opportunity to clean things up in this area. Effects can’t easily combine (or compose) with other effects, and this makes it really hard to do arbitrarily complex things with them. It’s also difficult to add new functionality to the effect system without accidentally breaking other parts of it.

In addition, it’s been way overdue for Paint.NET to support more plugin types beyond effects and file types. Plugins should be able to access more than the current layer, and even be able to implement whole-image transforms, or to create a new image (whether from scratch or based on another image that’s already open). You can’t even write a rescaling plugin for Paint.NET right now! I don’t have concrete plans for specifically what I’ll be adding here, or when, but it’s high up on the priority list. And in the long term, I would still like to add support for tool plugins (something of a holy grail).

Until next time …

This roadmap for 2019 is ambitious, but I think I should finally have enough time to actually realize most of it. Hopefully I’ll be able to blog more in the coming year now that I’ve got more time and energy for it.

Paint.NET is only going to get better as time goes on, and I’d really like to thank everyone for all of their support in making this transition to full-time self-employment possible for me. Thanks for the donations, thanks for buying the Windows Store app, thanks for the crash reports, thanks for the feature requests, and thanks for all of the fish!

Advertisements

This update focuses on improving performance — sometimes significantly! — and fixing a handful of really important bugs. Special thanks go out to @Bruce Bowyer-Smyth for his contributions in this release.

If you’re using the Windows Store release, you should get the update automatically within the next 24 hours. You can also force an update check by following these instructions.

For the Classic release, you should be offered the update automatically within the next week or so. You can get the updater soon by going to ⚙ Settings → Updates → Check Now. You can also download and install it directly from the website.

  • Improved: Image -> Rotate should now complete almost instantly (thanks @Bruce Bowyer-Smyth!)
  • Improved: Optimized a portion of the rendering engine for newer CPU instruction sets (SSE2, SSSE3, AVX2). Depending on zoom level, CPU type, and other factors, rendering throughput has been improved by 10-50%.
  • Improved: Some performance optimizations for code that uses the indexers on the Surface class, which should improve effect plugin performance (thanks @Bruce Bowyer-Smyth!)
  • Fixed: Shortcut keys for the Adjustments menu weren’t working until after you opened the menu for the first time
  • Fixed: Canvas checkerboard, used to indicate transparent regions of the image, now scales with DPI
  • Fixed some of the more rare cases of the SEHException/AccessViolationException crash caused by Direct2D
  • Fixed: A bug in IndirectUI was resulting in a crash when using @BoltBait‘s Level Horizon plugin
  • Fixed: Per-user fonts no longer cause a crash for the Store version
  • New: The paintdotnet: protocol now works for the Classic version
  • Fixed: The paintdotnet: protocol should now work properly with paths that have spaces in them
  • Fixed: Hardened security for loading Custom Shape plugins via XAML (thanks @Bruce Bowyer-Smyth!)

Enjoy! 🙂

One weird trick …

If you’re writing a custom effect for Direct2D, which involves implementing the ID2D1EffectImpl interface, you may run into a chicken-and-egg problem if you’re trying to use another custom effect that isn’t yet registered with the Direct2D factory.

Direct2D is set up very carefully to prevent the custom effect from getting access to things like the ID2D1DeviceContext. Unfortunately, you also don’t get access to the ID2D1Factory1, and this creates a brick wall that blocks you from registering effects just-in-time (versus ahead-of-time).

When Direct2D calls your ID2D1EffectImpl::Initialize() method, it’ll provide you with an ID2D1EffectContext and an ID2D1TransformGraph. The ID2D1EffectContext::CreateEffect() method allows you to instantiate another effect, which you can then use in a call to ID2D1EffectContext::CreateTransformNodeFromEffect() to create an ID2D1TransformNode that you can place into your transform graph.

However, there are no registration methods on ID2D1EffectContext like you see on ID2D1Factory1. This means that you have to register your effects up-front, probably in the custom effect’s static Register method (which is the pattern used in the Direct2D documentation).

Notably, this requires that your custom effect has what amounts to a dependency manifest in its Register method whereby it calls all of the Register methods for the custom effects that it needs to utilize later. This can be seen as a violation of the DRY (“Don’t Repeat Yourself") principle, and can be a source of subtle bugs and frustrating debugging if it gets out of date.

However, you can still implement a proper deferred registration mechanism. Here’s how I do it in Paint.NET, although I won’t show the actual code because it’s in C# with lots of my own custom things that won’t make sense out-of-context:

Step 1: Implement your custom effect all the way up through ID2D1EffectImpl::Initialize(). Note that this method receives an ID2D1EffectContext and an ID2D1TransformGraph.

At this point you’ll be wanting to use ID2D1EffectContext::CreateEffect(), followed by ID2D1EffectContext::CreateTransformNodeFromEffect(), and then an appropriate method on the ID2D1TransformGraph to add the effect’s transform node into your transform graph.

Step 2: If ID2D1EffectContext::CreateEffect() returns an error, then either the effect can’t be created or it hasn’t yet been registered. If it didn’t return an error, then go about your business normally. Otherwise, proceed to step 3.

NOTE: Direct2D is supposed to return D2DERR_EFFECT_IS_NOT_REGISTERED (0x88990028), but it doesn’t. It’ll actually return HRESULT_FROM_WIN32(ERROR_NOT_FOUND), which is 0x80070490. I check for both, just in case Microsoft decides to fix its code.

Step 3: At this point you’re normally SOL, as we need to register the other custom effect we want to use, but we don’t have an ID2D1Factory1 to call a RegisterEffect method on.

So, step 3 is to actually create an effect that does exist using ID2D1EffectContext::CreateEffect(). I use CLSID_D2D1Flood, as it’s a very simple effect and probably cheap. We won’t be using the effect for its intended purpose – it’s a tool to get what we really want.

Step 4: Now that you have an ID2D1Effect, we’re still not quite where we want to be because it doesn’t implement ID2D1Resource which has the GetFactory() method that we need to get the ID2D1Factory that has the RegisterEffect methods we need. If only there were a way …

But we’re not stuck yet! Either call ID2D1Effect::GetOutput() to get the effect’s ID2D1Image, or use QueryInterface to retrieve a pointer to the ID2D1Image interface. The documentation for GetOutput establishes these as equivalent, btw.

Step 5: Now you can call ID2D1Resource::GetFactory() on the effect’s ID2D1Image pointer, and then do the obvious thing … (e.g. QI for ID2D1Factory1, then use that for registering the other effect). I like to call ID2D1Factory1::GetEffectProperties() first to try and distinguish between the effect not being registered versus the effect’s initialization returning an error. If the effect is already registered then just bail and return a failure HRESULT instead of trying to forge ahead with re-registering the effect.

Step 6: Don’t forget to release all of the temporary objects.

An important thing here is that effect registration works correctly when called from within the initialization of another effect. Hopefully it stays that way!

Anyway, this was one weird trick I found that enabled a lot of my code to be simpler. It’s still better if you can find a different way to provide access to the ID2D1Factory1 for your custom effect, but this is a good fallback technique.

In an upcoming update, Paint.NET will be opening the doors for effect plugins to use Direct2D, to implement custom Direct2D effects, to chain these effects together, and to not have to worry about up-front registration of custom effect dependencies. Stay tuned!

This is a small update that fixes some important bugs and substantially improves plugin loading performance. Sorry for the random crashes — it was actually a bug in Direct2D (a Windows component), and it took about a week to fully debug.

If you’re using the Windows Store release, you should get the update automatically within the next 24 hours. You can also force an update check by following these instructions.

For the Classic release, you should be offered the update automatically within the next week or so. You can get the updater sooner by going to ⚙ Settings → Updates → Check Now. You can also download and install it directly from the website.

Changes in this update:

  • Improved: Massive startup performance improvement when lots of effect plugins are installed
  • Fixed a crash that would happen when closing an image, exiting the app, or sometimes just at random. This was happening due to a bug in Direct2D where ID2D1EffectContext does not honor the multithreaded initialization flag from its ID2D1Factory, and was thus corrupting its own internal data structures when released on the finalizer thread.
  • Fixed: DirectX 9 GPUs can now utilize hardware acceleration again (in 4.1.3 they were forced to use software rendering)
  • Fixed: The Black & White and Invert Colors adjustments no longer display an OK/Cancel dialog

Enjoy! 🙂

This is a hotfix for 4.1.2 that fixes the crash that people were seeing on old DirectX 9 era GPUs like the NVIDIA GeForce 7000 series (not to be confused with the much newer GeForce 700 series). This release will fall back to software rendering for affected GPUs, although I’m hoping to reinstate hardware acceleration in the next update.

As a reminder, 4.1.2 (and 4.1.3 of course) addresses two security vulnerabilities. As such, administrators who managed deployments of Paint.NET are urged to begin the update process immediately. Everyone else is also urged to update as soon as possible, of course.

If you’re using the Windows Store release, you should get the update automatically within the next 24 hours. You can also force an update check by following these instructions.

For the Classic release, you can use the built-in updater by going to ⚙ Settings → Updates → Check Now. You can also download and install it directly from the website.

Change log:

  • Fixed a crash when zooming due to missing pixel shader support on DX9 class GPUs (NVIDIA nForce, GeForce 7000 series, Matrox M9140, etc.)

Enjoy!

I’ve been getting crash reports from folks who have old GPUs that don’t support DirectX 10. As it turns out, the pixel shader I implemented to solve this issue:

… is causing issues on DirectX 9-era hardware such as the GeForce 6000 and 7000 series, NVIDIA nForce, and the Matrox M9140. I even got a crash report from someone with an SiS Mirage (?!). Talk about a trip through memory lane …

If you have 4.1.2 installed and are not experiencing a crash when zooming in or out, then you have nothing to worry about.

If you have 4.1.2 installed and are experience a crash, then go into Settings and un-check “Enable Hardware Acceleration (GPU)”.

You can still download 4.1.2 from the website, but the built-in updater will not offer it to you. In fact, it’ll give a 404 error if you try to manually check. I decided I’d rather have 404’s than app crashes for the time being.

I’ll be rolling out a 4.1.3 update just as soon as I can find something like a GeForce 7000-series to test with … there has to be a PC recycling store somewhere in the bay area with a box full of them, right? Smile (I ordered some cards off of eBay but I’d really like to get this solved today)

Thanks for your patience!

NOTE: The deployment of this update has been paused due to an issue with pre-DirectX 10 GPUs (e.g. GeForce 6000 and 7000 series). A new update will be issued very soon! You can still download 4.1.2 from the website, but the built-in updater will not offer it to you.

This is a small update that improves startup performance, fixes some bugs, and addresses two security vulnerabilities. Administrators who manage deployments of Paint.NET are urged to begin updating immediately. Details of CVE-2018-18446 and CVE-2018-18447 are pending publication.

If you’re using the Windows Store release, you should get the update automatically within the next 24 hours. You can also force an update check by following these instructions.

For the Classic release, you can use the built-in updater by going to ⚙ Settings → Updates → Check Now. You can also download and install it directly from the website.

Changes:

  • Improved startup performance if “a lot” of effect plugins are installed. More optimizations are coming in the next update.
  • Fixed: Pixel grid no longer draws some dots darker than others at some zoom levels, as reported at https://forums.getpaint.net/topic/112794-pixel-grid-rendering-problems-when-zooming/
  • Fixed: Radial Blur was not handling alpha correctly
  • Fixed: IndirectUI ColorWheel swatch is now rendered correctly (without the fading alpha gradient)
  • Fixed: The tooltip describing the shortcut key for tools now indicates how many times to press the key (e.g., press S four times for Magic Wand selection)
  • Fixed: Pressing Escape to deselect now works with all tools (this bug was introduced in v4.0)
  • Fixed: Images with variable alpha were not displaying correctly at some zoom levels. They were “too dark” in translucent regions. Reported here: https://forums.getpaint.net/topic/112184-some-zoom-levels-display-alpha-as-extra-opaque/
  • Fixed: For the Store release, launching with the paintdotnet: protocol no longer shows an error if no parameters are provided (thanks @Bruce Bowyer-Smyth!)
  • Fixed a crash for some effects that were rendering too quickly
  • Fixed a bug in the Image->Resize dialog where the asterisk and the note about which resampling mode was being used, e.g. “* Bicubic will be used,” weren’t going away or updating correctly
  • New: Added a /set:SETTING=VALUE command-line parameter. This is specifically useful for disabling hardware acceleration if the app won’t start or you can’t reach the Settings dialog. This is also necessary for the Store release whose virtualized registry cannot be edited. To launch the Store version with hardware acceleration disabled, go to Start -> Run and type in “paintdotnet:/set:UI/EnableHardwareAcceleration=false” (without quotes) and press OK
  • New: Added detection for when “Diebold Warsaw” is causing Paint.NET to crash. The error message will indicate this cause.
  • Fixed: Addressed CVE-2018-18446. Credit goes to Bruce Bowyer-Smyth.
  • Fixed: Addressed CVE-2018-18447. Credit goes to Soroush Dalili from NCC Group.

Enjoy! 🙂

This is a hotfix for version 4.1 that fixes a few small bugs, reinstates some keyboard shortcuts, and adds 2 new languages.

If you’re using the Windows Store release, you should get the update automatically within the next few days.

For the Classic release, you can use the built-in updater by going to ⚙ Settings → Updates → Check Now. You can also download it directly from the website.

Thanks to @toe_head2001, @ReMake, and @Dandelion Sprout for helping out on this release!

Changes:

  • New: Ukranian translation (thanks @ReMake!)
  • New: Norwegian translation (thanks @Dandelion Sprout!)
  • Fixed a bug in the IndirectUI color wheel control where it wouldn’t pick up the correct value for the alpha slider
  • Fixed a crash with the new Shapes that would sometimes occur because the resources file wasn’t updated yet (probably due to a "you have to reboot" dialog at the end of updating that was ignored)
  • Reinstated the shortcut keys for the Adjustments menu, as this was a very unpopular change
  • Improved: IndirectUI angle chooser control now supports the UpDownIncrement property (thanks @toe_head2001!)

Enjoy!

This update converts some effects to use the GPU for rendering, resulting in huge performance gains. Copy/Paste can now be performed on selections, Bicubic resampling is now available for the Move Selected Pixels tool, and there are lots of little quality-of-life improvements and general bug fixes.

If you’re using the Windows Store release, you should get the update automatically within the next few days.

For the Classic release, you can use the built-in updater by going to ⚙ Settings → Updates → Check Now. You can also download it directly from the website.

Thanks to @BoltBait and @toe_head2001 for their contributions in this release!

Here’s a quick overview of some of the bigger changes:

  • GPU-powered Effects! Some of the effects have been rewritten to use Direct2D’s image processing system, and the results are phenomenal for performance. Gaussian Blur is actually fast now and no longer takes ages to complete for large images or radii, and the same goes for both Motion Blur and Radial Blur (although Radial Blur does currently need a pretty powerful GPU). A few other effects were converted for the sake of completeness and for my own learning, and there are two new ones (Morphology and Turbulence). This is where most of my time (the aforementioned "last 7 months") and sweat was spent: getting a GPU-based effect rendering system up and running end-to-end was no small feat! Expect to see more effects converted over to the GPU in subsequent updates as this tech matures. I am also planning to make the GPU available for plugins to use in a future update.
    image.png
  • Copy/Paste for Selections. You can now copy the active selection to the clipboard, as well as paste from the clipboard to the active selection (all selection combine modes are supported). This copies only the selection, not the pixels that are within the selection. You can then apply the selection to another layer or image, or just save it for later. Because the selection is copied to the clipboard as JSON text, you can use external utilities to maintain them or even do processing on them (you aren’t limited to Paint.NET’s built-in selection operations, in other words). For example: if you want to save and reuse 5 selections, just open up 5 copies of Notepad and use them as a storage buffer. You can also use Paste Selection when a regular image is on the clipboard: if the image is from Paint.NET, the embedded selection will be used, otherwise the image’s size will be converted to a selection (a rectangle anchored to x=0,y=0 with the same width and height as the image). More formal documentation for the data format will be available soon.
    image.png
  • Bicubic resampling for the Move Selected Pixels tool. This can produce much higher quality results than Bilinear resampling. It is very CPU-intensive, so a fast CPU with 6+ cores is highly recommended if you plan to use it a lot. The default is still Bilinear, so if you’d prefer to always use Bicubic you can change it from Settings -> Tools.
    image.png
  • New +/- buttons for Tolerance and Hardness. This is a great quality-of-life improvement, especially for the Magic Wand when you’re trying to find just the right value for Tolerance.
    image.png

Full change log:

    • Improved: Gaussian Blur, Motion Blur, and Radial Blur now render using the GPU and are significantly faster
    • Changed: The following effects are now rendered using the GPU: Edge Detect, Pixelate, and Relief
    • Changed: The following adjustments are now rendered using the GPU: Black & White, Invert Colors
    • New Effect: Distort -> Morphology (uses the GPU)
    • New Effect: Render -> Turbulence (uses the GPU)
    • New: Bicubic resampling is now supported for the Move Selected Pixels tool. A CPU with 6 or more cores is highly recommended if you want to make it the default mode from within Settings -> Tools.
    • New: Edit -> Copy Selection. This will copy the current selection’s geometry to the clipboard as JSON text.
    • New: Edit -> Paste Selection. This will apply the selection from the clipboard to the current selection. All 5 selection combine modes are supported.
    • Changed: The Text tool now uses Points for font size measurement. You can also elect to use the old font size metric, "Fixed (96 DPI)" via the dropdown to the right of the font size.
    • Fixed: The Text tool’s recentering algorithm when typing reaches the edge of the viewport should be better
    • New: Added +/- buttons to the Tolerance and Hardness sliders.
    • Changed: Increased max zoom level to 6400%
    • New: The mouse wheel may now be used to scroll a long menu, such as when a lot of effects are installed (thanks @toe_head2001!)
    • Changed: For Windows 7 SP1 users, the Platform Update from 2013 is now required (it contains Direct2D v1.1)
    • Fixed: The "Finish" button wasn’t working if it was in an overflow container (thanks @toe_head2001!)
    • Fixed: Opening certain large images and then zooming with the mouse wheel would sometimes result in the scroll position being completely wrong
    • Changed: Hiding a layer no longer auto-selects the nearest visible layer. You can re-enable this in Settings, although this setting may be removed in a future version.
    • New: For the Windows Store release, the paintdotnet: protocol can now be used to launch the app so that you can specify command-line parameters. For example, you can go to Start -> Run and type in paintdotnet:"path to file1.png" path_to_file_2.png then both images will be opened (even if Paint.NET is already open)
    • New: Added Heptagon (7-sided polygon) and Octagon (8-sided polygon) shapes
    • Fixed the high-DPI inset-text scaling for the Shape selector (e.g. Pentagon with an inset "5")
    • New: Palettes are now also loaded from Documents/paint.net App Files/Palettes. This folder name is not localized so that installation scripts may easily make use of it
    • Fixed: View -> Pixel Grid will now correctly adjust to dynamic changes in the theme (light vs. dark)
    • Fixed: The background color for the Tolerance slider has been corrected for non-dark themes
    • Changed: Removed shortcut keys for all built-in Adjustments except for Invert Colors (Ctrl+Shift+I). This is being done to free up shortcut keys for other functionality.
    • New: Added a shortcut key to trigger a full .NET garbage collection: Ctrl+Alt+Shift+` (tick/tilde). This should only ever be needed for troubleshooting purposes.
    • New: Battery Saver Mode in Windows 10 is now respected, whether enabled manually or due to low battery. UI animations will be disabled.
    • New: Long file paths (>MAX_PATH) are now supported on Windows 10, as long as the group policy setting is enabled ("Enable Win32 long paths")
    • New for plugin developers: The IndirectUI Color Wheel control now supports an alpha slider. To use this, set the range (min/max values) of the Int32PropertyControl to [Int32.MinValue, Int32.MaxValue] (thanks @BoltBait!)
    • New for plugin developers: there is a new FileChooser property control type for string properties (thanks @toe_head2001!)
    • New for plugin developers: there is a new BinaryPixelOp.Apply(Surface, Surface, Surface, Rectangle) method overload (thanks @BoltBait!)
    • Changed: The IndirectUI text control now has a vertical scroll bar when multiline mode is enabled (thanks @toe_head2001!)
    • Changed: Visual C++ and OpenMP runtimes are now only loaded from the "app local" copy (never from the system directory). This fixes a number of headaches, and also works around a compatibility issue with the Surface Go
    • Fixed: Crash when drag-and-dropping images onto Paint.NET when a tool was active but with uncommitted changes
    • Fixed a very old and nasty crash, "InvalidOperationException: ScratchSurface already borrowed"

Enjoy!

For more discussion and for the direct download link, head on over to the forum: https://forums.getpaint.net/topic/113153-paintnet-41-beta-build-6808/

I’ve been hard at work on this for the last 7 months and it’s finally time for a beta release! There’s a lot of small- and medium-size things all over the place Smile There have been some significant performance improvements to some important effects, especially those in the Blur menu. There are also a lot of quality-of-life improvements, some great bug fixes, and the ability to perform copy and paste operations on the selection, among many other things. I’ve also been making a lot of improvements “under the hood” that won’t really be visible, but that will make it easier and faster for me to make progress on features and other performance improvements.

Thanks to @BoltBait and @toe_head2001 for their contributions in this release!

Here’s a quick overview of some of the bigger changes:

  • GPU-powered Effects! Some of the effects have been rewritten to use Direct2D’s image processing system, and the results are phenomenal for performance. Gaussian Blur is actually fast now and no longer takes ages to complete for large images or radii, and the same goes for both Motion Blur and Radial Blur (although Radial Blur does currently need a pretty powerful GPU). A few other effects were converted for the sake of completeness and for my own learning, and there are two new ones (Morphology and Turbulence). This is where most of my time (the aforementioned “last 7 months”) and sweat was spent: getting a GPU-based effect rendering system up and running end-to-end was no small feat! Expect to see more effects converted over to the GPU in subsequent updates as this tech matures. I am also planning to make the GPU available for plugins to use in a future update.
    image.png
  • Copy/Paste for Selections. You can now copy the active selection to the clipboard, as well as paste from the clipboard to the active selection (all selection combine modes are supported). This copies only the selection, not the pixels that are within the selection. You can then apply the selection to another layer or image, or just save it for later. Because the selection is copied to the clipboard as JSON text, you can use external utilities to maintain them or even do processing on them (you aren’t limited to Paint.NET’s built-in selection operations, in other words). For example: if you want to save and reuse 5 selections, just open up 5 copies of Notepad and use them as a storage buffer. You can also use Paste Selection when a regular image is on the clipboard: if the image is from Paint.NET, the embedded selection will be used, otherwise the image’s size will be converted to a selection (a rectangle anchored to x=0,y=0 with the same width and height as the image). More formal documentation for the data format will be available soon.
    image.png
  • Bicubic resampling for the Move Selected Pixels tool. This can produce much higher quality results than Bilinear resampling. It is very CPU-intensive, so a fast CPU with 6+ cores is highly recommended if you plan to use it a lot. The default is still Bilinear, so if you’d prefer to always use Bicubic you can change it from Settings -> Tools.
    image.png
  • New +/- buttons for Tolerance and Hardness. This is a great quality-of-life improvement, especially for the Magic Wand when you’re trying to find just the right value for Tolerance.
    image.png

Change log since 4.0.21:

  • Improved: Gaussian Blur, Motion Blur, and Radial Blur now render using the GPU and are significantly faster
  • Changed: The following effects are now rendered using the GPU: Edge Detect, Pixelate, and Relief
  • Changed: The following adjustments are now rendered using the GPU: Black & White, Invert Colors
  • New Effect: Distort -> Morphology (uses the GPU)
  • New Effect: Render -> Turbulence (uses the GPU)
  • New: Bicubic resampling is now supported for the Move Selected Pixels tool. It is very CPU-intensive, so a CPU with 6 or more cores is highly recommended.
  • New: Edit -> Copy Selection. This will copy the current selection’s geometry to the clipboard as JSON text.
  • New: Edit -> Paste Selection. This will apply the selection from the clipboard to the current selection. All 5 selection combine modes are supported.
  • Changed: The Text tool now uses Points for font size measurement. You can also elect to use the old font size metric, “Fixed (96 DPI)” via the dropdown to the right of the font size.
  • Fixed: The Text tool’s recentering algorithm when typing reaches the edge of the viewport should be better
  • New: Added +/- buttons to the Tolerance and Hardness sliders.
  • Changed: Increased max zoom level to 6400%
  • New: The mouse wheel may now be used to scroll a long menu, such as when a lot of effects are installed (thanks @toe_head2001!)
  • Changed: For Windows 7 SP1 users, the Platform Update from 2013 is now required.
  • Fixed: Opening certain large images and then zooming with the mouse wheel would sometimes result in the scroll position being completely wrong
  • Changed: Hiding a layer no longer auto-selects the nearest visible layer. You can re-enable this in Settings
  • New: For the Windows Store release, the paintdotnet: protocol can now be used to launch the app so that you can specify command-line parameters. For example, you can go to Start -> Run and type in paintdotnet:”path to file1.png” path_to_file_2.png and both images will be opened (even if Paint.NET is already open)
  • New: Added Heptagon (7-sided polygon) and Octagon (8-sided polygon) shapes
  • Fixed the high-DPI inset-text scaling for the Shape selector (e.g. Pentagon with an inset “5”)
  • New: Palettes are now also loaded from Documents/paint.net App Files/Palettes. This folder name is not localized, and so is easy to rely on for installation scripts.
  • Fixed: View -> Pixel Grid will now correctly adjust to changes in the theme (light vs. dark)
  • Fixed: The background color for the Tolerance slider has been corrected for non-dark themes
  • Changed: Removed shortcut keys for all built-in Adjustments except for Invert Colors (Ctrl+Shift+I). This is being done to free up shortcut keys for other functionality.
  • New: Added a shortcut key to trigger a full .NET garbage collection: Ctrl+Alt+Shift+` (tick/tilde). This should only ever be needed for troubleshooting purposes.
  • New: Battery Saver Mode in Windows 10 is now respected, whether enabled manually or due to low battery. UI animations will be disabled.
  • New for plugin developers: The IndirectUI Color Wheel control now supports an alpha slider. To use this, set the range (min/max values) of the Int32PropertyControl to [Int32.MinValue, Int32.MaxValue] (thanks @BoltBait!)
  • New for plugin developers: there is a new FileChooser property control type for string properties (thanks @toe_head2001!)
  • New for plugin developers: there is a new BinaryPixelOp.Apply(Surface, Surface, Surface, Rectangle) method overload (thanks @BoltBait!)
  • Changed: The IndirectUI text control now has a vertical scroll bar when multiline mode is enabled (thanks @toe_head2001!)
  • Fixed a very old and nasty crash, “InvalidOperationException: ScratchSurface already borrowed”

Enjoy! Please comment with your questions and bug reports :)