[GRASS-dev] [GRASS GIS] #3367: g.gui.animation: animated GIF export generates corrupted GIF files

#3367: g.gui.animation: animated GIF export generates corrupted GIF files
----------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.2
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: g.gui.animation
       CPU: x86-64 | Platform: Linux
----------------------+---------------------------------

Comment (by martinl):

In [changeset:"71482" 71482]:
{{{
#!CommitTicketReference repository="" revision="71482"
pythonlib: add PIL native implementation available since Pillow 3.4.0, see
#3367 (merge r71258 from trunk)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3367#comment:19&gt;
GRASS GIS <https://grass.osgeo.org>

#3367: g.gui.animation: animated GIF export generates corrupted GIF files
----------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.2
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: g.gui.animation
       CPU: x86-64 | Platform: Linux
----------------------+---------------------------------

Comment (by annakrat):

Replying to [comment:17 martinl]:
> Replying to [comment:16 veroandreo]:
> > Tested here having python2-pillow-3.4.2-1. Now, it works, but as you
say the GIF doesn't look so good in terms of definition of the images.
They look noisy, as when you increase ISO in the camera.
>
> I can confirm it. I have `python-pil 4.2.1-1`. See attachment:noisy.gif
created by
>
> {{{
> import os
> from PIL import Image
> from grass.imaging import writeGif
>
> color_path = os.path.join(os.environ['GISBASE'], "docs", "html",
"colortables")
> pil_images = [Image.open(os.path.join(color_path, c)) for c in
os.listdir(color_path)]
> writeGif('/tmp/test.gif', pil_images, duration=0.2, repeat=True)
> }}}
>
>

Could you test r71485? I used quantize function and it seems better.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3367#comment:20&gt;
GRASS GIS <https://grass.osgeo.org>

#3367: g.gui.animation: animated GIF export generates corrupted GIF files
----------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.2
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: g.gui.animation
       CPU: x86-64 | Platform: Linux
----------------------+---------------------------------

Comment (by martinl):

Replying to [comment:20 annakrat]:
> Could you test r71485? I used quantize function and it seems better.

yes, much more better! Please backport. Thanks!

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3367#comment:21&gt;
GRASS GIS <https://grass.osgeo.org>

#3367: g.gui.animation: animated GIF export generates corrupted GIF files
----------------------+---------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.2
Component: wxGUI | Version: svn-releasebranch72
Resolution: fixed | Keywords: g.gui.animation
       CPU: x86-64 | Platform: Linux
----------------------+---------------------------------
Changes (by annakrat):

* status: reopened => closed
* resolution: => fixed

Comment:

Done in r71486.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3367#comment:22&gt;
GRASS GIS <https://grass.osgeo.org>