Closed MvGulik closed 7 years ago
Oh dear! Yes, seen on linux as well. I'll investigate.
It's only a half-bug, I think. The gaussnoise
operator generates random pixels every time it is called, so if a pixel is generated more than once (as it can be on zoomed tile overlaps), you'll see different answers.
To fix this, gaussnoise
should make a single random seed for the whole when it starts up, then use the (x, y) coordinate plus that seed to make a number for a pixel. I'll make an issue on the libvips tracker.
Thanks for reporting this!
Roger. Thanks for explanation.
OK, fixed! Thank you very much for pointing this out. The fix will be in 8.5, due in March 2017.
PS: Seeing the "plus a per-call" part, I think that also changes/fixes a none intuitive exception I spotted on multiple Gaussian-pattern usage.
Merging 3 Gaussian patterns, with identical settings, will probably now also generate a colored image instead of a (virtual) gray scaled image.
Correct ?
Better to ask now I think.
I tried a tiny Python program:
#!/usr/bin/env python
import sys
import gi
gi.require_version('Vips', '8.0')
from gi.repository import Vips
r = Vips.Image.gaussnoise(100, 100)
g = Vips.Image.gaussnoise(100, 100)
b = Vips.Image.gaussnoise(100, 100)
im = r.bandjoin([g, b])
im = im.copy(interpretation = "srgb")
im.write_to_file(sys.argv[1])
And it makes this image:
So it looks like noise on an old analogue colour TV.
You're right though, try that in nip2 and you'll see a plain grey image. I'll try to fix that too.
Roger.
In that case ... I can't resist giving it its own ticket.
Some odd (and old) image-preview behavior (to me) on Gaussian noise generated image(s). (A minor issue at best. Don't mind knowing what might be triggering this (if known and its not to technical).)
When previewing a Gaussian noise generated image in nip2 (when not using a power of 2 zoom level) the preview image shows a bit mixed up preview. Image: example that nicely show the odd bands.
Nip2: 8.4.0 (Not tested on older versions, but I have seen this before a long time ago.) OS: Win:XP