Convert the image to a different colorspace.
Wraps Image.to_colorspace/2. Covers two CDN-grammar features
with one IR primitive:
Monochrome —
target: :bwproduces a true 1-channel grayscale image (smaller bytes thanAdjust{saturation: 0.0}). Used by imgix'smonochrome=<hex>(the hex tint is not yet honoured — v0.1 produces plain B&W).Colorspace conversion — any other target. Used by imgix's
cs=<space>and Cloudinary'scs_<space>. Common values include:srgb,:cmyk,:rgb,:lab,:hsv. SeeImage.Interpretation.known_interpretations/0for the full listImage.to_colorspace/2accepts.
Pipeline ordering
The Image.Plug.Pipeline.Normaliser slots Colorspace between
Adjust (which expects RGB) and ReplaceColor (whose colour
matching operates on the post-conversion bytes). When you don't
use Adjust or ReplaceColor, the relative order doesn't matter.
Summary
Types
@type t() :: %Image.Plug.Pipeline.Ops.Colorspace{target: atom()}