def px2mm(pixels, resolution=1600, precision=2):
    """Convert scanned pixels to millimeters.

    Arguments:
        pixels: measurement in pixels.
        resolution: image resolution in pixels/inch.
        precision: number of significant digits for rounding.

    Returns:
        The converted measurement.
    """
    return round(25.4 * pixels / resolution, precision)