Results 1 to 8 of 8

Thread: Parsing Gifs/LZW

  1. #1
    WALDO
    Guest

    Question Parsing Gifs/LZW

    Does anyone have a routine to parse and render GIF images with or without LZW compression? I can get out the dimensions and the global color table, but I can't seem to get out the actual picture information with an LZW compressed gif. I guess my biggest failing is that my eyes go crossed when I read specifications like this one.

    Who writes these things, any way? Do they speak english? It looks like english, but I sure don't understand it.

    My company has a GIF license from Unisys, so don't worry about that.

  2. #2
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    Americans write this stuff... And you won't find a gif without the LWZ algorithm, because thats what it is based on.

    Did you want routines in VB or C? I'd recommend C...

  3. #3

  4. #4
    WALDO
    Guest

    Unhappy That really didn't do anything for me

    I had seen that routine before. I does a nice job with compressing text. What I really need is something on how to parse and render GIF file, pixel by pixel, you know?.

    For me, it's more of I'm geting lost trying to pull apart the actual pieces of the file that have the image data. I can pull the datastream out and even save the frames of an animated gif file to separate files with no prob.

  5. #5
    jim mcnamara
    Guest
    Doing that in VB would give me nightmares. Here is a public domain (winfract) sample of decoding LZW compression in gif files.
    in C.
    Attached Files Attached Files

  6. #6
    WALDO
    Guest
    bump

  7. #7
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    I don't understand what you want to do... if you can extract the single pictures and know how to save them... where is you problem?
    Sanity is a full time job

    Puh das war harter Stoff!

  8. #8
    WALDO
    Guest

    Talking I think you misunderstand me

    I can't extract the single pictures. That is the fundamental problem. I can extract the colors but not the pictures.

    What I mean by extracting the frames is that ican pull out the header, then pull each frame, then save separately the header and each frame into separate files.

    For example if the file was setup:
    [HEADER]
    [FRAME1]
    [FRAME2]
    [FRAME3]

    I could pull them apart and save files like this:
    [HEADER]
    [FRAME1]

    [HEADER]
    [FRAME2]

    [HEADER]
    [FRAME3]

    But that really doesn't tell me how to pick apart [FRAME1], you know?

Posting Permissions

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



Click Here to Expand Forum to Full Width