Image size in centimetres

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

Guest

Image size in centimetres

Post by Guest »

Hi,

On loading the original and resized image in a database, I also want to save some relevant info about the original image in the database, such as the image size in centimeters, Xdpi, Ydpi etc. The purpose is to supply the users, compiling publications, some relevant info before downloading a large image.

In my program, I use the following statement to extract image information:
e := gflLoadBitmap(Pchar(ImageFilePathName), gfl_bmp, lp, finfo);

But the finfo structure supply only the following:
width (in pixels), height (in pixels), Xdpi and Ydpi

I noticed packages such as IrfanView and PainShop Pro displays a image’s size in cm.

How do I derive the height and width, in cm, from the XnView's image properties?


Regards,

Nols Smit
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Image size in centimetres

Post by xnview »

Anonymous wrote:Hi,

On loading the original and resized image in a database, I also want to save some relevant info about the original image in the database, such as the image size in centimeters, Xdpi, Ydpi etc. The purpose is to supply the users, compiling publications, some relevant info before downloading a large image.

In my program, I use the following statement to extract image information:
e := gflLoadBitmap(Pchar(ImageFilePathName), gfl_bmp, lp, finfo);

But the finfo structure supply only the following:
width (in pixels), height (in pixels), Xdpi and Ydpi

I noticed packages such as IrfanView and PainShop Pro displays a image’s size in cm.

How do I derive the height and width, in cm, from the XnView's image properties?
1 inch = 2.54 cm
Pierre.
Nols Smit
Posts: 16
Joined: Mon Jun 27, 2005 6:38 pm

Re: Image size in centimetres

Post by Nols Smit »

xnview wrote:
Anonymous wrote:Hi,

On loading the original and resized image in a database, I also want to save some relevant info about the original image in the database, such as the image size in centimeters, Xdpi, Ydpi etc. The purpose is to supply the users, compiling publications, some relevant info before downloading a large image.

In my program, I use the following statement to extract image information:
e := gflLoadBitmap(Pchar(ImageFilePathName), gfl_bmp, lp, finfo);

But the finfo structure supply only the following:
width (in pixels), height (in pixels), Xdpi and Ydpi

I noticed packages such as IrfanView and PainShop Pro displays a image’s size in cm.

How do I derive the height and width, in cm, from the XnView's image properties?
1 inch = 2.54 cm
Which structure element give the image size in cm?

Nols Smit
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Image size in centimetres

Post by xnview »

Nols Smit wrote:Which structure element give the image size in cm?
You have Width/Height and XDPI/YDPI
Pierre.