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 Load/Save Image in database using VC++ MFC

How to Load/Save Image in database using VC++ MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasecomhelptutorial
8 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
    Sumit Kapoor
    wrote on last edited by
    #1

    Sub : How to Load/Save Image in database using VC++ MFC Hi Guys... Can any body help me... I want to save image in database..but i'm not finding any sample code anywhere... can u provide me..I'll be very thankful to u... So nice of u.. u can send attach-ment at sumit_kapoor1980@hotmail.com Thanks..Sumit ---Sumit Kapoor---

    M 1 Reply Last reply
    0
    • S Sumit Kapoor

      Sub : How to Load/Save Image in database using VC++ MFC Hi Guys... Can any body help me... I want to save image in database..but i'm not finding any sample code anywhere... can u provide me..I'll be very thankful to u... So nice of u.. u can send attach-ment at sumit_kapoor1980@hotmail.com Thanks..Sumit ---Sumit Kapoor---

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      This article[^] with demo sample code. Maxwell Chen

      S 1 Reply Last reply
      0
      • M Maxwell Chen

        This article[^] with demo sample code. Maxwell Chen

        S Offline
        S Offline
        Sumit Kapoor
        wrote on last edited by
        #3

        Thanks for help..Maxwell Chen One thinge more to ask is.. How to handle other Image format..such as JPG, Tiff, Gif etc... I think article is based on Bmp only...What do u say...let me know if u have any idea... Thanks for last reply.. sumit ---Sumit Kapoor---

        M 1 Reply Last reply
        0
        • S Sumit Kapoor

          Thanks for help..Maxwell Chen One thinge more to ask is.. How to handle other Image format..such as JPG, Tiff, Gif etc... I think article is based on Bmp only...What do u say...let me know if u have any idea... Thanks for last reply.. sumit ---Sumit Kapoor---

          M Offline
          M Offline
          Maxwell Chen
          wrote on last edited by
          #4

          No idea, sorry! I am not good in image processing. But there are some articles out there in CodeProject for various image helper classes such as CPictureEx or something. The way to go would be: using different routines to handle different file types in OnSave(), and storing the image (of certain file name extension) with a specific flag in database. For example: TABLE ImageGallery

          [BLOB] - [Type] - [Size]
          {...image A...}, JPEG, 258368
          {...image B...}, TIFF, 8942937

          Maxwell Chen

          S 1 Reply Last reply
          0
          • M Maxwell Chen

            No idea, sorry! I am not good in image processing. But there are some articles out there in CodeProject for various image helper classes such as CPictureEx or something. The way to go would be: using different routines to handle different file types in OnSave(), and storing the image (of certain file name extension) with a specific flag in database. For example: TABLE ImageGallery

            [BLOB] - [Type] - [Size]
            {...image A...}, JPEG, 258368
            {...image B...}, TIFF, 8942937

            Maxwell Chen

            S Offline
            S Offline
            Sumit Kapoor
            wrote on last edited by
            #5

            Hi.. thanks again for reply... Actully I want to save JPEG(I'm particular to JPEG Image Type..So I want help on saving/Loading JPEG Image)... if U find any sample or code Then let me know..I'll be thnaks full to u.. i've added your e-mail in my yahoo messanger... U can chat with me any time... THanks again Bye.. --Sumit Kapoor---

            M M 2 Replies Last reply
            0
            • S Sumit Kapoor

              Hi.. thanks again for reply... Actully I want to save JPEG(I'm particular to JPEG Image Type..So I want help on saving/Loading JPEG Image)... if U find any sample or code Then let me know..I'll be thnaks full to u.. i've added your e-mail in my yahoo messanger... U can chat with me any time... THanks again Bye.. --Sumit Kapoor---

              M Offline
              M Offline
              Miguel Lopes
              wrote on last edited by
              #6

              Take in account that saving images to a database is a terrible principle! Not only the DB gets big in no time, but the process of setting and retrieving images from the database is very slow! The best way is to store the images as files in the disk and then store the path in the database. Of course that can complicate your program, but if speed is a requirement, you should consider NOT saving them to the databse.

              M 1 Reply Last reply
              0
              • M Miguel Lopes

                Take in account that saving images to a database is a terrible principle! Not only the DB gets big in no time, but the process of setting and retrieving images from the database is very slow! The best way is to store the images as files in the disk and then store the path in the database. Of course that can complicate your program, but if speed is a requirement, you should consider NOT saving them to the databse.

                M Offline
                M Offline
                Maxwell Chen
                wrote on last edited by
                #7

                Miguel Lopes wrote: The best way is to store the images as files in the disk and then store the path in the database. Of course that can complicate your program, but if speed is a requirement, you should consider NOT saving them to the databse. I agree with it. This is a better approach! And I guess that Oracle database plays similar tricks with BLOBs. Maxwell Chen

                1 Reply Last reply
                0
                • S Sumit Kapoor

                  Hi.. thanks again for reply... Actully I want to save JPEG(I'm particular to JPEG Image Type..So I want help on saving/Loading JPEG Image)... if U find any sample or code Then let me know..I'll be thnaks full to u.. i've added your e-mail in my yahoo messanger... U can chat with me any time... THanks again Bye.. --Sumit Kapoor---

                  M Offline
                  M Offline
                  Maxwell Chen
                  wrote on last edited by
                  #8

                  Sumit Kapoor wrote: Actully I want to save JPEG(I'm particular to JPEG Image Type..So I want help on saving/Loading JPEG Image)... Try CxImage[^]. It seems good! Sumit Kapoor wrote: i've added your e-mail in my yahoo messanger... U can chat with me any time... I don't use Yahoo messenger though. But do feel free to email me if any I could help. Remember to write the emails with a legitimate title, because of too many spams in Yahoo Mail. :-D Maxwell Chen

                  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