Bug 349059 - Applying invert to a mask doesn't invert to image boundaries.
Summary: Applying invert to a mask doesn't invert to image boundaries.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 2.9.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-12 11:21 UTC by gibbz1
Modified: 2016-04-22 17:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
inverted mask (136.97 KB, image/png)
2015-06-20 07:49 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gibbz1 2015-06-12 11:21:04 UTC
Using ctrl+I to invert color as you would on a texture doesn't work on a transparency mask. 
It makes the white go black, but the black areas stay black.

Reproducible: Always

Steps to Reproduce:
1. select transparency mask with black and white areas
2. Apply invert to it
3.


Expected Results:  
The colors should invert
Comment 1 Halla Rempt 2015-06-20 07:49:08 UTC
Created attachment 93256 [details]
inverted mask

Hi,

I see two problems when following your steps, but I'm not sure it's the exactly same thing... The first is that when I invert, invert only applies within the bounds of the mask, which can be smaller than the image. The other is that the thumbnail of the mask doesn't get updated correctly.

So, I selected an ellipse, created a transparency mask, removed the global selection, filled the layer with a gradient, inverted the mask to get the attached screenshot. But within the bounds of the mask, inverting worked.
Comment 2 gibbz1 2015-06-21 04:44:51 UTC
This looks like it has been fixed on Krita 2.9.5.2! 
I cannot reproduce the problem any more on the build on windows...
Comment 3 Ilya V. Portnov 2015-06-21 10:57:42 UTC
Does not reproduce neither on Kubuntu with build from PPA, nor on Debian with build from git.
Comment 4 Halla Rempt 2015-06-21 13:32:10 UTC
Okay, updated the title to reflect the remaining issue.
Comment 5 Dmitry Kazakov 2016-04-22 17:52:02 UTC
Git commit ca810f8531812be671eb9810b6e505f7d3cdadbc by Dmitry Kazakov.
Committed on 22/04/2016 at 17:49.
Pushed by dkazakov into branch 'master'.

Fix invert filter for devices with alpha color spaces

This patch implements a special callback for KisFilter that tells if
the filter wants to process fully transparent pixels of the device.
If that is the case, applyRect will contain the full image bounds.
Fixes T2085

M  +8    -0    libs/image/filter/kis_filter.cc
M  +2    -0    libs/image/filter/kis_filter.h
M  +9    -1    libs/ui/kis_filter_manager.cc
M  +8    -0    plugins/filters/example/example.cpp
M  +1    -0    plugins/filters/example/example.h

http://commits.kde.org/krita/ca810f8531812be671eb9810b6e505f7d3cdadbc