+static inline void wx_cmyk_to_rgb(unsigned char* rgb, const unsigned char* cmyk)
+{
+ register int k = 255 - cmyk[3];
+ register int k2 = cmyk[3];
+ register int c;
+
+ c = k + k2 * (255 - cmyk[0]) / 255;
+ rgb[0] = (unsigned char)((c > 255) ? 0 : (255 - c));
+
+ c = k + k2 * (255 - cmyk[1]) / 255;
+ rgb[1] = (unsigned char)((c > 255) ? 0 : (255 - c));
+
+ c = k + k2 * (255 - cmyk[2]) / 255;
+ rgb[2] = (unsigned char)((c > 255) ? 0 : (255 - c));
+}