Replace aligned bool with enum Alignment.
[dcpomatic.git] / src / lib / raw_image_proxy.cc
index ac8ff0763d103556b20b649574bad94515171f04..fb0d16df8a5b6cc29cef87a5054d85ccdc8dec5e 100644 (file)
@@ -58,16 +58,16 @@ RawImageProxy::RawImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
                xml->number_child<int>("Width"), xml->number_child<int>("Height")
                );
 
-       _image = make_shared<Image>(static_cast<AVPixelFormat>(xml->number_child<int>("PixelFormat")), size, true);
+       _image = make_shared<Image>(static_cast<AVPixelFormat>(xml->number_child<int>("PixelFormat")), size, Image::Alignment::PADDED);
        _image->read_from_socket (socket);
 }
 
 
 ImageProxy::Result
-RawImageProxy::image (bool aligned, optional<dcp::Size>) const
+RawImageProxy::image (Image::Alignment alignment, optional<dcp::Size>) const
 {
-       /* This ensure_aligned could be wasteful */
-       return Result (Image::ensure_aligned(_image, aligned), 0);
+       /* This ensure_alignment could be wasteful */
+       return Result (Image::ensure_alignment(_image, alignment), 0);
 }
 
 
@@ -96,7 +96,7 @@ RawImageProxy::same (shared_ptr<const ImageProxy> other) const
                return false;
        }
 
-       return (*_image.get()) == (*rp->image(_image->aligned()).image.get());
+       return (*_image.get()) == (*rp->image(_image->alignment()).image.get());
 }