syoyo / tinydng

Header-only Tiny DNG/TIFF loader and writer in C++
MIT License
151 stars 30 forks source link

Inverted equation terms in maxSize check #31

Closed Kuranes closed 1 year ago

Kuranes commented 1 year ago

left size is in Bytes, right size in MB Fixing it so that each size is in bytes.

dst_len = 242880 = 5 1024 1024 = 5 mega bytes kMaxImageSizeInMB= 64 giga bytes = 65535 mega bytes = 65535 1024 1024 = 68718428160 bytes

previous code was putting that 5mb file as dst_len = 242880 1024 1024 = 254678138880 = 242 giga bytes