Can someone please tell me the formula used on this online cm to pixel calculator? https://photoresizer.net/pixel-calculator
I have images that I can easily get the dpi, bit-depth, pixel height and width, and I need to calculate the print centimeter dimensions of the images. For example, If a 300-dpi, 8-bit image has pixel dimensions of 9448x3543, the calculator should give me 80x30 cm as shown in the screenshot below.
I actually need a pixel-to-cm formula and the calculator in the link above only does cm-to-pixels but if I knew the formula, I can easily reverse it.
NOTE: I notice that if you divide the width or height by 118.1 it gives the correct result (9448 \ 118.1 = 80) but I don't understand why that would be the formula and if it's the correct number to get correct results with ALL sizes. What's the relation with the number 118.1?