You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Improved image caching logic, to better estimate max image sizes possible, based on clip scale and keyframe settings... so we are always dealing with the smallest possible frame sizes for performance (without losing quality)
This commit is contained in:
@@ -220,6 +220,25 @@ Point Keyframe::GetClosestPoint(Point p) {
|
||||
return closest;
|
||||
}
|
||||
|
||||
// Get max point (by Y coordinate)
|
||||
Point Keyframe::GetMaxPoint() {
|
||||
Point maxPoint(-1, -1);
|
||||
|
||||
// loop through points, and find the largest Y value
|
||||
for (long int x = 0; x < Points.size(); x++) {
|
||||
// Get each point
|
||||
Point existing_point = Points[x];
|
||||
|
||||
// Is point larger than max point
|
||||
if (existing_point.co.Y >= maxPoint.co.Y) {
|
||||
// New max point found
|
||||
maxPoint = existing_point;
|
||||
}
|
||||
}
|
||||
|
||||
return maxPoint;
|
||||
}
|
||||
|
||||
// Get the value at a specific index
|
||||
float Keyframe::GetValue(long int index)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user