Reading / writing JPEG's, GIF's or PNG's, how?

Started by
3 comments, last by Frankie68 21 years, 4 months ago
Hello, Reading and writing bmp''s is really simple, but now I want to use a format that is less space-consuming. So the question that I am going to ask is really simple, I am just hoping on a clever answer. How can I read/write JPEG''s, GIF''s and PNG''s? I am not expecting huge sourcecode-snippets, but maybe you know a link to a nice website that I can visit to start on the subject. And maybe more general: what is the best way to find info on a fileformat? Using google always gives bad results. I end up on sites who are offering programs to edit them. But that is not what I want. Thanks for reading my post, and maybe you can help me...
Advertisement
libjpeg and libpng.

both come with readme files that walk you through creating a function to load/save in appropriate formats.

edit: gifs are evil, why would you want to use them anyway?

[edited by - niyaw on December 7, 2002 8:10:44 AM]
The specifications are available online. See www.wotsit.org ("file formats" link in signature).

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Thanks, that was FAST!
The SDL library SDL_image can load many file types (tga with alpha channel comes to mind).

This topic is closed to new replies.

Advertisement