Gimp-Forum.net
is it me or is it Gimp? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: is it me or is it Gimp? (/Thread-is-it-me-or-is-it-Gimp)



is it me or is it Gimp? - Ofnuts - 12-04-2017

In the attached XCF (small!: 5x5pixels), there are 4 layers: 1, 2, 3 and the problem layer, "Numpy Ops" (which is identical to "1", with one red and one blue square). For me, this layer:
  • Shows in the Layers list, but behave as a transparent layer in the Image window.
  • Remains invisible if I copy/paste it over itself (Ctrl-C,Ctrl-V,Ctrl-H)
  • Produces a visible copy if I copy it as a new layer (Ctrl-C,Ctrl-V,Ctrl-Shift-N)
  • Can be painted over, but the painting only shows in the Layers list
Is it the same for you?

The layer is produced using the "pixel region" API for Python...


RE: is it me or is it Gimp? - Blighty - 12-04-2017

Duplicate - problem
Copy/Paste/New Layer - OK
Export png - problem


RE: is it me or is it Gimp? - Ofnuts - 12-04-2017

Hmmm. Actually the layer has an opacity of 0... So it's me... Found the problem


RE: is it me or is it Gimp? - Blighty - 12-04-2017

(12-04-2017, 04:03 PM)Ofnuts Wrote: Hmmm. Actually the layer has an opacity of 0... So it's me... Found the problem

I should have noticed that but didn't.


RE: is it me or is it Gimp? - Ofnuts - 12-04-2017

So I found how to copy pixel data from Gimp into a numpy array, and vice versa. Numpy is a popular fast math library for Python. For instance implementing a median filter with it takes 40 lines and runs in four seconds over 4 copies of a 20Mpx layer (a plain average filter is 1.2s). This can be handy some day.


RE: is it me or is it Gimp? - Ofnuts - 12-04-2017

(12-04-2017, 04:08 PM)Blighty Wrote:
(12-04-2017, 04:03 PM)Ofnuts Wrote: Hmmm. Actually the layer has an opacity of 0... So it's me... Found the problem

I should have noticed that but didn't.

Being two people fooled is somewhat comforting. I may have senior moments but that wasn't one of them.