SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. enable shake cursor effect 2. shake cursor OBSERVED RESULT The enlarged cursor is pixelated and blurry EXPECTED RESULT The enlarged cursor is sharp and crisp SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.90.90 KDE Frameworks Version: 5.246.0 Qt Version: 6.6.1 Kernel Version: 6.6.4-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 20 × 13th Gen Intel® Core™ i9-13900H Memory: 15.2 GiB of RAM Graphics Processor: Mesa Intel® Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Zephyrus G16 GU603VV_GU603VV System Version: 1.0 ADDITIONAL INFORMATION
Yep, that's what happens when you take a pixmap image and enlarge it to many times its size :)
(In reply to Nate Graham from comment #1) > Yep, that's what happens when you take a pixmap image and enlarge it to many > times its size :) Allow me to say tho, it looks a bit ugly/unrefined. Compare this to macOS: https://www.youtube.com/watch?v=U5n-JE7r_8g Isn't it possible to somehow replace the graphical resource on the fly so that instead of zooming in a small image, you just load a higher-res one? I'm probably making this easier than it is... :D Thanks
Indeed. :) What we need to do is move to vector cursors which scale up nicely, but this would entail breaking compatibility with xcursor themes (of which there are *many*), which are raster images and therefore look pixelated or blurry when blown up like this. It would be nice, but breaking the existing spec would mean no more cursor customizations until a new vector-based spec was created and the entire universe of cursor theme artists ported their themes it (which would probably be never, until and unless everyone else moved to the new spec too). It's unfortunately an example of how allowing customization and theming can actually hold back progress.
Is it possible that some smart scale-up algorithm wouldn't have this pixelated look? But that might be too much work just for some pixels...
Yeah, I'm sure there are better upscaling algorithms, and for a long time I've wanted to use one for compositor-upscaled windows. However for that use case the original image only generally needs to be upscaled by a maximum of 2-2.5x, whereas for the cursor it needs to be upscaled 10x or more! So the quality requirements here are more demanding.
(In reply to Nate Graham from comment #5) > Yeah, I'm sure there are better upscaling algorithms, and for a long time > I've wanted to use one for compositor-upscaled windows. However for that use > case the original image only generally needs to be upscaled by a maximum of > 2-2.5x, whereas for the cursor it needs to be upscaled 10x or more! So the > quality requirements here are more demanding. Here is a comparison here on wikipedia: https://en.wikipedia.org/wiki/Comparison_gallery_of_image_scaling_algorithms I think Edge-directed interpolation might work well for our purporses.
"Deep convolutional neural networks using perceptual loss" looks the best, so clearly what we need is to write an AI upscaler just for the cursor. 🤪
(In reply to Nate Graham from comment #3) > Indeed. :) What we need to do is move to vector cursors which scale up > nicely, but this would entail breaking compatibility with xcursor themes (of > which there are *many*), which are raster images and therefore look > pixelated or blurry when blown up like this. It would be nice, but breaking > the existing spec would mean no more cursor customizations until a new > vector-based spec was created and the entire universe of cursor theme > artists ported their themes it (which would probably be never, until and > unless everyone else moved to the new spec too). > > It's unfortunately an example of how allowing customization and theming can > actually hold back progress. What if there is some easy tool that converts xcursor themes to SVGs? That seems feasible based on the wikipedia page, "Image tracing".
*** Bug 483160 has been marked as a duplicate of this bug. ***
*** Bug 483095 has been marked as a duplicate of this bug. ***
*** Bug 484166 has been marked as a duplicate of this bug. ***
If I'm not wrong, the current strategy is to enlarge the cursor's image while maintaining its "size" (the cursor's size is kept constant while its magnifying factor increases). The size of some cursors can be changed (System Settings -> Colors & Themes -> Cursors -> Size), and they look crisp when large. So, another strategy to create less blurry enlarged cursors is to: change the cursor size to something large AND change the magnifying factor to something small so that the cursor looks the same as before, then proceed to magnify the cursor by increasing the magnifying factor. At the end of the animation the size of the cursor could be restored.