Announcement

Collapse
No announcement yet.

Pixels to Cm @ resize function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pixels to Cm @ resize function

    Hello!

    Could anyone help, and show how irfan view converting size from pixels to cm's?

    I'm coding aplication which will show distance between two points. I have it in pixels and need convert to CM's

    Thanks for help

    #2
    To calculate the print size, IrfanView will be using the image's dpi.

    @ 300 dpi 2.54 cms = 1" = 300 pixels

    @ 96 dpi 2.54 cms = 1" = 96 pixels
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Hi undef,

      The abbreviation dpi is for "dot per inch", where a dot is the same as a pixel and an inch is 2.54 cm. So the dpi value is the quotient of the size in pixels of the digital image by the size in inch of the image printed on paper.

      Code:
      dpi = pixels_size / inch_size
      Since

      Code:
      inch_size = cm_size / 2.54
      you have

      Code:
      dpi = 2.54 * pixels_size / cm_size
      So, to convert from pixels to centimetres, you have:

      Code:
      cm_size = 2.54 * pixels_size / dpi
      In the image info, you can adjust the dpi value (use the same value for width and height) to adjust the size of the printed image to any value you want. Use values between 150 and 600 dpi. If you need to use dpi values smaller than 150 dpi, the printed image will look poor. If you need to use dpi values larger than 600 dpi, it is better to resize your image (decrease the number of pixels).

      Laurent
      Before you post ... fill in your OS and IV version in your profile.

      Comment


        #4
        Try also JPEGCrops!

        Comment

        Working...
        X