GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
__magick_read__.cc File Reference
#include "file-stat.h"
#include "oct-env.h"
#include "oct-time.h"
#include "defun.h"
#include "error.h"
#include "ov-struct.h"
#include "errwarn.h"
#include <Magick++.h>
#include <clocale>
Include dependency graph for __magick_read__.cc:

Go to the source code of this file.

Classes

class  image_region
 

Macros

#define COMPRESS_MAGICK_IMAGE_VECTOR(GM_TYPE)
 

Functions

template<typename T >
static octave_idx_type bitdepth_from_class ()
 
static void encode_bool_image (std::vector< Magick::Image > &imvec, const boolNDArray &img)
 
template<typename T >
static void encode_indexed_images (std::vector< Magick::Image > &imvec, const T &img, const Matrix &cmap)
 
template<typename T >
static void encode_uint_image (std::vector< Magick::Image > &imvec, const T &img, const T &alpha)
 
OCTAVE_EXPORT octave_value_list F__magick_finfo__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__magick_formats__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__magick_ping__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__magick_read__ (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list F__magick_write__ (const octave_value_list &args, int)
 
static void fill_exif (octave_scalar_map &map, Magick::Image &img, const std::string &key)
 
static void fill_exif_floats (octave_scalar_map &map, Magick::Image &img, const std::string &key)
 
static void fill_exif_ints (octave_scalar_map &map, Magick::Image &img, const std::string &key)
 
static octave_idx_type get_depth (Magick::Image &img)
 
static Range get_region_range (const octave_value &region)
 
template<typename T >
static uint32NDArray img_float2uint (const T &img)
 
static std::map< octave_idx_type, std::string > init_disposal_methods ()
 
static Magick::Image init_enconde_image (const octave_idx_type &nCols, const octave_idx_type &nRows, const octave_idx_type &bitdepth, const Magick::ImageType &type, const Magick::ClassType &klass)
 
static std::map< std::string, octave_idx_typeinit_reverse_disposal_methods ()
 
static bool is_indexed (const Magick::Image &img)
 
static bool is_valid_exif (const std::string &val)
 
static octave_value magick_to_octave_value (const Magick::CompressionType &magick)
 
static octave_value magick_to_octave_value (const Magick::EndianType &magick)
 
static octave_value magick_to_octave_value (const Magick::OrientationType &magick)
 
static octave_value magick_to_octave_value (const Magick::ResolutionType &magick)
 
static void maybe_initialize_magick (void)
 
static void read_file (const std::string &filename, std::vector< Magick::Image > &imvec)
 
template<typename T >
octave_value_list read_images (std::vector< Magick::Image > &imvec, const Array< octave_idx_type > &frameidx, const octave_idx_type &nargout, const octave_scalar_map &options)
 
template<typename T >
static octave_value_list read_indexed_images (const std::vector< Magick::Image > &imvec, const Array< octave_idx_type > &frameidx, const octave_idx_type &nargout, const octave_scalar_map &options)
 
static octave_value_list read_maps (Magick::Image &img)
 
static void write_file (const std::string &filename, const std::string &ext, std::vector< Magick::Image > &imvec)
 

Macro Definition Documentation

◆ COMPRESS_MAGICK_IMAGE_VECTOR

#define COMPRESS_MAGICK_IMAGE_VECTOR (   GM_TYPE)
Value:
for (std::vector<Magick::Image>::size_type i = 0; i < imvec.size (); i++) \
imvec[i].compressType (GM_TYPE)

Function Documentation

◆ bitdepth_from_class()

template<typename T >
static octave_idx_type bitdepth_from_class ( )
static

Definition at line 968 of file __magick_read__.cc.

◆ encode_bool_image()

static void encode_bool_image ( std::vector< Magick::Image > &  imvec,
const boolNDArray img 
)
static

◆ encode_indexed_images()

template<typename T >
static void encode_indexed_images ( std::vector< Magick::Image > &  imvec,
const T &  img,
const Matrix cmap 
)
static

◆ encode_uint_image()

template<typename T >
static void encode_uint_image ( std::vector< Magick::Image > &  imvec,
const T &  img,
const T &  alpha 
)
static

Definition at line 1127 of file __magick_read__.cc.

References error(), init_enconde_image(), and octave::math::round().

◆ F__magick_finfo__()

◆ F__magick_formats__()

◆ F__magick_ping__()

OCTAVE_EXPORT octave_value_list F__magick_ping__ ( const octave_value_list args,
int   
)

◆ F__magick_read__()

◆ F__magick_write__()

◆ fill_exif()

static void fill_exif ( octave_scalar_map map,
Magick::Image &  img,
const std::string &  key 
)
static

Definition at line 1830 of file __magick_read__.cc.

References is_valid_exif(), and octave_scalar_map::setfield().

Referenced by F__magick_finfo__().

◆ fill_exif_floats()

static void fill_exif_floats ( octave_scalar_map map,
Magick::Image &  img,
const std::string &  key 
)
static

Definition at line 1863 of file __magick_read__.cc.

References is_valid_exif(), n, and octave_scalar_map::setfield().

Referenced by F__magick_finfo__().

◆ fill_exif_ints()

static void fill_exif_ints ( octave_scalar_map map,
Magick::Image &  img,
const std::string &  key 
)
static

Definition at line 1840 of file __magick_read__.cc.

References is_valid_exif(), n, and octave_scalar_map::setfield().

Referenced by F__magick_finfo__().

◆ get_depth()

static octave_idx_type get_depth ( Magick::Image &  img)
static

Definition at line 121 of file __magick_read__.cc.

Referenced by F__magick_finfo__(), and F__magick_read__().

◆ get_region_range()

◆ img_float2uint()

template<typename T >
static uint32NDArray img_float2uint ( const T &  img)
static

Definition at line 948 of file __magick_read__.cc.

References Array< T >::fortran_vec(), max(), octave_int< T >::max(), and numel().

◆ init_disposal_methods()

static std::map<octave_idx_type, std::string> init_disposal_methods ( )
static

Definition at line 1407 of file __magick_read__.cc.

Referenced by F__magick_finfo__().

◆ init_enconde_image()

static Magick::Image init_enconde_image ( const octave_idx_type nCols,
const octave_idx_type nRows,
const octave_idx_type bitdepth,
const Magick::ImageType &  type,
const Magick::ClassType &  klass 
)
static

Definition at line 977 of file __magick_read__.cc.

Referenced by encode_bool_image(), encode_indexed_images(), and encode_uint_image().

◆ init_reverse_disposal_methods()

static std::map<std::string, octave_idx_type> init_reverse_disposal_methods ( )
static

Definition at line 1435 of file __magick_read__.cc.

Referenced by F__magick_write__().

◆ is_indexed()

static bool is_indexed ( const Magick::Image &  img)
static

Definition at line 75 of file __magick_read__.cc.

Referenced by F__magick_finfo__(), and F__magick_read__().

◆ is_valid_exif()

static bool is_valid_exif ( const std::string &  val)
static

Definition at line 1822 of file __magick_read__.cc.

Referenced by fill_exif(), fill_exif_floats(), and fill_exif_ints().

◆ magick_to_octave_value() [1/4]

static octave_value magick_to_octave_value ( const Magick::CompressionType &  magick)
static

Definition at line 1723 of file __magick_read__.cc.

References octave_value().

Referenced by F__magick_finfo__().

◆ magick_to_octave_value() [2/4]

static octave_value magick_to_octave_value ( const Magick::EndianType &  magick)
static

Definition at line 1767 of file __magick_read__.cc.

References octave_value().

◆ magick_to_octave_value() [3/4]

static octave_value magick_to_octave_value ( const Magick::OrientationType &  magick)
static

Definition at line 1781 of file __magick_read__.cc.

References octave_value().

◆ magick_to_octave_value() [4/4]

static octave_value magick_to_octave_value ( const Magick::ResolutionType &  magick)
static

Definition at line 1808 of file __magick_read__.cc.

References octave_value().

◆ maybe_initialize_magick()

static void maybe_initialize_magick ( void  )
static

◆ read_file()

static void read_file ( const std::string &  filename,
std::vector< Magick::Image > &  imvec 
)
static

Definition at line 755 of file __magick_read__.cc.

References error(), Faddeeva::w(), and warning().

Referenced by F__magick_finfo__(), F__magick_read__(), and F__magick_write__().

◆ read_images()

◆ read_indexed_images()

template<typename T >
static octave_value_list read_indexed_images ( const std::vector< Magick::Image > &  imvec,
const Array< octave_idx_type > &  frameidx,
const octave_idx_type nargout,
const octave_scalar_map options 
)
static

◆ read_maps()

static octave_value_list read_maps ( Magick::Image &  img)
static

Definition at line 257 of file __magick_read__.cc.

Referenced by F__magick_finfo__(), and read_indexed_images().

◆ write_file()

static void write_file ( const std::string &  filename,
const std::string &  ext,
std::vector< Magick::Image > &  imvec 
)
static

Definition at line 1449 of file __magick_read__.cc.

References error(), Faddeeva::w(), and warning().

Referenced by F__magick_write__().