Page 1 of 1

CreateGdPictureImageFromFile changing original dpi

Posted: Thu Apr 25, 2013 10:25 pm
by quicoli
Hi!

I've a picture that, according to Windows properties, has 96 dpi. But, after loading it just like this:

Code: Select all

            var gdImage = new GdPictureImaging();
            int imageId = gdImage.CreateGdPictureImageFromFile(@"C:\Users\paquicoli\Dropbox\cavalos\000085db.jpeg");
            var horResolution = gdImage.GetHorizontalResolution(imageId);
            var verResolution = gdImage.GetVerticalResolution(imageId);

            gdImage.SaveAsJPEG(imageId, @"d:\paulo\cavalo.jpg", 100,true);
            gdImage.ReleaseGdPictureImage(imageId);
DPI is changed to 72. Why is that happening?

Thank you!

Re: CreateGdPictureImageFromFile changing original dpi

Posted: Tue Aug 17, 2021 9:49 am
by Fabio
Hello,

Sorry for the late.

I reproduced the issue and reported it to the development team.
I'll keep you updated when the correction will be available on a minor release.

With best,
Fabio

Re: CreateGdPictureImageFromFile changing original dpi

Posted: Tue Nov 02, 2021 10:07 am
by Fabio
Hello,

After a talk with the developer team, there is no issue here.
There is a chance your input image has no resolution field. Therefore, GdPicture adds a default one of 72 which is the industry standard.

With best,
Fabio