A project can now be a clip: Setup has a Video switch with a length, a frame rate and presets that set the canvas too (Instagram story, reel and feed video, TikTok / YouTube Short, Square loop, Full HD clip). The preview renders the whole clip, shrunk to a memory budget, and loops it with play/pause and a scale; Save As... renders it again at full size and pipes the frames into ffmpeg as .mp4, .mov, .mkv, .webm or .gif, with a progress window that can cancel. --duration, --fps and --video-preset do the same from the command line. Effects learn about time through FrameTime and Effect::renderFrame, which falls back to render, so nothing that holds still changes. Channel split now sways, shakes and rolls a tracking bar down the picture in a video; its motion params are marked forVideo() and hidden in a still project, and a still renders byte for byte as before. renderFrames starts every frame from the same seed and renders the still stages ahead of the first moving one only once. The version moves to 0.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.4 KiB
C++
33 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "core/effect.hpp"
|
|
|
|
namespace effector {
|
|
|
|
// Knocks the red, green and blue planes out of register, either the whole image
|
|
// at once or band by band, each band with offsets of its own.
|
|
// In a video the channels do not sit still: they sway, shake from frame to
|
|
// frame, and a tracking bar rolls down the picture as on a worn tape or an old
|
|
// tube. A still picture is rendered exactly as it always was.
|
|
// A pure transform: it needs no source images, and leading a chain with
|
|
// sources loaded it starts from a crop of a randomly chosen one.
|
|
class ChannelSplitEffect : public Effect {
|
|
public:
|
|
std::string name() const override { return "channelsplit"; }
|
|
std::string title() const override { return "Channel split"; }
|
|
std::string description() const override {
|
|
return "Knocks the red, green and blue planes out of register, over the whole image or "
|
|
"band by band.";
|
|
}
|
|
const std::vector<ParamSpec>& params() const override;
|
|
bool needsSources() const override { return false; }
|
|
bool animated(const ParamValues& values) const override;
|
|
|
|
Image render(const std::vector<Image>& sources, int width, int height, Rng& rng,
|
|
const ParamValues& values) const override;
|
|
Image renderFrame(const std::vector<Image>& sources, int width, int height, Rng& rng,
|
|
const ParamValues& values, const FrameTime& frame) const override;
|
|
};
|
|
|
|
} // namespace effector
|