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. image subtraction

image subtraction

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

    hello... supposed you have two bitmap images in your form, say bitmap1 and bitmap2... how can you get the difference(image subtraction) of the two images... thank u in advanced....

    J 1 Reply Last reply
    0
    • H htv22

      hello... supposed you have two bitmap images in your form, say bitmap1 and bitmap2... how can you get the difference(image subtraction) of the two images... thank u in advanced....

      J Offline
      J Offline
      johny_d
      wrote on last edited by
      #2

      First, you need to get the dimensions of the bitmaps, then allocate an appropriate array (wid*hei*bpp/8 bytes). Use the GetBitmapBits function to populate the array. Do the same with the second array. Subtract them byte by byte. Use the SetBitmapBits to fill the CBitmap. Live long and in prosper johny74656@gmail.com

      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