MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
image_io.cc File Reference
#include <algorithm>
#include <limits>
#include <fstream>
#include <cstdio>
#include <cstdarg>
#include <cstring>
#include <cerrno>
#include <png.h>
#include <jpeglib.h>
#include <tiff.h>
#include <tiffio.h>
#include "math/algo.h"
#include "util/exception.h"
#include "util/strings.h"
#include "util/system.h"
#include "mve/image_io.h"
Include dependency graph for image_io.cc:

Go to the source code of this file.

Namespaces

namespace  mve
 Multi-View Environment library.
 
namespace  mve::image
 Image tools, loading and processing functions.
 

Macros

#define MVEI_FILE_SIGNATURE   "\211MVE_IMAGE\n"
 
#define MVEI_FILE_SIGNATURE_LEN   11
 
#define MVEI_MAX_PIXEL_AMOUNT   (16384 * 16384) /* 2^28 */
 
#define PPM_MAX_PIXEL_AMOUNT   (16384 * 16384) /* 2^28 */
 

Functions

void mve::image::jpg_error_handler (j_common_ptr)
 
void mve::image::jpg_message_handler (j_common_ptr, int msg_level)
 
ByteImage::Ptr mve::image::load_file (std::string const &filename)
 Loads an image, detecting file type.
 
ImageHeaders mve::image::load_file_headers (std::string const &filename)
 Loads the image headers, detecting file type.
 
ByteImage::Ptr mve::image::load_jpg_file (std::string const &filename, std::string *exif=nullptr)
 Loads a JPEG file.
 
ImageHeaders mve::image::load_jpg_file_headers (std::string const &filename)
 Loads JPEG file headers only.
 
ImageBase::Ptr mve::image::load_mvei_file (std::string const &filename)
 Loads a native MVE image.
 
ImageHeaders mve::image::load_mvei_file_headers (std::string const &filename)
 Loads the meta information for a native MVE image.
 
FloatImage::Ptr mve::image::load_pfm_file (std::string const &filename)
 Loads a PFM file.
 
ByteImage::Ptr mve::image::load_png_file (std::string const &filename)
 Loads a PNG file.
 
ImageHeaders mve::image::load_png_file_headers (std::string const &filename)
 Loads PNG file headers only.
 
RawImage::Ptr mve::image::load_ppm_16_file (std::string const &filename)
 Loads a 16 bit PPM file.
 
ByteImage::Ptr mve::image::load_ppm_file (std::string const &filename)
 Loads a 8 bit PPM file.
 
ImageBase::Ptr mve::image::load_ppm_file_intern (std::string const &filename, bool bit8)
 
RawImage::Ptr mve::image::load_tiff_16_file (std::string const &filename)
 Loads a 16bit TIFF file.
 
ByteImage::Ptr mve::image::load_tiff_file (std::string const &filename)
 Loads a TIFF file.
 
ImageHeaders mve::image::load_tiff_file_headers (std::string const &filename)
 Loads TIFF file headers only.
 
FloatImage::Ptr mve::image::load_tiff_float_file (std::string const &filename)
 Loads a 32bit float TIFF file.
 
void mve::image::save_file (ByteImage::ConstPtr image, std::string const &filename)
 Saves a byte image to file, detecting file type.
 
void mve::image::save_file (ByteImage::Ptr image, std::string const &filename)
 Saves a byte image to file, detecting file type.
 
void mve::image::save_jpg_file (ByteImage::ConstPtr image, std::string const &filename, int quality)
 Saves image data to a JPEG file.
 
void mve::image::save_mvei_file (ImageBase::ConstPtr image, std::string const &filename)
 Writes a native MVE image.
 
void mve::image::save_pfm_file (FloatImage::ConstPtr image, std::string const &filename)
 Saves float image data to PFM file.
 
void mve::image::save_png_file (ByteImage::ConstPtr image, std::string const &filename, int compression_level=1)
 Saves image data to a PNG file.
 
void mve::image::save_ppm_16_file (RawImage::ConstPtr image, std::string const &filename)
 Save a 16 bit PPM file.
 
void mve::image::save_ppm_file (ByteImage::ConstPtr image, std::string const &filename)
 Writes a 8 bit PPM file.
 
void mve::image::save_ppm_file_intern (ImageBase::ConstPtr image, std::string const &filename)
 
void mve::image::save_tiff_16_file (RawImage::ConstPtr image, std::string const &filename)
 Writes a 16bit TIFF to file.
 
void mve::image::save_tiff_file (ByteImage::ConstPtr image, std::string const &filename)
 Writes a TIFF to file.
 
void mve::image::save_tiff_float_file (FloatImage::ConstPtr image, std::string const &filename)
 Writes a 32bit float TIFF to file.
 
void mve::image::tiff_error_handler (char const *, char const *fmt, va_list ap)
 

Macro Definition Documentation

◆ MVEI_FILE_SIGNATURE

#define MVEI_FILE_SIGNATURE   "\211MVE_IMAGE\n"

Definition at line 45 of file image_io.cc.

◆ MVEI_FILE_SIGNATURE_LEN

#define MVEI_FILE_SIGNATURE_LEN   11

Definition at line 46 of file image_io.cc.

◆ MVEI_MAX_PIXEL_AMOUNT

#define MVEI_MAX_PIXEL_AMOUNT   (16384 * 16384) /* 2^28 */

Definition at line 47 of file image_io.cc.

◆ PPM_MAX_PIXEL_AMOUNT

#define PPM_MAX_PIXEL_AMOUNT   (16384 * 16384) /* 2^28 */

Definition at line 42 of file image_io.cc.