Bug 419795 - Soft proofing doesn't work after loading a .kra file
Summary: Soft proofing doesn't work after loading a .kra file
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: wolthera
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-07 14:15 UTC by Yu-Hsuan Lai
Modified: 2020-06-14 13:08 UTC (History)
5 users (show)

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


Attachments
canvas after enabling soft proofing. (127.11 KB, image/png)
2020-04-07 14:15 UTC, Yu-Hsuan Lai
Details
image properties. (94.29 KB, image/png)
2020-04-07 14:15 UTC, Yu-Hsuan Lai
Details
Buggy soft-proofing (video): First art(jpg)=success. Second art(kra)=fail . Sorry for weird ratio of video. (2.72 MB, video/mp4)
2020-04-26 16:23 UTC, David REVOY
Details
gif showing working behaviour (944.60 KB, image/gif)
2020-05-10 11:33 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yu-Hsuan Lai 2020-04-07 14:15:01 UTC
Created attachment 127351 [details]
canvas after enabling soft proofing.

SUMMARY
I use a grayscale color profile so the issue would be more obvious, but soft proofing seems to not working with any color profile at all. 

STEPS TO REPRODUCE
1. Create a new image in Krita.
2. Draw something colorful.
3. Check Image -> Properties -> Softproofing -> Profile is set to "Gray-D50-elle-V2-srgbtrc.icc"
4. Enable Image -> Soft Proofing

OBSERVED RESULT
Nothing happens.

EXPECTED RESULT
The canvas turned to greyscale.

SOFTWARE/OS VERSIONS
macOS: 10.14.6
Krita: Nightly build. Git commit 5a1f66f

