Boost GIL


Public Member Functions | List of all members
default_color_converter_impl< rgb_t, cmyk_t > Struct Template Reference

RGB to CMYK (not the fastest code in the world) More...

#include <color_convert.hpp>

Public Member Functions

template<typename SrcPixel , typename DstPixel >
void operator() (SrcPixel const &src, DstPixel &dst) const
 

Detailed Description

template<>
struct boost::gil::default_color_converter_impl< rgb_t, cmyk_t >

RGB to CMYK (not the fastest code in the world)

k = min(1 - r, 1 - g, 1 - b) c = (1 - r - k) / (1 - k) m = (1 - g - k) / (1 - k) y = (1 - b - k) / (1 - k) where `1` denotes max value of channel type of destination pixel.

The conversion from RGB to CMYK is based on CMY->CMYK (Version 2) from the Principles of Digital Image Processing - Fundamental Techniques by Burger, Wilhelm, Burge, Mark J. and it is a gross approximation not precise enough for professional work.


The documentation for this struct was generated from the following file: