MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / FindResizingCropEffect

Function FindResizingCropEffect

src/effects/CropHelpers.cpp:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace openshot {
23
24const Crop* FindResizingCropEffect(Clip* clip) {
25 if (!clip) {
26 return nullptr;
27 }
28
29 for (auto effect : clip->Effects()) {
30 if (auto crop_effect = dynamic_cast<Crop*>(effect)) {
31 if (crop_effect->resize) {
32 return crop_effect;
33 }
34 }
35 }
36
37 return nullptr;
38}
39
40void ApplyCropResizeScale(Clip* clip, int source_width, int source_height, int& max_width, int& max_height) {
41 const Crop* crop_effect = FindResizingCropEffect(clip);

Callers 1

ApplyCropResizeScaleFunction · 0.85

Calls 1

EffectsMethod · 0.45

Tested by

no test coverage detected