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. How can i concate two bitmap to produce third combine bitmap

How can i concate two bitmap to produce third combine bitmap

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialcsharpgraphicsquestion
2 Posts 2 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.
  • A Offline
    A Offline
    Atif Mushtaq
    wrote on last edited by
    #1

    Hello guys can i combine two bitmaps to produce a third combined bitmap . for example if i have two images of 160*120 then resultant bitmap will of 320*240 size , which will be displaying two bitmaps side by side in on image . so can any body guide me how to do this. Unmanaged in a .NET world

    T 1 Reply Last reply
    0
    • A Atif Mushtaq

      Hello guys can i combine two bitmaps to produce a third combined bitmap . for example if i have two images of 160*120 then resultant bitmap will of 320*240 size , which will be displaying two bitmaps side by side in on image . so can any body guide me how to do this. Unmanaged in a .NET world

      T Offline
      T Offline
      Tom Larsen
      wrote on last edited by
      #2

      Wouldn't the resultant bitmap be 320 x 120? I'm also assuming the depth is the same on both. Allocate the size of the bitmap and use trusty old BitBlt.

      // leftDC and rightDC are the two drawing contexts on the images to combine.
      // memDC is the DC on the combination image.
      BitBlt(memDC,0,0,160,120,
      leftDC,0,0,SRCCOPY);
      BitBllt(memDC,161,0,320,120,
      rightDC,0,0,SRCCOPY);

      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