Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-73171

QColor::toCmyk(): wrong result value for "black"

    XMLWordPrintable

Details

    • All
    • 01f090e9e45399f72b8bc73793797d44a69b2a2e (qt/qtbase/5.12)

    Description

      RGB-black (R=0, G=0, B=0) is converted to CMYK(C=1, M=1, Y=1, K=1) instead of CMYK(C=0, M=0, Y=0, K=1), which would be the preferred and correct result.

      Suggested change (qcolor.cpp, toCmyk()):

      if (!qFuzzyIsNull(k - 1)) {
       c = (c - k) / (qreal(1.0) - k);
       m = (m - k) / (qreal(1.0) - k);
       y = (y - k) / (qreal(1.0) - k);
      } 
      // begin of change --> 
      else {
       c = 0;
       m = 0;
       y = 0;
      }
      // <-- end of change

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            tneuhofer Thomas Neuhofer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes