CreateGdPictureImageFromFile changing original dpi

Discussions about image processing and document imaging.
Post Reply
quicoli
Posts: 1
Joined: Thu Apr 25, 2013 10:22 pm

CreateGdPictureImageFromFile changing original dpi

Post by quicoli » Thu Apr 25, 2013 10:25 pm

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!

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: CreateGdPictureImageFromFile changing original dpi

Post by Fabio » Tue Aug 17, 2021 9:49 am

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

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: CreateGdPictureImageFromFile changing original dpi

Post by Fabio » Tue Nov 02, 2021 10:07 am

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest