Here you can find the source of pixelsToInches(int sizeInPixels, int dpi)
public static double pixelsToInches(int sizeInPixels, int dpi)
//package com.java2s; //License from project: Open Source License public class Main { public static double pixelsToInches(int sizeInPixels, int dpi) { int sizeInInches = sizeInPixels / dpi; return sizeInInches; }/* w w w. j a v a 2s. c om*/ }