Image size in centimetres

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

Moderators: XnTriq, xnview

Post Reply
Guest

Image size in centimetres

Post by Guest » Mon Sep 19, 2005 9:37 am

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: 31264
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Image size in centimetres

Post by xnview » Mon Sep 19, 2005 10:20 am

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 » Mon Sep 19, 2005 12:04 pm

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: 31264
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Image size in centimetres

Post by xnview » Mon Sep 19, 2005 1:20 pm

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

Post Reply