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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Convert size and position from pixels to millimeters (IEvolution .NET 8.0.0.0)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Deeron Posted - Nov 13 2021 : 06:18:04
Hi Nigel,

Is it possible to convert the size and position from pixel to millimetre for the background image and layer?

What I mean by this is that when I load a background image, I want to get its size in millimeters instead of pixels, and when I place one or more layers on top of it, I want to get the size and position of the layers relative to the background image also in millimeters instead of pixels. Sorry if my question is a bit confusing. But I saw in the IEvolution .NET help that you can switch between ruler units (IEViewRulerParams.IERulerUnits), so I'm asking if there is a built-in conversion option for this. I couldn't find one in the IEVolution help. :(

Thanks for the help.
Regards,
Deeron
3   L A T E S T    R E P L I E S    (Newest First)
Deeron Posted - Nov 15 2021 : 01:31:57
Thanks for the answer, Nigel.
xequte Posted - Nov 14 2021 : 17:23:09
Here are the DPI values:

https://www.imageen.com/ievolutionhelp/html/7d9264ad-bcc0-4169-9e5c-44c2da7b40b9.htm
https://www.imageen.com/ievolutionhelp/html/f4db3523-f3a0-be67-e788-4315b54de541.htm

Nigel
Xequte Software
www.imageen.com
xequte Posted - Nov 14 2021 : 17:17:01
Hi Deeron

There is not a method for this, but the math is pretty straightforward:

// Convert pixels to inches
in = px / DPI;

// Convert pixels to mm
mm = px / DPI * 25.4;




Nigel
Xequte Software
www.imageen.com