libdcp
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dcp::OpenJPEGImage Class Reference

A wrapper of libopenjpeg's opj_image_t. More...

#include <openjpeg_image.h>

Public Member Functions

 OpenJPEGImage (opj_image_t *)
 
 OpenJPEGImage (OpenJPEGImage const &other)
 
 OpenJPEGImage (Size)
 
 OpenJPEGImage (uint8_t const *in_16, dcp::Size size, int stride)
 
int * data (int) const
 
Size size () const
 
int precision (int component) const
 
bool srgb () const
 
int factor (int component) const
 
opj_image_t * opj_image () const
 

Private Member Functions

void create (Size size)
 

Private Attributes

opj_image_t * _opj_image = nullptr
 opj_image_t that we are managing
 

Detailed Description

A wrapper of libopenjpeg's opj_image_t.

Definition at line 53 of file openjpeg_image.h.

Constructor & Destructor Documentation

◆ OpenJPEGImage() [1/3]

OpenJPEGImage::OpenJPEGImage ( opj_image_t *  image)
explicit

Construct an OpenJPEGImage, taking ownership of the opj_image_t

Definition at line 54 of file openjpeg_image.cc.

◆ OpenJPEGImage() [2/3]

OpenJPEGImage::OpenJPEGImage ( Size  size)
explicit

Construct a new OpenJPEGImage with undefined contents

Parameters
sizeSize for the frame in pixels

Definition at line 90 of file openjpeg_image.cc.

◆ OpenJPEGImage() [3/3]

OpenJPEGImage::OpenJPEGImage ( uint8_t const *  in_16,
dcp::Size  size,
int  stride 
)
Parameters
data_16XYZ/RGB image data in packed 16:16:16, 48bpp with the 2-byte value for each component stored as little-endian

Definition at line 96 of file openjpeg_image.cc.

Member Function Documentation

◆ data()

int * OpenJPEGImage::data ( int  c) const
Parameters
cComponent index (0, 1 or 2)
Returns
Pointer to the data for component c.

Definition at line 151 of file openjpeg_image.cc.

◆ opj_image()

opj_image_t* dcp::OpenJPEGImage::opj_image ( ) const
inline
Returns
Pointer to opj_image_t struct. The caller must not delete this.

Definition at line 88 of file openjpeg_image.h.

◆ size()

dcp::Size OpenJPEGImage::size ( ) const
Returns
Size of the image in pixels

Definition at line 159 of file openjpeg_image.cc.


The documentation for this class was generated from the following files: