summaryrefslogtreecommitdiff
path: root/src/lib/guess_crop.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-06 17:45:47 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-26 17:20:24 +0100
commit63e3cd7c11e9783feccd8213e7f3525bdf1cfd3d (patch)
treebffa338795fddfb5b67e524b4db1a6d5284a83dd /src/lib/guess_crop.cc
parent8bfad2f1321042c00abbf7ef8d8486cb4f0af3f9 (diff)
Rename guess_crop -> guess_crop_by_brightness.
Diffstat (limited to 'src/lib/guess_crop.cc')
-rw-r--r--src/lib/guess_crop.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/guess_crop.cc b/src/lib/guess_crop.cc
index 5eb7e66e8..14ef9a9ed 100644
--- a/src/lib/guess_crop.cc
+++ b/src/lib/guess_crop.cc
@@ -32,7 +32,7 @@ using namespace dcpomatic;
Crop
-guess_crop (shared_ptr<const Image> image, double threshold)
+guess_crop_by_brightness(shared_ptr<const Image> image, double threshold)
{
auto const width = image->size().width;
auto const height = image->size().height;
@@ -73,7 +73,7 @@ guess_crop (shared_ptr<const Image> image, double threshold)
break;
}
default:
- throw PixelFormatError("guess_crop()", image->pixel_format());
+ throw PixelFormatError("guess_crop_by_brightness()", image->pixel_format());
}
return brightest > threshold;
@@ -115,7 +115,7 @@ guess_crop (shared_ptr<const Image> image, double threshold)
/** @param position Time within the content to get a video frame from when guessing the crop */
Crop
-guess_crop (shared_ptr<const Film> film, shared_ptr<const Content> content, double threshold, ContentTime position)
+guess_crop_by_brightness(shared_ptr<const Film> film, shared_ptr<const Content> content, double threshold, ContentTime position)
{
DCPOMATIC_ASSERT (content->video);
@@ -126,7 +126,7 @@ guess_crop (shared_ptr<const Film> film, shared_ptr<const Content> content, doub
auto crop = Crop{};
auto handle_video = [&done, &crop, threshold](ContentVideo video) {
- crop = guess_crop(video.image->image(Image::Alignment::COMPACT).image, threshold);
+ crop = guess_crop_by_brightness(video.image->image(Image::Alignment::COMPACT).image, threshold);
done = true;
};