Bug 454812

Summary: inconsistent return value for setColorSpace and setColorProfile
Product: [Applications] krita Reporter: Luuk <luuk.kouijzer>
Component: ScriptingAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: minor CC: halla
Priority: NOR    
Version: 5.0.2   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:

Description Luuk 2022-06-03 18:59:38 UTC
SUMMARY
setColorSpace returns True if an invalid color profile is used
setColorProfile returns False if an invalid color profile is used

STEPS TO REPRODUCE
1. use setColorSpace with invalid color profile, setColorSpace( "CMYKA", "U8", "FOGRA39L_coated.icc")
2. use setColorProfile with invalid color profile, setColorProfile( "FOGRA39L_coated.icc")
3. 

OBSERVED RESULT
1 returns True
2 returns False

EXPECTED RESULT
1 returns False
2 returns False


SOFTWARE/OS VERSIONS
Qt 5.12.8 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.3.0) on "xcb" 
OS: Linux Mint 20.3 [linux version 5.13.0-44-generic]

ADDITIONAL INFORMATION
If an invalid color profile is used the function setColorSpace in the scripter it should return False just like setColorProfile. 
The checks from setColorProfile should be added to setColorSpace.
Comment 1 Halla Rempt 2022-06-24 10:43:45 UTC
Git commit 9601a30c2eea2931066d17e0059e213cf37c4c21 by Halla Rempt.
Committed on 24/06/2022 at 10:43.
Pushed by rempt into branch 'master'.

Return false from setColorSpace if the profile could not be retrieved

M  +1    -0    libs/libkis/Node.cpp

https://invent.kde.org/graphics/krita/commit/9601a30c2eea2931066d17e0059e213cf37c4c21
Comment 2 Halla Rempt 2022-06-24 10:43:54 UTC
Git commit 8226914bd7f92467665a5aca1d9ea8ef4153c389 by Halla Rempt.
Committed on 24/06/2022 at 10:43.
Pushed by rempt into branch 'krita/5.1'.

Return false from setColorSpace if the profile could not be retrieved
(cherry picked from commit 9601a30c2eea2931066d17e0059e213cf37c4c21)

M  +1    -0    libs/libkis/Node.cpp

https://invent.kde.org/graphics/krita/commit/8226914bd7f92467665a5aca1d9ea8ef4153c389