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. loading a bitmap file

loading a bitmap file

Scheduled Pinned Locked Moved C#
graphicshelptutorial
9 Posts 7 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.
  • D Offline
    D Offline
    diddy34
    wrote on last edited by
    #1

    well guys, i still haven't got any reply to my dying need of the code on how to load and display and save a bitmap file. If anybody can hear and see me , please help me out. :-{

    tony-yeyo

    R 1 Reply Last reply
    0
    • D diddy34

      well guys, i still haven't got any reply to my dying need of the code on how to load and display and save a bitmap file. If anybody can hear and see me , please help me out. :-{

      tony-yeyo

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      Hi,

      Bitmap b = new Bitmap("C:\\MyPicture.bmp"); //Load
      pictureBox.Image = b; //Display
      b.Save("C:\\MyNewPicture.bmp"); //Save

      The second line assumes you have a PictureBox placed on your form/control.

      Y D 2 Replies Last reply
      0
      • R Robert Rohde

        Hi,

        Bitmap b = new Bitmap("C:\\MyPicture.bmp"); //Load
        pictureBox.Image = b; //Display
        b.Save("C:\\MyNewPicture.bmp"); //Save

        The second line assumes you have a PictureBox placed on your form/control.

        Y Offline
        Y Offline
        yueue
        wrote on last edited by
        #3

        youe'd better to learn some lirbary classes for c#

        M 1 Reply Last reply
        0
        • Y yueue

          youe'd better to learn some lirbary classes for c#

          M Offline
          M Offline
          mav northwind
          wrote on last edited by
          #4

          And you'd better learn to answer to the correct message. I'm quite sure Robert Rohde does have detailled knowledge of "some lirbary classes"...;P

          Regards, mav -- Black holes are the places where god divided by 0...

          Y 1 Reply Last reply
          0
          • R Robert Rohde

            Hi,

            Bitmap b = new Bitmap("C:\\MyPicture.bmp"); //Load
            pictureBox.Image = b; //Display
            b.Save("C:\\MyNewPicture.bmp"); //Save

            The second line assumes you have a PictureBox placed on your form/control.

            D Offline
            D Offline
            diddy34
            wrote on last edited by
            #5

            I know that it sounds stupid to ask for the whole code,but I need that just for this first time and i promise not to be like this. So can u give me the whole code on a user interface with a picture box and 3 buttons that loads, displays and saves a bitmap file. Thanks :-)

            tony-yeyo

            C D L 3 Replies Last reply
            0
            • D diddy34

              I know that it sounds stupid to ask for the whole code,but I need that just for this first time and i promise not to be like this. So can u give me the whole code on a user interface with a picture box and 3 buttons that loads, displays and saves a bitmap file. Thanks :-)

              tony-yeyo

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

              The code you've been given will do what you asked. The user interface to make it work is so trivial that if you can't do it, you deserve to fail your class. Giving it to you would be doing you a disservice, and would be doing an even bigger disservice to the rest of your class, who I presume have paid attention.

              Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

              1 Reply Last reply
              0
              • D diddy34

                I know that it sounds stupid to ask for the whole code,but I need that just for this first time and i promise not to be like this. So can u give me the whole code on a user interface with a picture box and 3 buttons that loads, displays and saves a bitmap file. Thanks :-)

                tony-yeyo

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                diddy34 wrote:

                and i promise not to be like this

                Too late! You already are! If you can't drag and drop a couple of controls on a form, what makes you think you'll be able to do it next time? -- modified at 7:48 Thursday 3rd August, 2006

                Dave Kreskowiak Microsoft MVP - Visual Basic

                1 Reply Last reply
                0
                • M mav northwind

                  And you'd better learn to answer to the correct message. I'm quite sure Robert Rohde does have detailled knowledge of "some lirbary classes"...;P

                  Regards, mav -- Black holes are the places where god divided by 0...

                  Y Offline
                  Y Offline
                  yueue
                  wrote on last edited by
                  #8

                  yes , sorry . and i am a chinese fans. so ... my english is poor . sorry

                  1 Reply Last reply
                  0
                  • D diddy34

                    I know that it sounds stupid to ask for the whole code,but I need that just for this first time and i promise not to be like this. So can u give me the whole code on a user interface with a picture box and 3 buttons that loads, displays and saves a bitmap file. Thanks :-)

                    tony-yeyo

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

                    First : learn how to open Visual Studio Second : learn how to drag and drop control to form Third : try to write the code of your own Fourth : Problem?? Ask CP. You are now just finishing number ONE, go to number TWO, not number FOUR.

                    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