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. image doesn`t fit to screen

image doesn`t fit to screen

Scheduled Pinned Locked Moved C#
question
6 Posts 2 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.
  • V Offline
    V Offline
    valiovalio
    wrote on last edited by
    #1

    hello, I have an image with properties: Size: 1520 x 2234 pixels DPI = 200; size in centimetres: 19.3 x 28.4 cm When I open that image, it doesn`t fit to my 17' screen:( That image fits with size in centimetres. Is it possible to open that picture with size in centimetres, but not in pixels? Arnas

    G 1 Reply Last reply
    0
    • V valiovalio

      hello, I have an image with properties: Size: 1520 x 2234 pixels DPI = 200; size in centimetres: 19.3 x 28.4 cm When I open that image, it doesn`t fit to my 17' screen:( That image fits with size in centimetres. Is it possible to open that picture with size in centimetres, but not in pixels? Arnas

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      What do you use to open it? --- b { font-weight: normal; }

      V 1 Reply Last reply
      0
      • G Guffa

        What do you use to open it? --- b { font-weight: normal; }

        V Offline
        V Offline
        valiovalio
        wrote on last edited by
        #3

        string kelias; Bitmap image1; kelias = OpenFile(); image1 = new Bitmap(@kelias, true); // how to set the size in centimetres? } //----------------------------------------------------------------- private string OpenFile() { OpenFileDialog dlgOpenFile = new OpenFileDialog(); dlgOpenFile.ShowReadOnly = true; if (dlgOpenFile.ShowDialog() == DialogResult.OK) { string path = dlgOpenFile.FileName; return path; } return null; }

        G 1 Reply Last reply
        0
        • V valiovalio

          string kelias; Bitmap image1; kelias = OpenFile(); image1 = new Bitmap(@kelias, true); // how to set the size in centimetres? } //----------------------------------------------------------------- private string OpenFile() { OpenFileDialog dlgOpenFile = new OpenFileDialog(); dlgOpenFile.ShowReadOnly = true; if (dlgOpenFile.ShowDialog() == DialogResult.OK) { string path = dlgOpenFile.FileName; return path; } return null; }

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          The size in centimeters is hardly relevant unless you display the image in some way. How do you do that? --- b { font-weight: normal; }

          V 1 Reply Last reply
          0
          • G Guffa

            The size in centimeters is hardly relevant unless you display the image in some way. How do you do that? --- b { font-weight: normal; }

            V Offline
            V Offline
            valiovalio
            wrote on last edited by
            #5

            I display image in usual way, so I do have a big problem:( unless there is, maybe some way to shrink that image or something... Or what should I do? Maybe there is something I can do while scaning image, setting some properties...? I just don`t know what to do, I need to open image in real size. Maybe you can suggest something? Thanks:)

            G 1 Reply Last reply
            0
            • V valiovalio

              I display image in usual way, so I do have a big problem:( unless there is, maybe some way to shrink that image or something... Or what should I do? Maybe there is something I can do while scaning image, setting some properties...? I just don`t know what to do, I need to open image in real size. Maybe you can suggest something? Thanks:)

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              Which way do you consider to be the usual way, then? There are many different ways of displaying an image. Most ways of displaying images are pixel based, though. If you use a pixel based method, it doesn't use the resoltion settings in the image. Then you have calculate the size in pixels that you want the image to have, and resize it. --- b { font-weight: normal; }

              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