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. Make a new image from part of image like paint brush does

Make a new image from part of image like paint brush does

Scheduled Pinned Locked Moved C#
tutorial
6 Posts 3 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.
  • _ Offline
    _ Offline
    _tasleem
    wrote on last edited by
    #1

    hi all, i want to make an application just like MS paint,images will be loaded to it and upon selection of part of image it will be saved as new file, but only one part of image not full image file,i was able to select the part of image but how to copy/make a new image file from selected image part and save to disk or draw it again,

    Regards. Tasleem Arif

    C M 2 Replies Last reply
    0
    • _ _tasleem

      hi all, i want to make an application just like MS paint,images will be loaded to it and upon selection of part of image it will be saved as new file, but only one part of image not full image file,i was able to select the part of image but how to copy/make a new image file from selected image part and save to disk or draw it again,

      Regards. Tasleem Arif

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

      You can use the Bitmap constructor to create a new bitmap that is part of the old one

      Christian Graus - Microsoft MVP - C++ "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
      • _ _tasleem

        hi all, i want to make an application just like MS paint,images will be loaded to it and upon selection of part of image it will be saved as new file, but only one part of image not full image file,i was able to select the part of image but how to copy/make a new image file from selected image part and save to disk or draw it again,

        Regards. Tasleem Arif

        M Offline
        M Offline
        Michael Sync
        wrote on last edited by
        #3

        You don't need to develop your own MS-paint-like software.. You can use the opensource Paint.NET.. http://www.getpaint.net/download.html

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

        1 Reply Last reply
        0
        • C Christian Graus

          You can use the Bitmap constructor to create a new bitmap that is part of the old one

          Christian Graus - Microsoft MVP - C++ "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 )

          _ Offline
          _ Offline
          _tasleem
          wrote on last edited by
          #4

          it creates the new image and resize it but,i want to create the new image from part of image not resize orignal image.

          Regards. Tasleem Arif

          C 1 Reply Last reply
          0
          • _ _tasleem

            it creates the new image and resize it but,i want to create the new image from part of image not resize orignal image.

            Regards. Tasleem Arif

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

            OK, then create a graphics object from a bitmap the right size and draw the fragment onto it.

            Christian Graus - Microsoft MVP - C++ "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
            • C Christian Graus

              OK, then create a graphics object from a bitmap the right size and draw the fragment onto it.

              Christian Graus - Microsoft MVP - C++ "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 )

              _ Offline
              _ Offline
              _tasleem
              wrote on last edited by
              #6

              thanks it did worked

              Regards. Tasleem Arif

              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