Jump to content
  • Advertisement
Sign in to follow this  
sathenzar

C++ and an Image lib?

This topic is 4816 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone. I was wondering if there was a quick libarary that allows you to quily edit images (such as size, format, etc..) My language is C++. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
IMHO ImageMagick is not a good image library...ImageMagick is THE Image Library :)

It is very complete, powerful and widely used in different environments (from C++ to php, from Windows to Linux)...but I found it quite hard to setup. Be warned.
But there is nothing like this.

A very good alternative is FreeImage
The lib is cross platform, very fast and obviously OpenSource and supports almost every fileformat and imageformat. Simple to setup and well documented. I like it!
There is also a C++ wrapper (FreeImagePlus) for the lib itself.

If you prefer something simpler ( are you so lazy? :) ) I can suggest you DevIL (aka OpenIL). Very simple. My second image lib choice.

The third alternative, I used it for a while, is CxImage
Pros: interesting and nice DSP functions. You can reduce the lib size if you dont need some features.
Also this lib is OpenSource (zlib license)

The last choice is SDL_Image
Can be interesting if you use SDL itself.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
hey guys, do any of these libs make use of "advanced" cpu features such as mmx?

i've tried CxImage and from what i could tell of the code, and the slow execution times, it didn't. what i'm looking for is a portable lib that compares in speed and quality to GDI+'s image rotation and image stretching capabilities.

also, any of you tried any of the libs animated gif capabilities? again, CxImage takes forever to load an animated gif since it restarts from the beginning of the stream for each subsequent frame. and there's no easy way to mod the code due to the coding style used.

Share this post


Link to post
Share on other sites
Thank you for the help. I think I will be using freeImage. Now my only question
is how would I resize an image? I read the documentation and maybe I'm missing somthing but I can't see where they're telling me how to. Any ideas? Thanks again.

Share this post


Link to post
Share on other sites
Quote:
Original post by sathenzar
Thank you for the help. I think I will be using freeImage. Now my only question
is how would I resize an image? I read the documentation and maybe I'm missing somthing but I can't see where they're telling me how to. Any ideas? Thanks again.


Read it @ Toolkit function reference / Upsampling and downsampling => FreeImage_Rescale (pag 67)

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
hey guys, do any of these libs make use of "advanced" cpu features such as mmx?

i've tried CxImage and from what i could tell of the code, and the slow execution times, it didn't. what i'm looking for is a portable lib that compares in speed and quality to GDI+'s image rotation and image stretching capabilities.

also, any of you tried any of the libs animated gif capabilities? again, CxImage takes forever to load an animated gif since it restarts from the beginning of the stream for each subsequent frame. and there's no easy way to mod the code due to the coding style used.


FreeImage is not slow...but I dont think it makes use of cpu extensions.
If you are interested in digital strraming you should rewrite your own algorithm.

Gif
I'm sure that FreeImage loads 'standard' gif...for advanced capabilities I dont know because gif is patented.
For a while every image lib had to remove their gif support ( at least the compression algorithm )...now the situation is not clear for me but some lib support gif again (both load and save).
I dont like the gif format...there are better loss less compression (and free) fileformats to be used in games and not only [smile]
In the case you are interested in image animation you may prefer to provide your animation system.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!