diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
| commit | ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (patch) | |
| tree | c55e4b85ee30138ce83263045d77d01631378b2e /src/mono_picture_frame.h | |
| parent | 6c37cc1979b2a01205a888c4c98f3334685ee8dd (diff) | |
Tidying.
Diffstat (limited to 'src/mono_picture_frame.h')
| -rw-r--r-- | src/mono_picture_frame.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/mono_picture_frame.h b/src/mono_picture_frame.h index d6774aef..52cf7965 100644 --- a/src/mono_picture_frame.h +++ b/src/mono_picture_frame.h @@ -32,22 +32,22 @@ */ -#ifndef LIBDCP_MONO_PICTURE_FRAME_H -#define LIBDCP_MONO_PICTURE_FRAME_H - - /** @file src/mono_picture_frame.h * @brief MonoPictureFrame class */ -#include "types.h" +#ifndef LIBDCP_MONO_PICTURE_FRAME_H +#define LIBDCP_MONO_PICTURE_FRAME_H + + #include "asset_reader.h" -#include <memory> +#include "types.h" #include <boost/filesystem.hpp> #include <boost/optional.hpp> -#include <string> +#include <memory> #include <stdint.h> +#include <string> namespace ASDCP { @@ -66,21 +66,33 @@ class OpenJPEGImage; /** @class MonoPictureFrame - * @brief A single frame of a 2D (monoscopic) picture asset. + * @brief A single frame of a 2D (monoscopic) picture asset */ class MonoPictureFrame : public Data { public: + /** Make a picture frame from a JPEG2000 file. + * @param path Path to JPEG2000 file. + */ explicit MonoPictureFrame (boost::filesystem::path path); MonoPictureFrame (uint8_t const * data, int size); MonoPictureFrame (MonoPictureFrame const&) = delete; MonoPictureFrame& operator= (MonoPictureFrame const&) = delete; + /** @param reduce a factor by which to reduce the resolution + * of the image, expressed as a power of two (pass 0 for no + * reduction). + */ std::shared_ptr<OpenJPEGImage> xyz_image (int reduce = 0) const; + /** @return Pointer to JPEG2000 data */ uint8_t const * data () const; + + /** @return Pointer to JPEG2000 data */ uint8_t* data (); + + /** @return Size of JPEG2000 data in bytes */ int size () const; private: |
