How can I read a 'gif' file
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: How can I read a 'gif' file

Hybrid View

  1. #1
    Join Date
    Apr 2002
    Posts
    35

    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

  2. #2
    Join Date
    Aug 2001
    Location
    Sydney, Australia
    Posts
    813
    Search on CXImage
    Microsoft LVP - Least Valuable Professional

    Please rate this post... Pleeeeeeaaassee!!!

  3. #3
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    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.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  4. #4
    Join Date
    Apr 2002
    Posts
    35
    Yes I am not using MFC. I work in ANSI C. But to implement my problem I dont mind using MFC also.

  5. #5
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    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.

  6. #6
    Join Date
    Sep 2002
    Location
    DC Metro Area, USA
    Posts
    1,509
    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--

  7. #7
    Join Date
    Apr 1999
    Posts
    27,421
    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

  8. #8
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    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.

  9. #9
    Join Date
    Apr 2002
    Posts
    35
    thanks all of u

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center