Images read through XCF plugin currently return weird values for QImage::dotsPerMeterX and QImage::dotsPerMeterY, e.g.: DPM X: -2147483648 DPM Y: 3937 example image attached (generated by GIMP 2.8) Reproducible: Always Steps to Reproduce: 1. Read an XCF image using QImageReader 2. get QImage::dotsPerMeterX() and QImage::dotsPerMeterY() values Actual Results: DPM X: -2147483648 DPM Y: 3937 Expected Results: DPM X: 72 DPM Y: 72
Created attachment 98691 [details] Sample XCF file
just an amendment, for this example the expected results are: DPM X: 2834 DPM Y: 2834
From quickly checking the code, the QDataStream probably needs to use setFloatingPointPrecision(SinglePrecision), otherwise all floats are read in double precision.
https://cgit.kde.org/kimageformats.git/commit/?id=7afaacb09384830b3239dd4291347550b04828b9