Bug 381204

Summary: Extract foreground [interactive] result in offset layers with G'mic
Product: [Applications] krita Reporter: Camille Bissuel <welcome>
Component: G'Mic for KritaAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: freebox64, nicholaslapointe8
Priority: NOR    
Version First Reported In: 3.2.0-beta.2   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Extract foreground [interactive] offest 1
Extract foreground [interactive] offest 2
Extract foreground [interactive] offset 3
Extract foreground [interactive] offset with Krita 3.2 RC3

Description Camille Bissuel 2017-06-14 14:21:04 UTC
Created attachment 106094 [details]
Extract foreground [interactive] offest 1

This may be solved with Gmic 2, but for some pictures (including this one: https://commons.wikimedia.org/wiki/Earth#/media/File:BlueMarble-2001-2002.jpg), using the extract foreground [interactive] filter of G'mic in Krita may result in offest layers.

Using the background dots (red ones) instead of the foreground dots (green ones) for the foreground usually workaround the issue.

Please see the attached screenshots for a clearer explanation ;)

Depending on the ratio of the picture, the bug seem to occur or not. It doesn't occur in Gimp.

Initially reported here : https://github.com/dtschump/gmic-community/issues/82#issuecomment-308412717

Tested on Antergos Linux 64 bits

Thanks !
Comment 1 Camille Bissuel 2017-06-14 14:21:49 UTC
Created attachment 106095 [details]
Extract foreground [interactive] offest 2
Comment 2 Camille Bissuel 2017-06-14 14:22:40 UTC
Created attachment 106096 [details]
Extract foreground [interactive] offset 3
Comment 3 Halla Rempt 2017-06-24 18:04:16 UTC
We've just replaced our own gmic dialog with a plugin that communicates with the official gmic-qt plugin (which still needs to be released with our integration code, but it's already been merged), so we can close all current g'mic bugs.
Comment 4 Camille Bissuel 2017-08-14 11:56:08 UTC
I'm sorry, this is not solved in Krita 3.2 RC3 with the new G'mic-Qt plugin, despite the result is slightly different. See attachment...
Comment 5 Camille Bissuel 2017-08-14 11:56:58 UTC
Created attachment 107273 [details]
Extract foreground [interactive] offset with Krita 3.2 RC3
Comment 6 Nicholas LaPointe 2017-11-24 11:12:00 UTC
This happens because one of the layers the filter produces in this case is not supposed to be positioned at 0,0 (which is where Krita will place it).

Some G'MIC filters ("Extract foreground [interactive]" included) will encode layer position, opacity, and blending mode information in the layer name that gets sent to Krita, but Krita isn't doing anything with it at the moment.
Comment 7 mvowada 2018-01-20 18:55:44 UTC
(I can reproduce this on Ubuntu 14.04 - Krita 4.0.0-beta1.1.appimage)
Comment 8 joupent 2018-10-12 15:19:54 UTC
Git commit 6d2d5cef82aec171c764635810767a9cef9f60de by Jouni Pentikäinen.
Committed on 12/10/2018 at 14:54.
Pushed by jounip into branch 'master'.

Parse and apply layer offset from GMic filter output

M  +11   -0    plugins/extensions/qmic/kis_import_qmic_processing_visitor.cpp

https://commits.kde.org/krita/6d2d5cef82aec171c764635810767a9cef9f60de
Comment 9 Halla Rempt 2018-11-20 08:58:39 UTC
Git commit aefdf396ae9b1209aff7a89f498612481c4acc94 by Boudewijn Rempt, on behalf of Jouni Pentikäinen.
Committed on 20/11/2018 at 08:21.
Pushed by rempt into branch 'krita/4.1'.

Parse and apply layer offset from GMic filter output

M  +11   -0    plugins/extensions/qmic/kis_import_qmic_processing_visitor.cpp

https://commits.kde.org/krita/aefdf396ae9b1209aff7a89f498612481c4acc94