[GRASS-dev] [GRASS GIS] #2135: wxGUI: failed to show legend when PIL is missing

#2135: wxGUI: failed to show legend when PIL is missing
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: legend, PIL | Platform: Linux
      Cpu: x86-64 |
-------------------------+--------------------------------------------------
It's not possible to show legend when PIL package is not available, see
traceback bellow

{{{
  File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/mapdisp/frame.py", line 187, in <lambda>
     overlay.overlayChanged.connect(lambda:
self.MapWindow2D.UpdateMap(render=False, renderVector=False))
   File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/mapwin/buffered.py", line 720, in UpdateMap
     for img in self.GetOverlay():
   File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/mapwin/buffered.py", line 601, in GetOverlay
     img = utils.autoCropImageFromFile(overlay.mapfile)
   File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/core/utils.py", line 1103, in autoCropImageFromFile
     from PIL import Image
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2135&gt;
GRASS GIS <http://grass.osgeo.org>

#2135: wxGUI: failed to show legend when PIL is missing
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: legend, PIL | Platform: Linux
      Cpu: x86-64 |
-------------------------+--------------------------------------------------

Comment(by annakrat):

I added special handling of missing PIL in r58256 (with advice to install
it), however we should decide if PIL is a official requirement for wxGUI.
Now it's used for cropping overlays (legend and so) so that you can move
more decorations easily.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2135#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2135: wxGUI: failed to show legend when PIL is missing
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: legend, PIL | Platform: Linux
      Cpu: x86-64 |
-------------------------+--------------------------------------------------

Comment(by hamish):

Replying to [comment:1 annakrat]:
> however we should decide if PIL is a official requirement for
> wxGUI.Now it's used for cropping overlays (legend and so) so
> that you can move more decorations easily.

fwiw it is already "encouraged", since if PIL is there the wxGUI PsMap and
Animation tools like to use it too.

Hamish

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

#2135: wxGUI: failed to show legend when PIL is missing
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: legend, PIL | Platform: Linux
      Cpu: x86-64 |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:2 hamish]:
> Replying to [comment:1 annakrat]:
> > however we should decide if PIL is a official requirement for
> > wxGUI.Now it's used for cropping overlays (legend and so) so
> > that you can move more decorations easily.
>
> fwiw it is already "encouraged", since if PIL is there the wxGUI PsMap
and Animation tools like to use it too.

Animation tool uses PIL for the same reason as map Window now - trim
legend so that you can move it around the screen easily.

Can we close this?

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

#2135: wxGUI: failed to show legend when PIL is missing
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: legend, PIL | Platform: Linux
      Cpu: x86-64 |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:3 annakrat]:

> Can we close this?

For me - yes.

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

#2135: wxGUI: failed to show legend when PIL is missing
----------------------+-----------------------------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Resolution: fixed | Keywords: legend, PIL
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by annakrat):

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

Comment:

I also updated REQUIREMENTS.html and gui/wxPython/README (r58282).

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