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. Loading JPEG or PNG images...

Loading JPEG or PNG images...

Scheduled Pinned Locked Moved C / C++ / MFC
questioncom
5 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.
  • P Offline
    P Offline
    puzzolino
    wrote on last edited by
    #1

    Hi ! MSDN states that: <> But how can I load a JPEG or PNG image ? Can I do it without using COM ?

    B B 2 Replies Last reply
    0
    • P puzzolino

      Hi ! MSDN states that: <> But how can I load a JPEG or PNG image ? Can I do it without using COM ?

      B Offline
      B Offline
      Bartosz Bien
      wrote on last edited by
      #2

      The very best way IMHO is to use GDI+. Regards, BB

      1 Reply Last reply
      0
      • P puzzolino

        Hi ! MSDN states that: <> But how can I load a JPEG or PNG image ? Can I do it without using COM ?

        B Offline
        B Offline
        Big Art
        wrote on last edited by
        #3

        If you are using VC++7 (MFC) you can use the new MFC class CImage. It allows you to load and manipulate JPG, PNG, GIF, BMP formats. Very simple. Art

        P 1 Reply Last reply
        0
        • B Big Art

          If you are using VC++7 (MFC) you can use the new MFC class CImage. It allows you to load and manipulate JPG, PNG, GIF, BMP formats. Very simple. Art

          P Offline
          P Offline
          puzzolino
          wrote on last edited by
          #4

          I'm not using MFC at all. I only searched through the documentation on StretchDIBits and other bitmap API functions which reads: Windows 98/Me, Windows 2000/XP: StretchDIBits has been extended to allow a JPEG or PNG image to be passed as the source image. So I was wondering how to pass a JPEG pr PNG image to this function, maybe I can read from the disk ???? :omg:

          B 1 Reply Last reply
          0
          • P puzzolino

            I'm not using MFC at all. I only searched through the documentation on StretchDIBits and other bitmap API functions which reads: Windows 98/Me, Windows 2000/XP: StretchDIBits has been extended to allow a JPEG or PNG image to be passed as the source image. So I was wondering how to pass a JPEG pr PNG image to this function, maybe I can read from the disk ???? :omg:

            B Offline
            B Offline
            Big Art
            wrote on last edited by
            #5

            If not using MFC then I would suggest using GDI+ as was already suggested. Image::FromFile("PathToYourImage.jpg"); Art

            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