1

I working in jquery.rulers.js function, and i create rulers for particular div and it shown properly in pixel and it convert into inches it will shown same measurement.

For example :

i have 100 pixel in my div it will shown 1'0" ,200 pixel in my div it will shown 2'0" and so on.when i converted pixel into inches it shown different.Which one is correct? i much more struggle in pixel to inches conversation.

Here my working FIDDLE

But it shown only pixel values in inches.but it not properly shown inches values.I need proper guidelines..and i need any formula for this conversation.

NOTE:

I have used only 150 DPI (Dotted Per Inch) for image conversation. REFER URL

TylerH
  • 20,799
  • 66
  • 75
  • 101
VIVEK-MDU
  • 2,483
  • 3
  • 36
  • 63
  • 1
    Note: CSS pixels has nothing to do with DPI. – Justinas Dec 19 '14 at 13:05
  • @Justinas..thank u for response me..Here i just changed pixel into inches for example 100pixel converted into 1'0" like wise i need to change exact inches values ? or else any more idea for changes this? – VIVEK-MDU Dec 19 '14 at 13:19
  • 1
    Try this http://stackoverflow.com/questions/10229109/google-docs-pixels-to-inches – Justinas Dec 19 '14 at 13:24
  • But because jquery.rulers.js shows CSS pixels and coordinates, I don't think there is bugless method for that. Try using restricting zoom ratio to 1 and than apply formula from above link – Justinas Dec 19 '14 at 13:25
  • @Justinas.. I try to multiple inches*96 it result some decimal and it will show inconsistent refer this JSFIDDLE :http://jsfiddle.net/vivekkt91/o63x718v/ – VIVEK-MDU Dec 19 '14 at 13:43

1 Answers1

2

I found that answer for my own question. I can divide given pixel into DPI(dotted per Inch).

For example : 100pixel for particular div divided by 150 DPI(or 96 DPI).

Result Inches = PIXEL/DPI;(Dotted Per Inches)

Here i update my FIDDLE.

VIVEK-MDU
  • 2,483
  • 3
  • 36
  • 63