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. FreeImage newbie

FreeImage newbie

Scheduled Pinned Locked Moved C / C++ / MFC
c++debuggingquestion
3 Posts 2 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.
  • T Offline
    T Offline
    tareqsiraj
    wrote on last edited by
    #1

    Hello there, I was looking at the Freeimage article by Markus Loibl. his MFC program works great but i was trying to test it myself using a small application. here is the code.#include < iostream.h > #include < stdlib.h > #include < freeimage.h > void main() { FIBITMAP *dib = FreeImage_Load(FIF_JPEG, "1.jpg", 0); system("pause"); }
    I know it does nothing but shouldnt FreeImage_Load(...) return something? VC says that it returns 0x000... I have included the lib file in my project settings and it compiles ok. the jpg file is in the debug directory with the executable. Any comment would be welcome. Thanks. -Tareq

    L 1 Reply Last reply
    0
    • T tareqsiraj

      Hello there, I was looking at the Freeimage article by Markus Loibl. his MFC program works great but i was trying to test it myself using a small application. here is the code.#include < iostream.h > #include < stdlib.h > #include < freeimage.h > void main() { FIBITMAP *dib = FreeImage_Load(FIF_JPEG, "1.jpg", 0); system("pause"); }
      I know it does nothing but shouldnt FreeImage_Load(...) return something? VC says that it returns 0x000... I have included the lib file in my project settings and it compiles ok. the jpg file is in the debug directory with the executable. Any comment would be welcome. Thanks. -Tareq

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      check what return code signals a successful image load usually 0 signals an OK i did it state


      "there is no spoon"
      biz stuff   about me

      T 1 Reply Last reply
      0
      • L l a u r e n

        check what return code signals a successful image load usually 0 signals an OK i did it state


        "there is no spoon"
        biz stuff   about me

        T Offline
        T Offline
        tareqsiraj
        wrote on last edited by
        #3

        In Markus Loibl's code, it returns some value which is not 0. -Tareq

        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