No MFC just API,but i don't know how to put a jpg image in a window.....help!!!!
No MFC just API,but i don't know how to put a jpg image in a window.....help!!!!
Well, normal windows GDI functions can ONLY read in bitmaps with palettes, so normally, this wouldn't be possible unless you wanted to cod ehte reading/writing yourself, or you got a 3rd party graphics library.Originally posted by kaas
No MFC just API,but i don't know how to put a jpg image in a window.....help!!!!
However, with GDI+, MS has added support for the JPG format. See
http://www.codeguru.com/gdi/GDIPlus.html
for general information on how to get this working for you. Note that you'll need to make small changes to the example code to get it to compile outside of MSVC (mainly changing how you tell the compiler to link the necessary library) but this should put you on the right track, anyway.
You should look into DevIL (Developers Image Library), its targeted for the gamers, but it could work for you. If you can get it to work it can load and apply filters to any image format there is.
DevIL
Someone asked this before.
If you search through the threads you should be able to find links two more jpg libaries.
thanks anyway
but i don't want to use a dll ,it just not include in the windows system.i am finding a diffucult way,a classical method to do this.
thanks... maybe some api can do this such as SetDIBitsToDevice,
StretchDIBits,OleLoadPicture....
There IS none. GDI+ is the closest to a "classical method" there is -- this actually DOES ship on newer MS OS's, but if you're using traditional WinAPI GDI commands, the one and only format you can read without coding yourself is an paletted BMP.Originally posted by kaas
thanks anyway
but i don't want to use a dll ,it just not include in the windows system.i am finding a diffucult way,a classical method to do this.
thanks... maybe some api can do this such as SetDIBitsToDevice,
StretchDIBits,OleLoadPicture....
GDI+ was specifically designed, among other things, to address this issue.