ADDITIONAL INFORMATION
See attachment
Comment 1 Yu-Hsuan Lai 2020-04-07 14:15:36 UTC
Created attachment 127352 [details]
image properties.
Comment 2 Tiar 2020-04-07 16:38:44 UTC
Does it work properly on Krita/4.3 branch, if you can build, or at least in the latest released version, if you cannot build (I noticed there is no OSX Krita Plus version...)? I suspect this is an issue with resource rewrite as well...
Comment 3 Yu-Hsuan Lai 2020-04-08 05:14:37 UTC
(In reply to Tymond from comment #2)
> Does it work properly on Krita/4.3 branch, if you can build, or at least in
> the latest released version, if you cannot build (I noticed there is no OSX
> Krita Plus version...)? I suspect this is an issue with resource rewrite as
> well...

I tried to build but perhaps Qt's server is experiencing problems because I got stuck at

cmake --build . --config RelWithDebInfo --target ext_qt
[  0%] Performing download step (download, verify and extract) for 'ext_qt'

Either way this problem doesn't occur in Krita 4.2.9 (the latest stable version)
Comment 4 Yu-Hsuan Lai 2020-04-08 06:15:14 UTC
(In reply to raincolee from comment #3)
> (In reply to Tymond from comment #2)
> > Does it work properly on Krita/4.3 branch, if you can build, or at least in
> > the latest released version, if you cannot build (I noticed there is no OSX
> > Krita Plus version...)? I suspect this is an issue with resource rewrite as
> > well...
> 
> I tried to build but perhaps Qt's server is experiencing problems because I
> got stuck at
> 
> cmake --build . --config RelWithDebInfo --target ext_qt
> [  0%] Performing download step (download, verify and extract) for 'ext_qt'
> 
> Either way this problem doesn't occur in Krita 4.2.9 (the latest stable
> version)

Sorry, I was mistaken. It still happens in Krita 4.2.9. (But I remember at some point it worked before... it's strange. I double checked my Image Prooperties but the soft proofing profile was indeed set to a grayscale icc.)
Comment 5 David REVOY 2020-04-26 16:23:14 UTC
Created attachment 127896 [details]
Buggy soft-proofing (video): First art(jpg)=success. Second art(kra)=fail . Sorry for weird ratio of video.

Hey, I also got disoriented by this bug today; I had to Soft Proof a document (long time I haven't tested the feature since my last printing work with CGATS kicked me out of official real Soft Proofing territory for my book project). 

After getting obviously false colors, I immediately had the same move than @Yu-Hsuan Lai to check what was going on; I switched to a better test profile in Configure Krita> Color Management > Soft Proofing because it's easier to get a feedback: Grayscale/Alpha, Depth: 8-bit integer/channel, Profile: Gray-D50-elle-V2-srgbtrc.icc(Default), Proofing Intent: Perceptual. 

Result: If I press Ctrl+Y to activate it over a JPG saved on my disk and directly loaded on Krita, it surprisingly work as expected (it turns to black and white). But if I try to do the same over a newly created document or a multilayer Krita *.kra document, the color just get slightly altered/darkened and the colors doesn't switch to black and white (see video in attachement). The same happens of course with CMYK profiles.

I also tested it's not because of the original profile of the picture sRGB/Builtin or sRGB-elle-V2-srgbtrc.
Comment 6 vanyossi 2020-04-27 03:41:58 UTC
I Deevad can reproduce it Im setting this to confirmed.
Comment 7 David REVOY 2020-05-03 14:09:59 UTC
Also I'm pasting this for reference: https://twitter.com/AlectorFencer/status/1135807519279001600 : video of an artist using a device to turn her monitor to black&white to check value and someone in the comment tells they use Proofing to do it. I wanted to try that today, then I remember Soft Proofing was broken.
Comment 8 Halla Rempt 2020-05-03 15:22:21 UTC
David, could you perhaps check older appimages to see when this regression happened?
Comment 9 David REVOY 2020-05-03 21:19:07 UTC
I tested @Boud; and surprise: this bug looks like it was always around for the last two years; I started by testing on all 4.2.x I had from 4.2.9 to 4.2.2 and could reproduce. I went until 4.1 and could still reproduce. Under that, the appimage had difficulties to run (probably my settings got confused, but I don't think it's necessary to digg so far in the past :D).

It really affect making a softproof with Ctrl+Y after opening Krita files. (eg. any Krita files here you can download via "src" link https://www.peppercarrot.com/en/static6/sources&page=artworks ). All the appimage I tried worked with a flat jpg I had around; or when starting a new document with the background+new layer and a random red stroke.
Comment 10 Halla Rempt 2020-05-04 07:28:02 UTC
Ah, so it is only broken after loading an existing file?
Comment 11 David REVOY 2020-05-04 07:48:32 UTC
@Boud: Yes, only broken after loading an existing *.kra file (flat pictures like JPG works perfectly). I tried old Krita files and newer one; no differences.

Note: (not sure if can be related) The only other bug I have in mind that does this kind of difference between Krita document and flat document is the one about the Histogram docker that doesn't refresh on the flat picture: https://bugs.kde.org/show_bug.cgi?id=420014 .
Comment 12 wolthera 2020-05-10 11:33:28 UTC
Created attachment 128330 [details]
gif showing working behaviour

erm. I am trying to reproduce, but are we sure this isn't because the softproofing is saved inside kra files? Something which is done to ensure that documents are always using the proofing they're designed to work alongside?

Because I don't think deevad is reproducing yu-hsuan's issue. I think he's reproducing the fact that the softproofing is stored inside the kra document?
Comment 13 David REVOY 2020-05-18 14:22:19 UTC
Hey, I can still reproduce on 4.2.9 and 4.3beta~appimage. But I see by your gif you indeed have a multilayered that has soft proofing working on Git~master (cool!). I'll note to build Git~master and try again, thank you for the ping during Monday Meeting and sorry for late reply.
Comment 14 wolthera 2020-05-19 10:11:26 UTC
It works on 4.3 beta here, so unless it's specifically caused by the appimage, I still cannot reproduce it.

NOTE: You need to set the softproofing in the image properties, like Yu-Hsuan's instructions, not via the settings.
Comment 15 wolthera 2020-05-19 10:25:06 UTC
I am not getting it in an appimage either... I just cannot reproduce this bug, and again stress that the profile is set in the image properties and not the settings.
Comment 16 Halla Rempt 2020-05-19 11:19:29 UTC
I've just tried to reproduce as well:

* open a png
* set a grayscale softproofing profile in the image properties.
* check view->softproofing

The image was shown as gray, so that worked.

I saved the image as .kra (once with two layers, once with one layer)

I loaded the images, and checked view->softproofing. The embedded softproofing profile was correctly applied.

Checking view->softproofing sets the checkbox for embed softproofing profile in the  image's settings, but doesn't mark the image as modified. Unchecking it also doesn't mark the image as modified.

I unchecked the embed soft proofing profile in the image's settings, added a layer (to make the image modified) and saved. On reloading the image, the old softproofing profile was still embeded in the image: I think that's the real bug.

The other issue is that despite the warning that these are default settings for new images, the softproofing settings are treated as global softproofing settings for images without a softproofing profile embedded. If that confuses people like this, maybe we should consider changing it to what they do expect?
Comment 17 David REVOY 2020-05-19 13:22:28 UTC
Thank you very much. Mea Culpa: I now understand how I misunderstood the local/global system for softproofing. In fact, I was indeed ignoring the existence of **the local system** and I had no idea Krita saved a softproofing preference inside my documents by default even if unset. That was my mistake from the start.

I wish the local softproofing system (per document/inside image propertie) to be set to "Follow global softproofing" by default and load a profile only if this one was setup inside "image properties" dialog (tab Softproofing) by user. 

The fact that Krita did spread my global Softproofing (unset & default: to CMYK Chemical Proof) to all my previous document made me think of my (global) Softproofing option being a bug for all my Krita file. I understand all better now.
Comment 18 wolthera 2020-06-14 12:19:30 UTC
Git commit d10c71ed82a740c548c3e7ca78eafc327a4c8688 by Wolthera van Hövell tot Westerflier.
Committed on 14/06/2020 at 12:19.
Pushed by woltherav into branch 'master'.

Make store softproof toggle actually affect storing the softproofing.

Now the toggle 'store softproofing in image' also affects whether
Krita would like to save the softproofing config inside the file.

I am not sure what happened to break this. Old files of mine that
were made after Krita got softproofing have no stored softproofing,
meaning this checkbox must've worked at some point, but I cannot
find any commit messages about that?

M  +2    -1    libs/image/KisProofingConfiguration.cpp
M  +1    -0    libs/image/KisProofingConfiguration.h
M  +8    -2    libs/ui/dialogs/kis_dlg_image_properties.cc
M  +1    -0    plugins/impex/libkra/kis_kra_loader.cpp
M  +27   -22   plugins/impex/libkra/kis_kra_saver.cpp

https://invent.kde.org/graphics/krita/commit/d10c71ed82a740c548c3e7ca78eafc327a4c8688
Comment 19 wolthera 2020-06-14 12:20:30 UTC
Git commit ff42cceaeb6366b491c140f7255b5764263f438b by Wolthera van Hövell tot Westerflier.
Committed on 14/06/2020 at 12:20.
Pushed by woltherav into branch 'krita/4.3'.

Make store softproof toggle actually affect storing the softproofing.

Now the toggle 'store softproofing in image' also affects whether
Krita would like to save the softproofing config inside the file.

I am not sure what happened to break this. Old files of mine that
were made after Krita got softproofing have no stored softproofing,
meaning this checkbox must've worked at some point, but I cannot
find any commit messages about that?

M  +2    -1    libs/image/KisProofingConfiguration.cpp
M  +1    -0    libs/image/KisProofingConfiguration.h
M  +8    -2    libs/ui/dialogs/kis_dlg_image_properties.cc
M  +1    -0    plugins/impex/libkra/kis_kra_loader.cpp
M  +27   -22   plugins/impex/libkra/kis_kra_saver.cpp

https://invent.kde.org/graphics/krita/commit/ff42cceaeb6366b491c140f7255b5764263f438b
Comment 20 wolthera 2020-06-14 13:08:46 UTC
Git commit cd8ebd2b036dd91ed1a1dd2ea9bc9c42a035ddef by Wolthera van Hövell tot Westerflier.
Committed on 14/06/2020 at 13:08.
Pushed by woltherav into branch 'krita/4.3.0'.

Make store softproof toggle actually affect storing the softproofing.

Now the toggle 'store softproofing in image' also affects whether
Krita would like to save the softproofing config inside the file.

I am not sure what happened to break this. Old files of mine that
were made after Krita got softproofing have no stored softproofing,
meaning this checkbox must've worked at some point, but I cannot
find any commit messages about that?

M  +2    -1    libs/image/KisProofingConfiguration.cpp
M  +1    -0    libs/image/KisProofingConfiguration.h
M  +8    -2    libs/ui/dialogs/kis_dlg_image_properties.cc
M  +1    -0    plugins/impex/libkra/kis_kra_loader.cpp
M  +27   -22   plugins/impex/libkra/kis_kra_saver.cpp

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