[Interest] QColor methods saturation(), value() and getHsv() are incredibly slow

2012-09-20 Thread Jochen Pernsteiner
Hello,Im playing around with an application were I use a QImage with a RGB32 format.I used the QColor method saturation() and value() to compute these values (I do notneed hue), and found out that these functions (and naturally also getHSV()) are incredibly slow.I wrote a straightforward

Re: [Interest] QColor methods saturation(), value() and getHsv() are incredibly slow

2012-09-20 Thread Constantin Makshin
If you look at the code of QColor::toHsv(), you'll see that: 1) *all* calculations are done in floating point (probably to get better accuracy, but I can't say for sure); 2) most of the time is spent calculating hue. So no wonder your mostly-integer no-hue function is faster. On 09/20/2012 09:19