I'm trying to load a jpeg image in my program, and i can't do it.
I try not do an application i want to sell, so i dno't want to use a third party library under restrictive usage like GPL.
So i look for solutions inside standard library, found with windows.
I found 2 solutions, but neither seems to work.
First I try LoadImage, wich i suppose to be a part of win32. LoadImage can load bitmap file without a problem, but doesn't seem ro work with jpeg, and doesn't give an error code that can help me out.
I also try to use OleLoadPicture from the com object IPicture. But i can compile, because i can't define the reference to IID_IPicture.
I'm getting quite hopeless to find a solution. So if someone could help me, i will really appreciate.
Thank you in advance
Franois
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
libjpeg is not gpl and the gpl is the least restrictive license around from a users point of view. i think gdi++ or whatever it is called has support for jpeg and i think there is a way to make directx cough up a jpeg, but other than that you are basically out of luck. fully supporting jpeg is hard even if you know what you are doing. there are a great many libraries but libjpeg has the easiest for comercial aps to cope with as far as i know.
obag
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone
I'm trying to load a jpeg image in my program, and i can't do it.
I try not do an application i want to sell, so i dno't want to use a third party library under restrictive usage like GPL.
So i look for solutions inside standard library, found with windows.
I found 2 solutions, but neither seems to work.
First I try LoadImage, wich i suppose to be a part of win32. LoadImage can load bitmap file without a problem, but doesn't seem ro work with jpeg, and doesn't give an error code that can help me out.
I also try to use OleLoadPicture from the com object IPicture. But i can compile, because i can't define the reference to IID_IPicture.
I'm getting quite hopeless to find a solution. So if someone could help me, i will really appreciate.
Thank you in advance
Franois
libjpeg is not gpl and the gpl is the least restrictive license around from a users point of view. i think gdi++ or whatever it is called has support for jpeg and i think there is a way to make directx cough up a jpeg, but other than that you are basically out of luck. fully supporting jpeg is hard even if you know what you are doing. there are a great many libraries but libjpeg has the easiest for comercial aps to cope with as far as i know.
obag
Obag.
First thank you for helping me
I've read a bit of LibJpeg, and may be i can do something with it, but it seems to work with MSVC. Did anyone use it with dev cpp?
Thank again
Franois
Francois:
you can get a dev-c++ pack for libjpeg here:
http://devpaks.org/list.php?category=Image%20Manipulation
hope this helps!
+ de rien ;)
Well it greatly helps me ( once i use a correct extern "C" ;) .
Many thanks to both of you
Franois