#pragma once #include "core/effect.hpp" namespace effector { // Converts its input to black and white, with the choice of channel weighting // a photographer would make behind the lens (a red filter darkening a sky, for // instance), an optional contrast pull and an optional toner. Like the blur it // needs no source images of its own, so it can lead a chain; given sources it // fills the canvas from one of them first. class MonochromeEffect : public Effect { public: std::string name() const override { return "monochrome"; } std::string title() const override { return "Black and white"; } std::string description() const override { return "Converts its input to black and white with a choice of channel weighting, an " "optional contrast pull and an optional toner; with sources loaded it fills the " "canvas from a randomly chosen one first."; } const std::vector& params() const override; bool needsSources() const override { return false; } Image render(const std::vector& sources, int width, int height, Rng& rng, const ParamValues& values) const override; }; } // namespace effector