Bug 454812 - inconsistent return value for setColorSpace and setColorProfile
Summary: inconsistent return value for setColorSpace and setColorProfile
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 5.0.2
Platform: Mint (Ubuntu based) Linux
: NOR minor
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-03 18:59 UTC by Luuk
Modified: 2022-06-24 10:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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