Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to Scale an image to its real world size

How to Scale an image to its real world size

Scheduled Pinned Locked Moved C#
questionhelptutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jamesjk
    wrote on last edited by
    #1

    Hi, I have images of human body parts. Is it possible to view the image at its actual real world size. How can I achieve this ? How do I confirm whether current size of the image is same as its real world size? Thanks in advance for all the help & suggestions.....

    L L A 3 Replies Last reply
    0
    • J jamesjk

      Hi, I have images of human body parts. Is it possible to view the image at its actual real world size. How can I achieve this ? How do I confirm whether current size of the image is same as its real world size? Thanks in advance for all the help & suggestions.....

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You must get the DPI. For example the picture has 96dpi and the size is 1024x768 pixel. 1024/96 -> 10.67 inch 768/96 -> 8 inch That means : the print size is 10.67 x 8 inch

      J 1 Reply Last reply
      0
      • L Lost User

        You must get the DPI. For example the picture has 96dpi and the size is 1024x768 pixel. 1024/96 -> 10.67 inch 768/96 -> 8 inch That means : the print size is 10.67 x 8 inch

        J Offline
        J Offline
        jamesjk
        wrote on last edited by
        #3

        thanks stancrm, will this ensure that the image, say that of a knee will be exactly of the same size of the person's knee whose knee was pictured ?

        L 1 Reply Last reply
        0
        • J jamesjk

          thanks stancrm, will this ensure that the image, say that of a knee will be exactly of the same size of the person's knee whose knee was pictured ?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          if you have a camera that can take a picture 1:1, then yes...

          1 Reply Last reply
          0
          • J jamesjk

            Hi, I have images of human body parts. Is it possible to view the image at its actual real world size. How can I achieve this ? How do I confirm whether current size of the image is same as its real world size? Thanks in advance for all the help & suggestions.....

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            Hi, you will need the following: 1. most camera's generate JPG files, with embedded tags containing a lot of parameters; 2. GDI+ can paint images at their actual size, see Graphics.DrawImageUnscaled; 3. your system has a DPI setting (defaults to 96) which you can change to correspond to the actual resolution (in dpi) of your monitor; you can calculate the required value like so: Math.Sqrt(screenWidthPixels^2+screenHeightPixels^2)/screenDiagonalInches*100/96 the square root calculates number of pixels on the diagonal; the final 100/96 is needed because Windows expects the number as a percentage of 96dpi, the default value. You may be a bit out of luck if you use multiple monitors with different DPI values. 4. Your printer drivers should take care of DPI settings all by themselves. :)

            Luc Pattyn

            :badger: :jig: :badger:

            Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.

            :jig: :badger: :jig:

            1 Reply Last reply
            0
            • J jamesjk

              Hi, I have images of human body parts. Is it possible to view the image at its actual real world size. How can I achieve this ? How do I confirm whether current size of the image is same as its real world size? Thanks in advance for all the help & suggestions.....

              A Offline
              A Offline
              Ashfield
              wrote on last edited by
              #6

              Have you really thought this out? Are you sure your monitor is big enough to display say a full length shot of a spine? You will also need a very good camera otherwise the picture will be rubbish.

              Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups