Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

open Colors may be produced by one of two methods For systems that produce color by the transmission of light (e.g., LCD panels, digital cameras,

open
image text in transcribed
image text in transcribed
Colors may be produced by one of two methods For systems that produce color by the transmission of light (e.g., LCD panels, digital cameras, monitors, etc) the additive color approach is used. The additive primary colors are red (R), green (G), and blue (B). Adding R and G light makes yellow (Y). Similarly, G+ B cyan (C) and R +B magenta (M). Combining all three additive primaries makes white, while the absence of any light results in black. This system is known as the RGB format, in which we specify the amount of red, green and blue light. If we use a scale of 0-255 for each color, then the color of an individual pixel, may be stored in 3 bytes (known as 24-bit color) and allows for 256x256x25616 million distinct colors. For systems that produce color by the reflection of light (e.g., prints, film, etc.) the subtractive color approach is used. The picture is illuminated by white light (which contains all possible colors) and the dye or pigment removes the unwanted color reflecting only the colors that are observed. The subtractive primaries are cyan (C), magenta (M) and yellow (Y). Theoretically, equal amounts of cyan, magenta and yellow, C+M+Y, should absorb all light producing black. In practice this is difficult to achieve so that a fourth pigment, black (K- in order not to confuse this with blue), is added. This system is known as the CMYK format. The CYMK format represents colors on a scale from 0.0 to 1.0. Ordinarily, editing of an image on a computer is done using RGB, which the computer converts to CMYK for printing. The conversion may be done as follows: If the RGB values are all 0 then the CMY values are all 0 and the K value is 1 Otherwise use the following formulas: w = max(r /255, g /255,b /255) c=(w-(r/255)) / w m=(w-(g/255))/w y=(w-(b / 255))/w If the values are negative take the absolute value. Write a program that converts RGB to CMYK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago