Closed chowbok closed 2 years ago
Seems to be related to this: https://github.com/multiSnow/mcomix3/blob/gtk3/mcomix/mcomix/lens.py#L176
For some reason, at times, the alpha doesn't return.
Additionally, even if I change so alpha is optional, convert_rgb16list_to_rgba8int()
is throwing an exception about overflowing.
Traceback (most recent call last):
File "mcomix/mcomix/lens.py", line 160, in toggle
self.enabled = action.get_active()
File "mcomix/mcomix/lens.py", line 48, in set_enabled
self._draw_lens(*self._point)
File "mcomix/mcomix/lens.py", line 65, in _draw_lens
pixbuf = self._get_lens_pixbuf(x, y)
File "mcomix/mcomix/lens.py", line 178, in _get_lens_pixbuf
canvas.fill(image_tools.convert_rgb16list_to_rgba8int([r,g,b]))
OverflowError: 83608696063 not in range 0 to 4294967295
If I add a try/except, the lens start working again but the old bug comes back too. I wonder if this is could be called a regression
@chowbok Please try moving cursor upon the image. You could see nothing in lens if cursor is on totally black background.
@brunoais Please try https://github.com/multiSnow/mcomix3/tree/pixel2int and see whether the exception fixed.
@multiSnow Almost. Like this, though: https://github.com/multiSnow/mcomix3/pull/166 It appears fixed. The alpha needs to be optional. FYI (not something wrong): For what I have, hovering background, outside the displayed image, is always grey. The image magnification shows correctly.
Using r1971.523f08f-1, although this has been an issue for a while. When I select "Magnifying lens", nothing appears, although the cursor disappears.