When i run the following code:
I always get 0, which is undefined. I found a workaround on the internet - use Image::constImage()::units. It gives me the right value. I don't know if it's a bug or i'm using it the wrong way.
Code: Select all
Image image; image.read( "path_to_file" ); cout << image.resolutionUnits() << endl;