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. Zooming an image

Zooming an image

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

    I am having a form with a textbox and a button..the text box has the value of Zoom In percent..Say for instance 40..When the button is clicked...an image is to be zoomed(for 40%)..How cani do this? Any Clues? or if you have savings of code pl do send..wud b lot helpful.Thanks :)

    G C A 3 Replies Last reply
    0
    • M Macorina

      I am having a form with a textbox and a button..the text box has the value of Zoom In percent..Say for instance 40..When the button is clicked...an image is to be zoomed(for 40%)..How cani do this? Any Clues? or if you have savings of code pl do send..wud b lot helpful.Thanks :)

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Arun80403 wrote:

      Any Clues?

      Use Search.

      Giorgi Dalakishvili #region signature my articles #endregion

      L 1 Reply Last reply
      0
      • G Giorgi Dalakishvili

        Arun80403 wrote:

        Any Clues?

        Use Search.

        Giorgi Dalakishvili #region signature my articles #endregion

        L Offline
        L Offline
        Luckie
        wrote on last edited by
        #3

        cudnt find any...

        Don't try to make someone love you..Try to be the one who can be loved...

        G 1 Reply Last reply
        0
        • L Luckie

          cudnt find any...

          Don't try to make someone love you..Try to be the one who can be loved...

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          Then read this: How to use google and other tips for finding programming help[^]

          Giorgi Dalakishvili #region signature my articles #endregion

          1 Reply Last reply
          0
          • M Macorina

            I am having a form with a textbox and a button..the text box has the value of Zoom In percent..Say for instance 40..When the button is clicked...an image is to be zoomed(for 40%)..How cani do this? Any Clues? or if you have savings of code pl do send..wud b lot helpful.Thanks :)

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            you zoom an image by drawing it bigger - look at the DrawImage overloads on the Graphics class that let you specify the area to draw AND the area to draw it to.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            1 Reply Last reply
            0
            • M Macorina

              I am having a form with a textbox and a button..the text box has the value of Zoom In percent..Say for instance 40..When the button is clicked...an image is to be zoomed(for 40%)..How cani do this? Any Clues? or if you have savings of code pl do send..wud b lot helpful.Thanks :)

              A Offline
              A Offline
              Anthony Mushrow
              wrote on last edited by
              #6

              So yeah, like Chris said, use the DrawImage overloads. To zoom 40% you need to multiply the width of the image by 0.4, so something like DrawImage???(myImage, myImage.Width*0.4...); I'm not sure on what the overloads actually are, or what parameters they take. You will of course be needing to draw the image yourself, rather than using a pictureBox.

              My current favourite word is: Bacon!

              -SK Genius

              Game Programming articles start -here[^]-

              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