Hi
I have some troubles understanding the results of IO.Params.DPI: depending on the way I read this params I get different results for the same image (ImageEN version 6.3.2 using Delphi XE).
Please take this picture:
I used this test code to read the DPI
ImageEnView1.IO.LoadFromFileAuto('d:\downloads\elefant.jpg');
lIO := TImageEnIO.Create(nil);
try
lIO.LoadFromFileAuto('d:\downloads\elefant.jpg');
nDPI_lIO := lIO.Params.Dpi;
finally
lIO.Free;
end;
lIO := TImageEnIO.Create(nil);
try
lIO.ParamsFromFile('d:\downloads\elefant.jpg');
nDPI_lIO_pre := lIO.Params.Dpi;
finally
lIO.Free;
end;
ShowMessage(Format('lIO.Params.Dpi: %d' + #10#13 + 'lIO.Params.Dpi (ParamsfromFile): %d' + #10#13 + 'ImageEnView1.IO.Params.Dpi: %d',[nDPI_lIO, nDPI_lIO_pre, ImageEnView1.IO.Params.Dpi]));
The results are 300, 1 and 300. So why I get a different result when using ParamsFromFile? And what does this values mean in the current situation? I checked the image with IrfanView and it looks like there is no resolution assigned.
So how can I determine if there is a resolution assigned?
Thank you,
Uli