I want to read some data from gif file. I have no idea how to go about it. Can anyone help me... :confused:
Thanks
Printable View
I want to read some data from gif file. I have no idea how to go about it. Can anyone help me... :confused:
Thanks
Search on CXImage
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.
Yes I am not using MFC. I work in ANSI C. But to implement my problem I dont mind using MFC also.
To expand on Deniz's answer, have a look at the CxImage article. It's pretty easy to use.
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.
Regards,
Paul McKenzie
Oh, that's an interesting piece of information.Quote:
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.
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.Quote:
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.
thanks all of u