GreycLab / CImg

The CImg Library is a small and open-source C++ toolkit for image processing
http://cimg.eu
Other
1.46k stars 278 forks source link

compile error in the .h file on Visual Studio 2022 #416

Closed AngleaD closed 3 months ago

AngleaD commented 3 months ago

error C4146: unary minus operator applied to unsigned type, result still unsigned

original code line 34230 prec = precision<0 ? (unsigned int)(-siz*precision/100) : (unsigned int)precision;

my patch to remove the compilation error prec = precision<0 ? (unsigned int)(siz* -precision/100) : (unsigned int)precision;

David Anglea 20 April 2024 I have reinstalled the CIMG code on a new computer and In the years past I may have fixed this previously - but I can not recall this fact. I down laded the zip file form GITHUB on 18 April 2024

dtschump commented 3 months ago

Thanks. Does that work now with the fix?