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. Saving a bitmap image in visual C++ 2003

Saving a bitmap image in visual C++ 2003

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

    I want to save a bitmap image in Visual C++ 2003.I use the save method of the bitmap class of Gdiplus this way: Gdiplus :: bitmap mybitmap; mybitmap.save (L"C:\myFolder\",&bmpClsid); But I get a win32Error. Thanks in advance.

    H R 2 Replies Last reply
    0
    • M MozhdehQeraati

      I want to save a bitmap image in Visual C++ 2003.I use the save method of the bitmap class of Gdiplus this way: Gdiplus :: bitmap mybitmap; mybitmap.save (L"C:\myFolder\",&bmpClsid); But I get a win32Error. Thanks in advance.

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

      Did you try with CImage class? it has save method.

      M 1 Reply Last reply
      0
      • H Hamid Taebi

        Did you try with CImage class? it has save method.

        M Offline
        M Offline
        MozhdehQeraati
        wrote on last edited by
        #3

        I want to use GDIPlus:: Image.

        1 Reply Last reply
        0
        • M MozhdehQeraati

          I want to save a bitmap image in Visual C++ 2003.I use the save method of the bitmap class of Gdiplus this way: Gdiplus :: bitmap mybitmap; mybitmap.save (L"C:\myFolder\",&bmpClsid); But I get a win32Error. Thanks in advance.

          R Offline
          R Offline
          Rajkumar R
          wrote on last edited by
          #4

          MozhdehQeraati wrote:

          mybitmap.save (L"C:\myFolder\",&bmpClsid);

          file path error? something like L"C:\\myFolder\\image1.bmp"

          M 1 Reply Last reply
          0
          • R Rajkumar R

            MozhdehQeraati wrote:

            mybitmap.save (L"C:\myFolder\",&bmpClsid);

            file path error? something like L"C:\\myFolder\\image1.bmp"

            M Offline
            M Offline
            MozhdehQeraati
            wrote on last edited by
            #5

            i Test with this format but get win32error.

            P R 2 Replies Last reply
            0
            • M MozhdehQeraati

              i Test with this format but get win32error.

              P Offline
              P Offline
              Prasanth M V
              wrote on last edited by
              #6

              :) Hi, Did u start the GDI + engine? ULONG_PTR m_gdiplusToken; GdiplusStartupInput gdiplusStartupInput; GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL); Bitmap *pBitmap = Bitmap::FromFile(/*File name*/); CLSID Clsid = {0}; GetEncoderClsid(L"image/bmp", &Clsid)) CString strFilePath = "C://1.bmp"; pBitmap->Save(strFilePath.AllocSysString(),&Clsid); GdiplusShutdown(m_gdiplusToken); Prasanth M V Software Engineer.

              1 Reply Last reply
              0
              • M MozhdehQeraati

                i Test with this format but get win32error.

                R Offline
                R Offline
                Rajkumar R
                wrote on last edited by
                #7

                I would like to know the value of win32 error.

                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