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 / C++ / MFC
  4. GDI+ Image clone

GDI+ Image clone

Scheduled Pinned Locked Moved C / C++ / MFC
graphicswinformshelpquestion
1 Posts 1 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.
  • H Offline
    H Offline
    Hesham Desouky
    wrote on last edited by
    #1

    Hi all Will I am using GDI+ to manipulate images. I am having this strange behaviour with Bitmap::Clone() function. When I create a Clone from an Image object, and then try to LockBits for the cloned image, I get invalid pointer. I did a workarround for this: Bitmap* p_new_image = new Bitmap(p_src_image->GetWidth(),p_src_image->GetHeight(),p_src_image->GetPixlFormat()); Graphics* p_graphics = Graphics::FromImage(p_new_image); p_graphics->DrawImage(p_src_image,0,0); delete p_graphics; will this code is working with LockBits very fine. The documentation for the clone function is not clear, is this a bug in the Clone function, or I didnt understad the Clone function will? Regards Hesahm Hesham

    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