Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is it me or is it Gimp?
#1
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...


Attached Files
.xcf   NumPy.xcf (Size: 1.59 KB / Downloads: 359)
Reply
#2
Duplicate - problem
Copy/Paste/New Layer - OK
Export png - problem
Reply
#3
Hmmm. Actually the layer has an opacity of 0... So it's me... Found the problem
Reply
#4
(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.
Reply
#5
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.
Reply
#6
(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.
Reply


Forum Jump: