summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-01-07 00:40:59 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-08 21:52:48 +0100
commit6779cb55bfa4290412272cd744d06eb8a34e079e (patch)
treeeca669cfcf26ba731d79eca73f7bbfabe0e1ff32 /src/lib
parente3c45e221da3b05ec4ab6878e1f629399fbd86bf (diff)
fixup! Add image_from_jpeg().
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/image_jpeg.cc4
-rw-r--r--src/lib/image_jpeg.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/image_jpeg.cc b/src/lib/image_jpeg.cc
index b92be0d9d..ecf9b714f 100644
--- a/src/lib/image_jpeg.cc
+++ b/src/lib/image_jpeg.cc
@@ -135,7 +135,7 @@ image_as_jpeg (shared_ptr<const Image> image, int quality)
shared_ptr<Image>
-image_from_jpeg(boost::filesystem::path file)
+image_from_jpeg(boost::filesystem::path file, Image::Alignment alignment)
{
struct jpeg_decompress_struct decompress;
struct jpeg_error_mgr error;
@@ -156,7 +156,7 @@ image_from_jpeg(boost::filesystem::path file)
auto output = std::make_shared<Image>(
AV_PIX_FMT_RGB24,
dcp::Size{static_cast<int>(decompress.output_width), static_cast<int>(decompress.output_height)},
- Image::Alignment::COMPACT
+ alignment
);
while (decompress.output_scanline < decompress.output_height) {
diff --git a/src/lib/image_jpeg.h b/src/lib/image_jpeg.h
index 29097680e..2bb74841c 100644
--- a/src/lib/image_jpeg.h
+++ b/src/lib/image_jpeg.h
@@ -19,8 +19,8 @@
*/
-class Image;
+#include "image.h"
-std::shared_ptr<Image> image_from_jpeg(boost::filesystem::path file);
+std::shared_ptr<Image> image_from_jpeg(boost::filesystem::path file, Image::Alignment alignment);
dcp::ArrayData image_as_jpeg (std::shared_ptr<const Image> image, int quality);