Add Lanczos as a resampling option to the resize menu
Description I often need to resize images in Pinta. Currently, it seems to use a single resampling algorithm, which works fine for most images. However, when working on something like pixel art, it can lead to blurry results, which would be fixed by using "Nearest Neighbor" resampling.
Additional context Paint.net already offers to choose the resampling algorithm when resizing. While adding all the same resampling options is a bit much, it would be nice to at the very least add "Nearest Neighbor" in addition to the current one. Lanczos would also be nice, it can give great results at the cost of being more expensive.
I just realized nearest neighbor resampling was already a thing on the master branch, i forgot the latest official release was quite old and so that's why i didn't have it yet. 😅
Although, i'd like to keep this open for the "Lanczos" resampling method, which i also use quite often as it gives great results when upscaling images. It would definitely a nice addition to Pinta. I'll rename the issue to fit.
Currently the resizing is done via Cairo, so adding other resampling modes beyond the available filters from Cairo (https://www.cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-filter-t) would involve some additional work
Maybe you could even use some ai image upscale like real esrgan by using this nuget package https://www.nuget.org/packages/NcnnDotNet For CPU
Or https://www.nuget.org/packages/NcnnDotNet.GPU for GPU using Vulkan (without pytorch dependency, running on all newer AMD, Intel, Nvidia GPUs)
Maybe you could even use some ai image upscale like real esrgan by using this nuget package https://www.nuget.org/packages/NcnnDotNet For CPU
Or https://www.nuget.org/packages/NcnnDotNet.GPU for GPU using Vulkan (without pytorch dependency, running on all newer AMD, Intel, Nvidia GPUs)
AI upscaling would probably be better suited for an addin (although that is just my opinion). I don't think there is currently a way for an addin to add extra resizing modes however, but that could probably be added.
I don't think there is currently a way for an addin to add extra resizing modes however, but that could probably be added
Correct, there isn't any way for an add-in to provide additional resizing modes. It's sort of related to my comment in https://github.com/PintaProject/Pinta/issues/1232#issuecomment-2614099978 about any non-Cairo resizing mode needing some work to generalize the code more