On 05/28/2013 08:56 AM, Mark Durre wrote:
Hi, I think I've found a bug (unless I'm doing it the wrong way!!) in
using transparent data on a 2d image.

Image 1 - Plot of dataset I'm going to use as mask.
Image 2 - Resulting mask, created by formula where(`dataset`>10,1,0)
Image 3 – Plot of image I'm going to mask.
Image 4 – Plot of image after applying "Transparent data"

It seems to "give up" after a certain point. Diagnostically, the image
is 51x66 and the x axis point it fails is 51 pixels, I.e. It only seems
to apply up to a square mask. If I use "Nan" in the formula, I still get
the same problem.

Thanks for reporting the problem. It looks like it is a bug in the transparency code. The xw and yw definitions are swapped in the C++ function applyImageTransparancy.

I probably tested it against square images, not rectangular ones.

Fix is here:
https://github.com/jeremysanders/veusz/commit/40d0c90f2a5b04e775943ff79ce755ab418b80c7


Jeremy



_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à