diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-01-22 13:26:02 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-02-05 22:47:33 +0000 |
commit | 01f090e9e45399f72b8bc73793797d44a69b2a2e (patch) | |
tree | 703d8dcc8ff02dc92ce526c5a68630bebbffbe0d /src/widgets | |
parent | 66c3a71e91edefdf5bc5c8efb009fb5f0f330cd1 (diff) |
Fix QColor::toCmyk() for rgb(0, 0, 0)
We translate all pure gray colors into cmyk having c,m,y=0 and only
the k value expressing the darkness. But a fix introduced to avoid
division by 0 caused rgb(0, 0, 0) to be an exception to this; it ended
up being translated as c,m,y,k=1 instead.
Fix by catching the potential div-by-0 situation earlier and directly
set the orthodox cmyk translation: c,m,y=0,k=1.
Fixes: QTBUG-73171
Change-Id: I3774eaf9d96e096ac5c47c55d28881bea2bd1309
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/widgets')
0 files changed, 0 insertions, 0 deletions