Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoother zoom and better performance with antialiasing #522

Closed
Sumsar3 opened this issue May 3, 2019 · 5 comments
Closed

Smoother zoom and better performance with antialiasing #522

Sumsar3 opened this issue May 3, 2019 · 5 comments

Comments

@Sumsar3
Copy link

Sumsar3 commented May 3, 2019

Hi. Yesterday I discovered this program looking for alternatives to windows app, and I like Imageglass very much, but there are two big problems that I find it hard to use this program.

1: The zoom isn't smooth. From 100% to 150% 200, 300, 400... they are big steps. I can't focus some details of the photos with accuracy with this zoom. Other programs (like picasa viewer) have 100,115,132,152,175,201... a much precise zoom with very nice animation.

2: The antialiasing option kills the performance of the program, specially on 4k/2k resolution. I tested too much image viewers, and almost every one have antialiasing when you zoom above the 100% and in no one kills the performance. This is weird.

This 2 problems are the only problems I find. The program is very nice and I like very much, but I can't use this until this problems are fixed.

Thank you very much and excuse me for my english.

@d2phap
Copy link
Owner

d2phap commented May 4, 2019

Thanks @Sumsar3

2: The antialiasing option kills the performance of the program, specially on 4k/2k resolution. I tested too much image viewers, and almost everyone have antialiasing when you zoom above the 100% and in no one kills the performance. This is weird.

You can try other options in Zoom Optimization.

image

@fire-eggs
Copy link
Collaborator

Additional, finer levels of zooming are now possible:

image

@brunogm0
Copy link

brunogm0 commented Apr 2, 2020

Hi, I already saw previous closed issues but to contribute for the future:
First allow sigmoidization for upsampling will correct many issues; In the same way downsample in LAB color space;
For speed-up with a nice edge I like MPV player oversample filter, that is a little better than nearest-neighbor maybe tweak the param of interpolation from default always to some interval 0.1~0.33;
Then add robidouxSharp, Anime4k as a option ;
EDIT: acme-0.5x.hook is fast downsampler for +4k;

In my RX460 gpu using mpv the cost is:
oversample 700ns
nearest 1400
Mitchell 1600ns
anime4k 3500ns
robidouxsharp 4000ns
catmull_rom 4000ns
ewa_robidouxsharp 4700ns
Lanczos 5150ns
jinc 6300ns

examples:
https://github.com/haasn/mpvhq-upscalers
https://imagick-filters-comparison.netlify.com/
https://github.com/bloc97/Anime4K

@mirh
Copy link

mirh commented Feb 1, 2021

Jeez, it's crazy what they could pull out with just a couple of shaders.
Though to be fair that's still quite above the level of complexity we have now, just hooking into .NET's own algorithms

private void ZoomOptimization() {
if (Configs.ZoomOptimizationMethod == ZoomOptimizationMethods.Auto) {
if (picMain.Zoom > 100) {
picMain.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
}
else if (picMain.Zoom < 100) {
picMain.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Low;
}
}
else if (Configs.ZoomOptimizationMethod == ZoomOptimizationMethods.ClearPixels) {
picMain.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
}
else if (Configs.ZoomOptimizationMethod == ZoomOptimizationMethods.SmoothPixels) {
picMain.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Low;
}

The outrageous thing is that nearest neighbourhood is the default for zooming. Even though at least with normal photos, it's neck to neck with whatever "low quality" is... It cannot be overstated just how bad it is for artwork and text.
EDIT: I can also report how even just moving around a scaled high resolution image is super slow

@d2phap d2phap added this to the v9.0 milestone May 11, 2022
@d2phap d2phap modified the milestones: v9.0 beta 1, v9.0 beta 2 May 21, 2022
@d2phap d2phap modified the milestones: v9.0 beta 2, v9.0 beta 3 Sep 6, 2022
@d2phap
Copy link
Owner

d2phap commented Dec 26, 2022

@Sumsar3 You can try IG v9.0 beta 3 which supports smooth zooming and panning with hardware acceleration.

For accurate zooming, you can use "Custom zoom", and enter the zoom value. Please note that, zoom steps are removed in v9.0 beta.

@d2phap d2phap closed this as completed Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants