Is this the same question as How to open a file in binary mode?? That question is very strange and probably it is not possible to do what you are asking.
If you are not using MFC then in this forum you need to say so.
To expand on Deniz's answer, have a look at the CxImage article. It's pretty easy to use.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
CxImage may be overkill, but the code for reading the GIF format should be available at various locations on the web. The algorithym will be basically the same... There's some header info, palette info and then the image data compressed using LZW.
The only problem is that the LZW algorithm used to read (and write) GIF files is patented by Unisys. This means that if you want to distribute your program to others (even if it's freeware) you must get a license from Unisys (which isn't free).
The Unisys patent expired in the United States in June of this year. It will expire in Europe, Canada (and I believe in Asia) next year, June or July 2004.
Originally posted by Paul McKenzie
The Unisys patent expired in the United States in June of this year. It will expire in Europe, Canada (and I believe in Asia) next year, June or July 2004.
Oh, that's an interesting piece of information.
CxImage may be overkill, but the code for reading the GIF format should be available at various locations on the web. The algorithym will be basically the same... There's some header info, palette info and then the image data compressed using LZW.
Fair enough, but if you want only gif support, you can compile CxImage so that it only supports gif decompression. Apart from that, CxImage already comes with the source code for gif decompression and the source code is well structured, so it's easy to take the decompressor out and just use that.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
Bookmarks