|
OpenShot Library | libopenshot
0.7.0
|
Go to the documentation of this file.
13 #ifndef OPENSHOT_DISPLACE_EFFECT_H
14 #define OPENSHOT_DISPLACE_EFFECT_H
16 #include "../EffectBase.h"
20 #include "../KeyFrame.h"
41 std::shared_ptr<QImage> cached_single_map_image;
42 int cached_single_map_width = 0;
43 int cached_single_map_height = 0;
46 void init_effect_details();
49 std::shared_ptr<QImage> GetMapImage(std::shared_ptr<QImage> target_image, int64_t frame_number);
80 std::shared_ptr<openshot::Frame>
GetFrame(int64_t frame_number)
override {
return GetFrame(std::make_shared<openshot::Frame>(), frame_number); }
91 std::shared_ptr<openshot::Frame>
GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
override;
94 std::string
Json()
const override;
95 void SetJson(
const std::string value)
override;
101 std::string
PropertiesJSON(int64_t requested_frame)
const override;
This abstract class is the base class, used by all effects in libopenshot.
Keyframe horizontal
Horizontal displacement amount as a percentage of image width.
Json::Value JsonValue() const override
Generate Json::Value for this object.
This namespace is the default namespace for all code in the openshot library.
std::string PropertiesJSON(int64_t requested_frame) const override
Keyframe contrast
Contrast adjustment for the displacement map.
Keyframe strength
Overall strength multiplier for the displacement effect.
void SetJson(const std::string value) override
Load JSON string into this object.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
ReaderBase * Reader()
Get the reader object of the displacement map.
Keyframe vertical
Vertical displacement amount as a percentage of image height.
Keyframe brightness
Brightness adjustment for the displacement map.
Displace()
Blank constructor, useful when using Json to load the effect properties.
std::shared_ptr< openshot::Frame > GetFrame(int64_t frame_number) override
This method is required for all derived classes of ClipBase, and returns a new openshot::Frame object...
This class uses a grayscale image or video to displace frame pixels.
This abstract class is the base class, used by all readers in libopenshot.
bool invert
Invert the displacement map before converting it to offsets.
std::string Json() const override
Generate JSON string of this object.
bool replace_image
Replace the frame image with the processed displacement map for debugging.