cloudy-org / roseate

🌹 A small, fast as fuck, memory efficient and simple but fancy image viewer built with 🦀 Rust that's cross platform. (WIP)
GNU General Public License v3.0
7 stars 1 forks source link

Downsampling breaks on systems with multiple monitors. #15

Open THEGOLDENPRO opened 2 weeks ago

THEGOLDENPRO commented 2 weeks ago

rdev's display_size() on systems with more than one monitor returns the dimensions of all the monitors combined which breaks the image down-sampling optimization as it gets skipped if those combined monitor dimensions are bigger than the image which is almost always true.

Down-sampling optimization should only occur if the image is quite a bit bigger than ONLY the current monitor in use but display_size() from rdev returns the size of all the monitors combined. This is important as now images that are high res will NOT get down-sampled leading to pixely images and more memory being consumed than normal.

Source code in question: https://github.com/cloudy-org/roseate/blob/5456d28ad2e859eecd1e687e8e0cf97af6060ef5/src/app.rs#L96-L104

THEGOLDENPRO commented 2 weeks ago

this might be good: https://crates.io/crates/display-info