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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Flip an image

Flip an image

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
6 Posts 4 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
    anjita
    wrote on last edited by
    #1

    I am displaying an image using dib class . now i wish to flip my image horizontally as well as vertically ::StretchDIBits(pDC->m_hDC, // hDC lpDCRect->left, // DestX lpDCRect->top, // DestY RECTWIDTH(lpDCRect), // nDestWidth RECTHEIGHT(lpDCRect), // nDestHeight lpDIBRect->left, // SrcX lpDIBRect->top, // SrcY m_pBMI->bmiHeader.biWidth,//RECTWIDTH(lpDIBRect), // wSrcWidth RECTHEIGHT(lpDIBRect), // wSrcHeight m_pBits, // lpBits m_pBMI, // lpBitsInfo DIB_RGB_COLORS, // wUsage SRCCOPY); // dwROP As per MSDN Documents i am changing the sign also but i am unable to get th desird result Please if someone could help me out I am new to vc++ -- modified at 6:26 Friday 19th May, 2006

    S N H 3 Replies Last reply
    0
    • A anjita

      I am displaying an image using dib class . now i wish to flip my image horizontally as well as vertically ::StretchDIBits(pDC->m_hDC, // hDC lpDCRect->left, // DestX lpDCRect->top, // DestY RECTWIDTH(lpDCRect), // nDestWidth RECTHEIGHT(lpDCRect), // nDestHeight lpDIBRect->left, // SrcX lpDIBRect->top, // SrcY m_pBMI->bmiHeader.biWidth,//RECTWIDTH(lpDIBRect), // wSrcWidth RECTHEIGHT(lpDIBRect), // wSrcHeight m_pBits, // lpBits m_pBMI, // lpBitsInfo DIB_RGB_COLORS, // wUsage SRCCOPY); // dwROP As per MSDN Documents i am changing the sign also but i am unable to get th desird result Please if someone could help me out I am new to vc++ -- modified at 6:26 Friday 19th May, 2006

      S Offline
      S Offline
      Sarath C
      wrote on last edited by
      #2

      have u tried this flag in your code? DSTINVERT -Sarath

      A 1 Reply Last reply
      0
      • S Sarath C

        have u tried this flag in your code? DSTINVERT -Sarath

        A Offline
        A Offline
        anjita
        wrote on last edited by
        #3

        No this is not helping by doing this i can see only the black box in the destination

        1 Reply Last reply
        0
        • A anjita

          I am displaying an image using dib class . now i wish to flip my image horizontally as well as vertically ::StretchDIBits(pDC->m_hDC, // hDC lpDCRect->left, // DestX lpDCRect->top, // DestY RECTWIDTH(lpDCRect), // nDestWidth RECTHEIGHT(lpDCRect), // nDestHeight lpDIBRect->left, // SrcX lpDIBRect->top, // SrcY m_pBMI->bmiHeader.biWidth,//RECTWIDTH(lpDIBRect), // wSrcWidth RECTHEIGHT(lpDIBRect), // wSrcHeight m_pBits, // lpBits m_pBMI, // lpBitsInfo DIB_RGB_COLORS, // wUsage SRCCOPY); // dwROP As per MSDN Documents i am changing the sign also but i am unable to get th desird result Please if someone could help me out I am new to vc++ -- modified at 6:26 Friday 19th May, 2006

          N Offline
          N Offline
          NiceNaidu fo
          wrote on last edited by
          #4

          Chck this link. http://www.codeguru.com/forum/archive/index.php/t-104069.html[^] Appu.. "If you judge people, you have no time to love them."

          A 1 Reply Last reply
          0
          • A anjita

            I am displaying an image using dib class . now i wish to flip my image horizontally as well as vertically ::StretchDIBits(pDC->m_hDC, // hDC lpDCRect->left, // DestX lpDCRect->top, // DestY RECTWIDTH(lpDCRect), // nDestWidth RECTHEIGHT(lpDCRect), // nDestHeight lpDIBRect->left, // SrcX lpDIBRect->top, // SrcY m_pBMI->bmiHeader.biWidth,//RECTWIDTH(lpDIBRect), // wSrcWidth RECTHEIGHT(lpDIBRect), // wSrcHeight m_pBits, // lpBits m_pBMI, // lpBitsInfo DIB_RGB_COLORS, // wUsage SRCCOPY); // dwROP As per MSDN Documents i am changing the sign also but i am unable to get th desird result Please if someone could help me out I am new to vc++ -- modified at 6:26 Friday 19th May, 2006

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            maybe it is some helpful to you Add fast user-extensible image processing support to CBitmap[^]_**


            **_

            whitesky


            1 Reply Last reply
            0
            • N NiceNaidu fo

              Chck this link. http://www.codeguru.com/forum/archive/index.php/t-104069.html[^] Appu.. "If you judge people, you have no time to love them."

              A Offline
              A Offline
              anjita
              wrote on last edited by
              #6

              Thanks a lot this solved my problem

              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