C Program To Convert (R, G, B) To (C, M, Y, K) Color Format
Satish B
http://technotip.com/7200/c-program-to-convert-rgb-to-cmyk-color-format/
In digital world colors are specified in Red-Green-Blue (RGB) format, with values of R, G, B varying on an integer scale from 0 to 255. In print publishing the colors are mentioned in Cyan-Magenta-Yellow-Black (CMYK) format, with values of C, M, Y and K varying on a real scale from 0.0 to 1.0. Write a C program that converts RGB color to CMYK color as per the following formulae:
White = Max(Red/255, Green/255, Blue/255); Cyan = (White – Red/255) / White; Magenta = (White – Green/255) / White; Yellow = ( White – Blue/255) / White; Black = 1-White
Note that if the RGB values are all 0, then the CMY values are all 0 and the K value is 1.
C Programming Interview / Viva Q&A List http://technotip.com/6378/c-programming-interview-viva-qa-list/
C Programming: Beginner To Advance To Expert http://technotip.com/6086/c-programming-beginner-to-advance-to-expert/ ... https://www.youtube.com/watch?v=JgXAyBP8w8w
12589823 Bytes