-
Image Library
I was wondering what are some prefered image libraries to load jpeg files. I'm currently using allegro and jpgalleg. I dont like this setup because when I save the jpg, I lose quailty or the filesize increases. I tried vigra, but when the program wouldnt load. It would compile okay, but when the program reached the vigra::ImportImageInfo step of the program, the program quit. All I need to be able to do is retrieve the width and height in pixels of jpeg images, determine if the image is a jpeg file or not, and save the jpeg where the filesize decreases without the quality descreasing (like if you open a jpeg image in paint and hit save, the filesize decreases and the quality doesnt decrease).
Thanks in advance for any help.
-
gdi, gdi+ from microsoft
FreeImage library from sourceforge
Kuphryn
-
I could never compile gdi+ and when I asked what I was doing wrong, no one responded so I gave up on gdi+.
-
Try CxImage Libraries
It's a bit of a pain the include in your project but once you have it's very straight forward.
It allows you load bmps,jpegs,gifs etc... rotate, crop, resize... and then save as any format.
converting a bitmap file into a jpeg can be done with 3 lines of code.
http://www.codeproject.com/bitmap/cximage.asp
-
>> I could never compile gdi+ and when I asked what I
>> was doing wrong, no one responded so I gave up on gdi+.
No, gdi and gdi+ are very good and simple (They require nothing windows doesn't come with either.), They are my primary use and I know I'm not an expert programmer.
-
For me, gdi+ isnt simple because I get like a million EmfPlusRecordType errors when I try to compile it and I cant figure out why.
spacecadet, thanks for the information on that library. I will look into it.
-
For most of my errors I usually have, GOOGLE helped me out. If it didn't, then I asked the forums.
A little search showed, that you haven't asked anything about EmfPlusRecordType errors in these forums.
-
http://cboard.cprogramming.com/showthread.php?t=79782
Thats the thread I was talking about, but it seems like a couple users did reply to it, so that was my bad for saying that no one did.
EDIT:
I'm using Dev-C++ which I think is the problem I cant compile gdi+.
-
Maybe search didn't search in the code tags, sorry.
If you download the mingw package, you will get all the necessary and newest header and library files (in correct format .a).