Bug 127443 - krita filter (preview) issues
Summary: krita filter (preview) issues
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: 1.6
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2006-05-16 14:13 UTC by Carsten Lohrke
Modified: 2008-10-26 10:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Lohrke 2006-05-16 14:13:18 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages

I created a cmyk image with a simple gradient. Applying e.g. the 
Relief/Emboss with variable depth or Map/Round corners filters, the preview 
of the emboss filter (at 300%) had a strong black/white contrast, which 
wasn't the case in the result. The Round corner preview looks just weird. 
Then I started a new test applying both filters in reverse. The rounded 
corners left the checker board pattern of the background as the effect 
should, but applying the emboss filter afterwards, the uncolored space was 
filled again - and that even though the preview preserved it. Don't know, if 
it's meant to be like that, but I wouldn't expect it.
Comment 1 Halla Rempt 2006-05-18 14:53:33 UTC
Set to the right component.
Comment 2 Halla Rempt 2006-11-03 11:16:01 UTC
SVN commit 601435 by rempt:

Partial fix for bug 127443 -- emboss with variable depth now doesn't destray alpha data anymore.
CCBUG: 127443


 M  +3 -2      kis_emboss_filter.cc  


--- branches/koffice/1.6/koffice/krita/plugins/filters/embossfilter/kis_emboss_filter.cc #601434:601435
@@ -105,7 +105,8 @@
 // XXX: COLORSPACE_INDEPENDENCE
 
                 QColor color1;
-                src->colorSpace()->toQColor(it.rawData(), &color1);
+                Q_UINT8 opacity;
+                src->colorSpace()->toQColor(it.rawData(), &color1, &opacity);
 
                 QColor color2;
                 Q_UINT8 opacity2;
@@ -117,7 +118,7 @@
 
                 Gray = CLAMP((R + G + B) / 3, 0, Q_UINT8_MAX);
 
-                dst->colorSpace()->fromQColor(QColor(Gray, Gray, Gray), dstIt.rawData());
+                dst->colorSpace()->fromQColor(QColor(Gray, Gray, Gray), opacity, dstIt.rawData());
             }
         }
 
Comment 3 Halla Rempt 2006-11-03 11:18:32 UTC
Note: this filter isn't colorspace independent. It should be easy enough to make it independent, and that remains a todo for 2.0.
Comment 4 Halla Rempt 2006-11-03 11:30:06 UTC
SVN commit 601437 by rempt:

Forward port opacity fix for bug 127443.
CCBUG:127443


 M  +2 -1      kis_emboss_filter.cc  


--- trunk/koffice/krita/plugins/filters/embossfilter/kis_emboss_filter.cc #601436:601437
@@ -97,6 +97,7 @@
 // FIXME: COLORSPACE_INDEPENDENCE or at least work IN RGB16A
 
                 QColor color1;
+                quint8 opacity;
                 src->colorSpace()->toQColor(it.oldRawData(), &color1);
 
                 QColor color2;
@@ -110,7 +111,7 @@
 
                 Gray = CLAMP((R + G + B) / 3, 0, quint8_MAX);
 
-                dst->colorSpace()->fromQColor(QColor(Gray, Gray, Gray), dstIt.rawData());
+                dst->colorSpace()->fromQColor(QColor(Gray, Gray, Gray), opacity, dstIt.rawData());
             }
         }
 
Comment 5 Michael Leupold 2008-10-26 08:41:21 UTC
I can't see to reproduce this bug any longer, but maybe I'm not interpreting it right. Has this bug been fully fixed yet?
Comment 6 Halla Rempt 2008-10-26 10:40:22 UTC
The filter isn't colorspace independent, but since a note has been added to the code, and the crash doesn't occur anymore, I think it's okay to close the bug. Thanks!