-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16edb10
commit 203d621
Showing
10 changed files
with
233 additions
and
31 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"OTIO_SCHEMA": "Timeline.1", | ||
"metadata": {}, | ||
"name": "SimpleOver", | ||
"tracks": { | ||
"OTIO_SCHEMA": "Stack.1", | ||
"children": [ | ||
{ | ||
"OTIO_SCHEMA": "Track.1", | ||
"children": [ | ||
{ | ||
"OTIO_SCHEMA": "Clip.1", | ||
"media_reference": { | ||
"OTIO_SCHEMA": "ExternalReference.1", | ||
"available_range": { | ||
"OTIO_SCHEMA": "TimeRange.1", | ||
"duration": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 24 | ||
}, | ||
"start_time": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 0 | ||
} | ||
}, | ||
"target_url": "Letter_A.png" | ||
}, | ||
"source_range": { | ||
"OTIO_SCHEMA": "TimeRange.1", | ||
"duration": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 24 | ||
}, | ||
"start_time": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 0 | ||
} | ||
}, | ||
"name": "Letter_A" | ||
}, | ||
{ | ||
"OTIO_SCHEMA": "Gap.1", | ||
"name": "Gap", | ||
"source_range": { | ||
"OTIO_SCHEMA": "TimeRange.1", | ||
"duration": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 24 | ||
}, | ||
"start_time": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 0 | ||
} | ||
} | ||
}, | ||
{ | ||
"OTIO_SCHEMA": "Clip.1", | ||
"media_reference": { | ||
"OTIO_SCHEMA": "ExternalReference.1", | ||
"available_range": { | ||
"OTIO_SCHEMA": "TimeRange.1", | ||
"duration": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 24 | ||
}, | ||
"start_time": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 0 | ||
} | ||
}, | ||
"target_url": "Letter_C.png" | ||
}, | ||
"source_range": { | ||
"OTIO_SCHEMA": "TimeRange.1", | ||
"duration": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 24 | ||
}, | ||
"start_time": { | ||
"OTIO_SCHEMA": "RationalTime.1", | ||
"rate": 24, | ||
"value": 0 | ||
} | ||
}, | ||
"name": "Letter_C" | ||
} | ||
], | ||
"kind": "Video", | ||
"name": "Video" | ||
} | ||
], | ||
"name": "Stack" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright (c) 2024 Darby Johnston | ||
// All rights reserved. | ||
|
||
#include "ImageFill.h" | ||
|
||
#include <OpenImageIO/imagebufalgo.h> | ||
|
||
namespace toucan | ||
{ | ||
ImageFill::~ImageFill() | ||
{} | ||
|
||
void ImageFill::setSize(int width, int height) | ||
{ | ||
_width = width; | ||
_height = height; | ||
} | ||
|
||
void ImageFill::setColor(float r, float g, float b, float a) | ||
{ | ||
_r = r; | ||
_g = g; | ||
_b = b; | ||
_a = a; | ||
} | ||
|
||
OIIO::ImageBuf ImageFill::exec() | ||
{ | ||
OIIO::ImageBuf buf = OIIO::ImageBufAlgo::fill( | ||
{ _r, _g, _b, _a }, | ||
OIIO::ROI(0, _width, 0, _height, 0, 1, 0, 4)); | ||
return buf; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright (c) 2024 Darby Johnston | ||
// All rights reserved. | ||
|
||
#pragma once | ||
|
||
#include <toucan/ImageOp.h> | ||
|
||
#include <filesystem> | ||
|
||
namespace toucan | ||
{ | ||
//! Image fill. | ||
class ImageFill : public IImageOp | ||
{ | ||
public: | ||
virtual ~ImageFill(); | ||
|
||
void setSize(int width, int height); | ||
|
||
void setColor(float r, float g, float b, float a); | ||
|
||
OIIO::ImageBuf exec() override; | ||
|
||
private: | ||
int _width = 0; | ||
int _height = 0; | ||
float _r = 0.F; | ||
float _g = 0.F; | ||
float _b = 0.F; | ||
float _a = 0.F; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters