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 to create a file

how to create a file

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicstutorial
10 Posts 3 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.
  • S Offline
    S Offline
    sunita ramesh
    wrote on last edited by
    #1

    Hi, I have these coding in my vc++ project.In this,bitmap m_pdib is converted in to jpeg and this jpeg image is shown in the videoplayer. m_pdib.GetJpgData(1,true); m_pdib.DispTODC(1, true); I want to store this converted jpeg image into a file.How to create a file and store this jpeg image sunita ramesh -- modified at 3:09 Friday 5th May, 2006

    H 1 Reply Last reply
    0
    • S sunita ramesh

      Hi, I have these coding in my vc++ project.In this,bitmap m_pdib is converted in to jpeg and this jpeg image is shown in the videoplayer. m_pdib.GetJpgData(1,true); m_pdib.DispTODC(1, true); I want to store this converted jpeg image into a file.How to create a file and store this jpeg image sunita ramesh -- modified at 3:09 Friday 5th May, 2006

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

      Can you be more specific

      S 1 Reply Last reply
      0
      • H Hamid Taebi

        Can you be more specific

        S Offline
        S Offline
        sunita ramesh
        wrote on last edited by
        #3

        I have a newly desinged cam file in which image files are stored in the form of bitmap.This bitmap is retrived & converted in to jpeg image and then it is displayed in the video player.(it is an Active control ). Everytime to play the video,i call this function,Playwave(int picno). for displaying this image,i call m_pdib.GetJpegData(1,true) and m_pdib.DispTODC(1,true). I want to store this jpeg image in a folder. How to do that. sunita

        R 1 Reply Last reply
        0
        • S sunita ramesh

          I have a newly desinged cam file in which image files are stored in the form of bitmap.This bitmap is retrived & converted in to jpeg image and then it is displayed in the video player.(it is an Active control ). Everytime to play the video,i call this function,Playwave(int picno). for displaying this image,i call m_pdib.GetJpegData(1,true) and m_pdib.DispTODC(1,true). I want to store this jpeg image in a folder. How to do that. sunita

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

          If you could put the image on a DC or on a CBitmap object you can solve your problem using the class CImage. It has the Save function that automatically convert the image in many file format (jpg gif png bmp). Hope this helps.

          S 1 Reply Last reply
          0
          • R Russell

            If you could put the image on a DC or on a CBitmap object you can solve your problem using the class CImage. It has the Save function that automatically convert the image in many file format (jpg gif png bmp). Hope this helps.

            S Offline
            S Offline
            sunita ramesh
            wrote on last edited by
            #5

            thanks for ur reply. Do i need to add class cImage. How to do this.. Can u please explain me in detail. sunita ramesh

            H 2 Replies Last reply
            0
            • S sunita ramesh

              thanks for ur reply. Do i need to add class cImage. How to do this.. Can u please explain me in detail. sunita ramesh

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

              DEFINE_GUID(ImageFormatJPEG, 0xb96b3cae,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); CImage m_Image; m_Image.Attach(hbitmap handle); m_Image.Save(yourfile,ImageFormatJPEG); m_Image.Detach();

              1 Reply Last reply
              0
              • S sunita ramesh

                thanks for ur reply. Do i need to add class cImage. How to do this.. Can u please explain me in detail. sunita ramesh

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

                I think your problem is write file(jpeg) But I suggest if you can convert bitmap to jpeg use to write data jpeg to file instead use CImage

                S 1 Reply Last reply
                0
                • H Hamid Taebi

                  I think your problem is write file(jpeg) But I suggest if you can convert bitmap to jpeg use to write data jpeg to file instead use CImage

                  S Offline
                  S Offline
                  sunita ramesh
                  wrote on last edited by
                  #8

                  thats wat my problem. Can u please explain how to put jpeg data in a file. sunita ramesh

                  H 1 Reply Last reply
                  0
                  • S sunita ramesh

                    thats wat my problem. Can u please explain how to put jpeg data in a file. sunita ramesh

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

                    for write jpeg data to file you can see this link http://www.codeproject.com/bitmap/cximage.asp I hope that helps you

                    S 1 Reply Last reply
                    0
                    • H Hamid Taebi

                      for write jpeg data to file you can see this link http://www.codeproject.com/bitmap/cximage.asp I hope that helps you

                      S Offline
                      S Offline
                      sunita ramesh
                      wrote on last edited by
                      #10

                      Thanks for ur reply Already I display the image using m_pdib.GetJpgData(1,true); m_pdib.DispTODC(1,true); 1 is nothing but jpeg image1.similarly if i put 2 means i get second image. So can't i able to store this image in a file by adding few lines instead of using a new class. sunita ramesh -- modified at 5:43 Friday 5th May, 2006

                      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