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. Copy Portion of Bitmap

Copy Portion of Bitmap

Scheduled Pinned Locked Moved C#
graphicsbeta-testingquestioncode-review
3 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.
  • W Offline
    W Offline
    Wackatronic
    wrote on last edited by
    #1

    I am just wondering if I'm headed in the right direction for this. Could I use the Bitmap.Clone() to specify the area to grab out of an existing image? i.e. Point point = new Point(0 , 0); Size size = new Size( 100, 50 ); Rectangle rect = new Rectangle( point, size ); Bitmap bitmap = new Bitmap.Clone( rect, System.Drawing.Imaging.PixelFormat.DontCare ); Will this get me the portion of the image that starts at 0,0 and has a width of 100 and a height of 50? Any feedback will be greatly appreciated.

    No comment, Mr. Senator

    H C 2 Replies Last reply
    0
    • W Wackatronic

      I am just wondering if I'm headed in the right direction for this. Could I use the Bitmap.Clone() to specify the area to grab out of an existing image? i.e. Point point = new Point(0 , 0); Size size = new Size( 100, 50 ); Rectangle rect = new Rectangle( point, size ); Bitmap bitmap = new Bitmap.Clone( rect, System.Drawing.Imaging.PixelFormat.DontCare ); Will this get me the portion of the image that starts at 0,0 and has a width of 100 and a height of 50? Any feedback will be greatly appreciated.

      No comment, Mr. Senator

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Well, that's what the documentation says. In most cases, I'd trust the documentation. :rolleyes:

      Microsoft MVP, Visual C# My Articles

      1 Reply Last reply
      0
      • W Wackatronic

        I am just wondering if I'm headed in the right direction for this. Could I use the Bitmap.Clone() to specify the area to grab out of an existing image? i.e. Point point = new Point(0 , 0); Size size = new Size( 100, 50 ); Rectangle rect = new Rectangle( point, size ); Bitmap bitmap = new Bitmap.Clone( rect, System.Drawing.Imaging.PixelFormat.DontCare ); Will this get me the portion of the image that starts at 0,0 and has a width of 100 and a height of 50? Any feedback will be greatly appreciated.

        No comment, Mr. Senator

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        I'd go with Heath on this. As a little tip, if there is anything in the documentation that I don't quite understand I build myself a little demonstrator application (5 minutes work) to test my interpretation of the documentation. That way I can see if it works the way I think it does or not, and if not I now have a test platform to work from to see exactly how it is working. I hope this helps.


        "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar Coming soon: The Second EuroCPian Event

        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