https://bugs.kde.org/show_bug.cgi?id=459026

            Bug ID: 459026
           Summary: Node class, projectionPixelData and all related method
                    doesn't takes in account layer style
           Product: krita
           Version: 5.1.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: grum...@grum.fr
  Target Milestone: ---

Created attachment 152004
  --> https://bugs.kde.org/attachment.cgi?id=152004&action=edit
A krita file that can be used for example

SUMMARY
The following Python API function don't work properly:
- save()
- projectionPixelData()
- thumbnail() 

If layer have a layer style, layer style is not taken in account when
saving/return data
If layer have a filter mask, filter mask is properly taken in account

STEPS TO REPRODUCE
1. Create a document with a paint layer, draw something 
2. Add a filter mask (gaussian blur for example)
3. Add a layer style (a stroke for example)
4. In scripter, execute the following code:
```
from krita import *
from PyQt5.Qt import *

def toQImage(layerNode):
    rect = layerNode.bounds()
    return QImage(layerNode.projectionPixelData(rect.left(), rect.top(),
rect.width(), rect.height()), rect.width(), rect.height(),
QImage.Format_ARGB32)

ad=Krita.instance().activeDocument()
ad.refreshProjection()
n=ad.activeNode()

options=InfoObject()

n.save("/home/grum/test_layer.png", 72, 72, options, QRect())

lbl=QLabel()
lbl.setPixmap(QPixmap.fromImage(toQImage(n)))
layout=QVBoxLayout()
layout.addWidget(lbl)

dlg=QDialog()
dlg.setLayout(layout)
dlg.exec()
```

OBSERVED RESULT
- On exported PNG file (save method), the filter mask is applied but not the
layer style
- On displayed image (projectionPixelData method), the filter mask is applied
but not the layer style

EXPECTED RESULT
Layer style should be applied as for filter mask 

Note: pixelData() method doesn't take in account layer style and filters mask
==> it's normal and this method shouldn't be impacted by bug fix

SOFTWARE/OS VERSIONS
Tested on Linux appimage, on version 4.4.3, 4.4.8, 5.1.0 ==> problem is here
from a while

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to