ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Wrong DPI returned by ImageEn
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mastinf

Italy
48 Posts

Posted - Jan 12 2026 :  05:43:48  Show Profile  Reply
Hello

i use the following code to read DPI of an image file:



procedure GetDPIImageFile(fn:string;var dpix,dpiy:integer);
var
  img:Timageenview;
  ff: TIOFileType;
begin
  img:=Timageenview.create(nil);
  try
    ff := FindFileFormat( fn, false );
    img.IO.ParamsFromFile( fn, ff );

    dpix:=img.io.params.dpix;
    dpiy:=img.io.params.dpiy;
  finally
    img.free;
  end;
end;



it usually works but have images (one is attached) where the DPI read by imageen is not correct.

The correct DPI is 200 (visible in Windows properties). ImageEn returns 300 DPI

My ImageEn version is old: 13.7.0 and i see that the trial version is older (11.0.1)

Could you check if this happens also in the latest version of ImageEn ?

Thanks



Roberto Nicchi
Master Informatica
Italy

mastinf

Italy
48 Posts

Posted - Jan 12 2026 :  07:24:17  Show Profile  Reply
I have found that in the compiled demo app (AllComponents.exe) in the last page (TIEMetaListView) the resolution detected for the image is correct (200 DPI). So is there a bug in my ImageEn version ? Or maybe my code is not correct ?

thanks

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

39327 Posts

Posted - Jan 12 2026 :  13:55:34  Show Profile  Reply
Hi Roberto

This image does not have embedded DPI information so falls back to the EXIF resolution which is 200. This might not be supported in old versions of ImageEn.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: