Page 1 of 1

What's wrong about this image?

Posted: 2009-01-24T11:53:51-07:00
by lichtin
Hi,
"display" says it's a corrupt image.

http://inl-images.adbureau.net/inl/acci ... es/AE0.gif

What's wrong about it?

Re: What's wrong about this image?

Posted: 2009-01-24T12:22:37-07:00
by magick
It appears that the LZW compression is corrupt or encoded incorrectly. We tried a number of image readers and more than half choked on the image and yet a few converted or displayed the image without complaint.

Re: What's wrong about this image?

Posted: 2009-02-09T02:58:22-07:00
by lichtin
Ok.
So we made a change which seems to fix the issue:

Code: Select all

      switch (pass)
      {
        case 0:
        default:
        {
          offset+=8;
          if (offset >= (long) image->rows)
            {
              pass++;
              offset=4;

              /* interlaced gif does not work with only 3 rows */
              if (offset >= (long) image->rows) {
                  /* skip pass 1 */
                  pass++;
                  offset=2;
              }
              if (offset >= (long) image->rows) {
                  /* skip pass 2 */
                  pass++;
                  offset=1;
              }
            }
          break;
        }