Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.2
-
None
Description
The DPI functions for QImage (and QPaintDevice) are returning incorrect values for a JPG image that was taken with a Nikon D2Xs camera.
Both Photoshop CS3 and the Windows file properties dialog box correctly show the DPI as 300.
You can download the JPG from here: http://jack.fxhome.com/problemImage.JPG
#include <QtGui/QImage>
#include <iostream>
int main(int argc, char *argv[])
{
using namespace std;
if (argc != 2)
{ cout << "Usage: " << argv[0] << " <image filename>" << endl; return 0; }QImage image(argv[1]);
cout << "dotsPerMeter:\t" << image.dotsPerMeterX() << " " <<
image.dotsPerMeterY() << endl;
cout << "logicalDpi:\t" << image.logicalDpiX() << " " <<
image.logicalDpiY() << endl;
cout << "physicalDpi:\t" << image.physicalDpiX() << " " <<
image.physicalDpiY() << endl;
return 0;
}