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. bmp and jpg

bmp and jpg

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 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.
  • G Offline
    G Offline
    gongming
    wrote on last edited by
    #1

    i want to know how to transform bmp file to jpg file, and jpg file to bmp. Can you give me some information and source code about these? thank you.:((

    C P N 3 Replies Last reply
    0
    • G gongming

      i want to know how to transform bmp file to jpg file, and jpg file to bmp. Can you give me some information and source code about these? thank you.:((

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      GDI+ will do this for you. Otherwise, the source code is way too big to post here. Download paintlib or something if you must. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

      1 Reply Last reply
      0
      • G gongming

        i want to know how to transform bmp file to jpg file, and jpg file to bmp. Can you give me some information and source code about these? thank you.:((

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

        BMP to JPG:- Graphics graphics(hdc); Image image(L"Mosaic.bmp"); graphics.DrawImage(&image, 10, 10); CLSID pngClsid; GetEncoderClsid(L"image/jpg", &pngClsid); image.Save(L"pubudu.jpg", &pngClsid, NULL); :)

        1 Reply Last reply
        0
        • G gongming

          i want to know how to transform bmp file to jpg file, and jpg file to bmp. Can you give me some information and source code about these? thank you.:((

          N Offline
          N Offline
          NewtonOfComputers
          wrote on last edited by
          #4

          There is no direct method to do it in VC++. U can easily do it using GDI+. Instead that if u want to do it in VC++ itself, then go for Intel Graphics Library. Add it to ur project. This is one of the way we have to do that. http://developer.intel.com/software/products/perflib/ijl/ and u can check this in CP also http://www.codeproject.com/bitmap/CXImage.asp#options and other freeimage libraries can be helpfull to u. ComputerNewton

          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