Bug 453947 - GMIC:Preview window exception
Summary: GMIC:Preview window exception
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: G'Mic for Krita (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL: https://github.com/amyspark/gmic/comm...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-17 18:44 UTC by thetwo
Modified: 2022-06-02 18:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
gif (1.20 MB, image/gif)
2022-05-17 18:44 UTC, thetwo
Details
bug2 (101.89 KB, image/png)
2022-05-17 18:47 UTC, thetwo
Details
gif (2.31 MB, image/gif)
2022-05-28 06:16 UTC, thetwo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thetwo 2022-05-17 18:44:59 UTC
Created attachment 148927 [details]
gif

krita-nightly-x64-5.1.0-prealpha-d59747b8ad

1.As shown in the figure, if no selection is used, the preview windows will change to a small rectangular area when zooming in and out when the filter is turned on.

2.When the filter is turned on, the preview always has a general "pixelated" effect. If we zoom in and zoom out, it will become normal.
Comment 1 thetwo 2022-05-17 18:47:24 UTC
Created attachment 148928 [details]
bug2
Comment 2 amyspark 2022-05-20 19:21:07 UTC
Confirming with G'MIC 3.1.2. The Preview widget resizes unstably.
Comment 3 amyspark 2022-05-20 20:05:36 UTC
Waiting for upstream resolution.
Comment 4 amyspark 2022-05-24 23:14:46 UTC
Interesting bug! It stretches to the introduction of the G'MIC-Qt plugin itself, back in 3.0.3:

https://invent.kde.org/graphics/krita/-/commit/463213b8e04311f5c7f7c41e24cc198c5a98fb87

What is happening is that the image size command never accounted, in our side, for the layer mode; so we returned the image size each time. This is incorrect whenever a smaller layer is active, so in these cases the preview widget would have inconsistent behaviour due to the mismatching sizes. I also ported this behaviour blindly when I wrote the QMic interface, so this will require an ABI break.

I'll add a version definition to the header to help things in the other side, and roll this fix up together with the translations.
Comment 5 Bug Janitor Service 2022-05-26 00:47:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1459
Comment 6 amyspark 2022-05-26 14:27:58 UTC
Git commit 1dc834c1129ca816a53819b88c1390a6f9524b41 by L. E. Segovia.
Committed on 26/05/2022 at 13:29.
Pushed by lsegovia into branch 'master'.

Fix image size calculation

Ever since it was implemented in 463213b8e04311f5c7f7c41e24cc198c5a98fb87,
the gmic_qt_get_image_size command never accounted for the selected
mode. Instead, the image's size was always returned, which made the
preview widget's calculations use wrong data.

This fix breaks QMic's ABI, so I am also adding a interface version
macro to help detection on the other side.

Fixes c-koi/gmic-qt#145

M  +78   -2    plugins/extensions/qmic/kis_qmic_interface.cpp
M  +3    -1    plugins/extensions/qmic/kis_qmic_interface.h

https://invent.kde.org/graphics/krita/commit/1dc834c1129ca816a53819b88c1390a6f9524b41
Comment 7 amyspark 2022-05-26 14:28:06 UTC
Git commit 73fbcfb137b7a88e5b179fae7da9e4f238a8b109 by L. E. Segovia.
Committed on 26/05/2022 at 13:29.
Pushed by lsegovia into branch 'master'.

Update G'MIC to 3.1.2.2
Related: bug 453945, bug 453949, bug 454100, bug 454286

M  +2    -2    3rdparty_plugins/ext_gmic/CMakeLists.txt [INFRASTRUCTURE]

https://invent.kde.org/graphics/krita/commit/73fbcfb137b7a88e5b179fae7da9e4f238a8b109
Comment 8 thetwo 2022-05-28 06:14:11 UTC
I don't think this problem has been completely solved. Once the "input layers" are changed, it will reappear
Comment 9 thetwo 2022-05-28 06:16:51 UTC
Created attachment 149278 [details]
gif
Comment 10 Bug Janitor Service 2022-06-01 21:56:29 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:50 UTC
Git commit ca0d473bcd570f0332458b296efce25bf6344631 by L. E. Segovia.
Committed on 02/06/2022 at 16:18.
Pushed by lsegovia into branch 'master'.

G'MIC: clean up layer retrieval and properly detect visible paint layers
Related: bug 454516

M  +0    -1    plugins/extensions/qmic/CMakeLists.txt
D  +0    -105  plugins/extensions/qmic/kis_input_output_mapper.cpp
D  +0    -30   plugins/extensions/qmic/kis_input_output_mapper.h
M  +92   -0    plugins/extensions/qmic/kis_qmic_import_tools.h
M  +10   -8    plugins/extensions/qmic/kis_qmic_interface.cpp

https://invent.kde.org/graphics/krita/commit/ca0d473bcd570f0332458b296efce25bf6344631