473,322 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

convert pixel to centimeters

Hello, I want to convert pixel values to centimeters values. For example
start point is 100,100 pixel and stop point is 200,100 pixel.
distance is what cm?

How can I calculate distance as centimeters?
Nov 17 '05 #1
3 28001
This would depend completely on the size of your physical display,
wouldn't it?

If you have a 12.8 centimeter display showing a 1280x1024 image, then
you have 100 pixels per centimeter.

Right?

Nov 17 '05 #2
You might look at the following articles on MSDN:

http://support.microsoft.com/default...b;en-us;127152

If you're not as picky as the above article, you can always use the
DpiX and DpiY properties of the Graphics object on which you're
drawing. (You must always determine pixels to inches based on some
output device... the conversion is meaningless in the absence of a
graphics context of some kind.) In DpiX and DpiY, the "D" stands for
"dots" or pixels, while the "i" stands for "inches". So, you can
convert pixels to inches. Then all you have to do is convert inches to
centimeters.

Nov 17 '05 #3
You may also find the Graphics.TransformPoints method useful.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James dean | last post by:
Do i have to create an index pallette. How do i do that?. Or, Can i not just make an ordinary 8pp pixel format without this indexed problem...... *** Sent via Developersdex...
7
by: Scott Schluer | last post by:
Is there a way to use the Image class to convert a color photo (GIF or JPEG) to a B&W photo? Thanks, Scott
2
by: Ira | last post by:
Is it possible to convert a 32-bit color image into a 1-bit-per-pixel image in VB.net? If yes, how can it be done?
4
by: perspolis | last post by:
Hi all I have some points in twips measurement.how can I convert them to pixel measurement ? thanks
4
by: eking | last post by:
//Thanks for any help,thank you!лл¡£ public override void FloodFill(Bitmap bmp, Point pt) { int ctr=timeGetTime(); //Debug.WriteLine("*******Flood Fill******"); //get the color's int...
8
by: platinumhimani | last post by:
-How to convert any image(8,16,24,32 or 64-bit) to 8-bit grayscale -i have tried to convert a 24-bit image to grayscale using setpixel and getpixel functions, in vb.net but i am unable to save...
26
by: mark | last post by:
The idea of this is very simle. The site is 800px wide and sits in the middle of the browser window, on either side of the site I want a different background image aligned against it. If I were...
2
by: minouparhizkar | last post by:
hi could anyone helping me to finish this i have no idea how to implement the program in java im trying to grabbing the pixel from image and then convert it to the txt file .i did that but it didnt...
19
by: SpecialKay | last post by:
Hey guys, so i was given this question by one of my dads friends. With no information or turtorial. Just a paper and a pencil. Needless to say, it did not go well, and now my brain want to know...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.