Bug 453477 - G'MIC has problems with offset positioned layers
Summary: G'MIC has problems with offset positioned layers
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: G'Mic for Krita (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
: 453483 453507 453961 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-06 21:32 UTC by amyspark
Modified: 2022-06-02 18:43 UTC (History)
3 users (show)

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


Attachments
Compose channels bug (163.69 KB, image/png)
2022-05-06 21:32 UTC, amyspark
Details
Extract foreground [interactive] bug (309.75 KB, image/png)
2022-05-06 21:32 UTC, amyspark
Details
gif (1.28 MB, image/gif)
2022-05-28 05:52 UTC, thetwo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description amyspark 2022-05-06 21:32:03 UTC
Created attachment 148614 [details]
Compose channels bug

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
This is a self-filed bug report to acknowledge TheTwo's bugs in https://invent.kde.org/graphics/krita/-/merge_requests/1428.

- The position of "compose channels" is still inaccurate
- Extract foreground [interactive] also has location problems


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
Layers are positioned at (0, 0).

EXPECTED RESULT
Layers should respect their original's position.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 amyspark 2022-05-06 21:32:38 UTC
Created attachment 148615 [details]
Extract foreground [interactive] bug
Comment 2 thetwo 2022-05-07 00:59:57 UTC
*** Bug 453483 has been marked as a duplicate of this bug. ***
Comment 3 thetwo 2022-05-10 22:11:25 UTC
I found some other:
“tones to layers”
“tiles to layers”
“fade layers”
“morph layers”
“colors to layers”
“multiscale operator
“align layers”
Comment 4 amyspark 2022-05-16 21:30:47 UTC
CC'ing David, I've verified we do send the layer position correctly.

It seems that gui_autocrop_layers in the G'MIC stdlib (which all filters seem to use) repositions the generated layers from (0, 0) instead of from the provided layer position.
Comment 5 amyspark 2022-05-20 20:00:21 UTC
*** Bug 453961 has been marked as a duplicate of this bug. ***
Comment 6 amyspark 2022-05-20 20:02:10 UTC
*** Bug 453507 has been marked as a duplicate of this bug. ***
Comment 7 Bug Janitor Service 2022-05-21 04:35:47 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 8 thetwo 2022-05-28 05:48:23 UTC
krita-nightly-x64-5.1.0-prealpha-0c31a5bcc5

Some tests have been carried out here, and it is found that some cases work normally:

“channels to layers”:
1.with selection:normal  
2.without selection:The new layers are in the upper left corner

“Extract foreground [interactive]”:
1.with selection:normal  
2.without selection:The new layers are in the upper left corner

“tones to layers”:normal
“tiles to layers”:normal
“fade layers”:normal
“morph layers”:normal

“colors to layers”:This filter doesn't seem to work? I don't see any change.
If there is no selection, it will change to the upper left corner.

“multiscale operator“:
1.with selection:normal  
2.without selection:The new layers are in the upper left corner

“align layers”:
The effect of applying filter is different from that of preview……
If there is no selection, the picture will be generated in the center of the canvas
Comment 9 thetwo 2022-05-28 05:52:47 UTC
Created attachment 149276 [details]
gif

In addition, are filters such as "stroke" and "drop shadow" better aligned according to the center? (and it may be better not to be restricted by selection...)
Comment 10 Bug Janitor Service 2022-06-01 21:56:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1464
Comment 11 amyspark 2022-06-02 18:43:43 UTC
Git commit 43093d09bb0a9f9d5fcd3ec9f136314cee6a7212 by L. E. Segovia.
Committed on 02/06/2022 at 16:19.
Pushed by lsegovia into branch 'master'.

G'MIC: fix relative layer positioning

There are some filters that are still broken, these have been reported upstream.

Ref https://github.com/dtschump/gmic/issues/385

M  +3    -2    plugins/extensions/qmic/kis_qmic_import_tools.h
M  +5    -2    plugins/extensions/qmic/kis_qmic_simple_convertor.cpp

https://invent.kde.org/graphics/krita/commit/43093d09bb0a9f9d5fcd3ec9f136314cee6a7212