Library for calculations for pixel-perfect integer-ratio image upscaling (C++/Rust/JS/PHP) + testcases