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. is is posible to store GIF as resource?

is is posible to store GIF as resource?

Scheduled Pinned Locked Moved C / C++ / MFC
questionlearning
9 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.
  • V Offline
    V Offline
    vgrigor
    wrote on last edited by
    #1

    that is - to get picture without writing into the file. But- To get as file or as picture. thanks.

    L P 2 Replies Last reply
    0
    • V vgrigor

      that is - to get picture without writing into the file. But- To get as file or as picture. thanks.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      If you store the picture as a binary resource, then use the appropriate GIF loading mechanism on the binary resource, you should be able to obtain a HBITMAP that'll let you display the pic. Have no idea where to get the code to load the GIF file though, someone did give it to me years ago, but not sure where they got it from :) Alan.

      1 Reply Last reply
      0
      • V vgrigor

        that is - to get picture without writing into the file. But- To get as file or as picture. thanks.

        P Offline
        P Offline
        PengFeidu
        wrote on last edited by
        #3

        Maybe CMemFile help you. pengfeidu

        V 1 Reply Last reply
        0
        • P PengFeidu

          Maybe CMemFile help you. pengfeidu

          V Offline
          V Offline
          vgrigor
          wrote on last edited by
          #4

          CMemFile -good Idea. Need comments how they are used by file name. ____________ Especially need to sabe - differently formatted files- but not only pictures in most expensive form.

          P 1 Reply Last reply
          0
          • V vgrigor

            CMemFile -good Idea. Need comments how they are used by file name. ____________ Especially need to sabe - differently formatted files- but not only pictures in most expensive form.

            P Offline
            P Offline
            PengFeidu
            wrote on last edited by
            #5

            CMemFile is the CFile-derived class But supports memory files . if you want particular content, press "CMemFile" in the index cote of MSDN. the article is detailed in msdn. dupengfei

            V 1 Reply Last reply
            0
            • P PengFeidu

              CMemFile is the CFile-derived class But supports memory files . if you want particular content, press "CMemFile" in the index cote of MSDN. the article is detailed in msdn. dupengfei

              V Offline
              V Offline
              vgrigor
              wrote on last edited by
              #6

              I find that file can be created, but how API methods can access it?

              P 1 Reply Last reply
              0
              • V vgrigor

                I find that file can be created, but how API methods can access it?

                P Offline
                P Offline
                PengFeidu
                wrote on last edited by
                #7

                CMemFile fMem; LPBYTE lpByte = fMem.Detach(); after create the memory file , you can use this function "Detch" to get the pointer to file. then operator it with pointer freely. dupengfei

                L 1 Reply Last reply
                0
                • P PengFeidu

                  CMemFile fMem; LPBYTE lpByte = fMem.Detach(); after create the memory file , you can use this function "Detch" to get the pointer to file. then operator it with pointer freely. dupengfei

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Also, make sure you are aware of the legal patenting laws that surround Lempel Ziv Welch (LZW) compression technique used in GIF, which supposedly expired on June 19 2003, whether they have renewed it I'm not sure, but just a thought if your doing this for a company or something :). Check this link out for further info http://msdn.microsoft.com/msdnmag/issues/02/03/c/ Alan.

                  J 1 Reply Last reply
                  0
                  • L Lost User

                    Also, make sure you are aware of the legal patenting laws that surround Lempel Ziv Welch (LZW) compression technique used in GIF, which supposedly expired on June 19 2003, whether they have renewed it I'm not sure, but just a thought if your doing this for a company or something :). Check this link out for further info http://msdn.microsoft.com/msdnmag/issues/02/03/c/ Alan.

                    J Offline
                    J Offline
                    JWood
                    wrote on last edited by
                    #9

                    If you check out CxImage Library here on this site there http://www.codeproject.com/bitmap/cximage.asp There is an example of this in the demo. Like Dangleberry said, outside the US, GIF is subject to patents until the middle of 2004.

                    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