-
October 1st, 2003, 10:45 PM
#1
How can I read a 'gif' file
I want to read some data from gif file. I have no idea how to go about it. Can anyone help me...
Thanks
-
October 2nd, 2003, 12:15 AM
#2
Microsoft LVP - Least Valuable Professional
Please rate this post... Pleeeeeeaaassee!!!
-
October 2nd, 2003, 02:32 AM
#3
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.
-
October 2nd, 2003, 02:37 AM
#4
Yes I am not using MFC. I work in ANSI C. But to implement my problem I dont mind using MFC also.
-
October 2nd, 2003, 07:21 AM
#5
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.
-
October 2nd, 2003, 07:57 AM
#6
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.
bytz
--This signature left intentionally blank--
-
October 2nd, 2003, 08:41 AM
#7
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
-
October 2nd, 2003, 08:45 AM
#8
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.
-
October 2nd, 2003, 08:42 PM
#9
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|