POV-Ray : Newsgroups : povray.newusers : GIF: how to define color number in linux? : Re: GIF: how to define color number in linux? Server Time
14 May 2024 23:23:51 EDT (-0400)
  Re: GIF: how to define color number in linux?  
From: Le Forgeron
Date: 2 Dec 2013 15:40:31
Message: <529cf03f@news.povray.org>
Le 02/12/2013 19:52, LanuHum nous fit lire :
> Le_Forgeron <jgr### [at] freefr> wrote:
> 
>> To find the index of color map on linux, I recommend using Gimp.
>>
>> Load your gif in the program, then if the colormap is not displayed
>> automatically, go to Windows->Dockable Dialogs->Colormap
>>
>> You can even reorder the color map with Rearrange Colormap (rightclick
>> menu of the colormap, when selecting a color from the
>> colormap)(rearranging does not change the display of the picture, only
>> the order in the color map)
> 
> Thanks!
> 
> But, if I create GIF in GIMP-2.8:
> Povray wrote:
> Possible Parse Error:
> Interlacing in GIF image unsupported
> Fatal error in parser: Cannot access data in file.
> Render failed
> 

Holy cow!

You have found the deepest bug of Povray: it read 9 bytes of image block
in buffer[] from 0 to 8, and test buffer[9] instead of buffer[8] for
interlacing.
(in file gif.cpp for Povray 3.7, circa line 158)
The bug was not in 3.1g; and not yet in 3.6.1;

Congratulations.

I now have to report that bug.

> 
> But, I convert GIF(create with GIMP) to PNG in konqueror, than PNG to GIF in
> konqueror:
> Render good, no error.
> 
> As it is correct to create GIF in GIMP for Povray?

If the code was correct, it would be fine with Gimp. So far the issue is
that Gimp put the comment block before the image block, and if the Ninth
bytes of the comment has the bit 0x40 set, you're dead.
So: "Created with GIMP" being the default comment, you are killed by the
w of with. (0x77). (if there is no comment, or a shorter one, it might
still be amusing for that buffer overrun from previous read...)

The convertion between gif-gimp to png to gif again might move the
blocks, or drop some.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.