How to convert low dpi xy point to high dpi xy point

324 Views Asked by At

I have xy points on 96 dpi image and now i want to convert these xy points to same 300 dpi image.

Example : on 96 dpi image (410x330) i have Point X it 180x64 xy.

Now i have the same 96 dpi image it 300 dpi rendered and i want 180x64 xy point of 96 dpi image to be converted to 300 dpi exact location.

So any idea how to do it mathematically

1

There are 1 best solutions below

0
On BEST ANSWER

i found formula

first convert your old xy points to mm.

1 pixel === 0.264583 mm

so if i convert my points (180x64) to mm it will be

180 x 0.264583  = 47.62 mm
64 x 0.264583 = 16.93 mm

next put value in formula

( value in mm * 0.0393701) * DPI    = Your New Point it Desire DPI

i will put my points in mm in formula which are 47.62 mm and 16.93 mm

(48.41875 * 0.0393701) * 300    = 571
(16.933333333 * 0.0393701) * 300    = 200

so my new point it 300 DPI will be 571 and 200 :)