HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageLoader Class Reference

#include <ImageHandler.h>

+ Inheritance diagram for ImageLoader:

Public Member Functions

 ImageLoader ()
 
virtual ~ImageLoader ()
 
const StringSetsupportedExtensions () const
 
virtual bool saveImage (const FilePath &filePath, ConstImagePtr image, bool verticalFlip=false)
 
virtual ImagePtr loadImage (const FilePath &filePath)
 

Static Public Attributes

static const string BMP_EXTENSION
 Standard image file extensions. More...
 
static const string EXR_EXTENSION
 
static const string GIF_EXTENSION
 
static const string HDR_EXTENSION
 
static const string JPG_EXTENSION
 
static const string JPEG_EXTENSION
 
static const string PIC_EXTENSION
 
static const string PNG_EXTENSION
 
static const string PSD_EXTENSION
 
static const string TGA_EXTENSION
 
static const string TIF_EXTENSION
 
static const string TIFF_EXTENSION
 
static const string TXT_EXTENSION
 
static const string TX_EXTENSION
 
static const string TXR_EXTENSION
 

Protected Attributes

StringSet _extensions
 

Detailed Description

Abstract base class for file-system image loaders

Definition at line 107 of file ImageHandler.h.

Constructor & Destructor Documentation

ImageLoader::ImageLoader ( )
inline

Definition at line 110 of file ImageHandler.h.

virtual ImageLoader::~ImageLoader ( )
inlinevirtual

Definition at line 113 of file ImageHandler.h.

Member Function Documentation

virtual ImagePtr ImageLoader::loadImage ( const FilePath filePath)
virtual

Load an image from the file system. This method must be implemented by derived classes.

Parameters
filePathThe requested image file path.
Returns
On success, a shared pointer to the loaded image; otherwise an empty shared pointer.

Reimplemented in OiioImageLoader, and StbImageLoader.

virtual bool ImageLoader::saveImage ( const FilePath filePath,
ConstImagePtr  image,
bool  verticalFlip = false 
)
virtual

Save an image to the file system. This method must be implemented by derived classes.

Parameters
filePathFile path to be written
imageThe image to be saved
verticalFlipWhether the image should be flipped in Y during save
Returns
if save succeeded

Reimplemented in OiioImageLoader, and StbImageLoader.

const StringSet& ImageLoader::supportedExtensions ( ) const
inline

Returns a list of supported extensions

Returns
List of support extensions

Definition at line 134 of file ImageHandler.h.

Member Data Documentation

StringSet ImageLoader::_extensions
protected

Definition at line 155 of file ImageHandler.h.

const string ImageLoader::BMP_EXTENSION
static

Standard image file extensions.

Definition at line 116 of file ImageHandler.h.

const string ImageLoader::EXR_EXTENSION
static

Definition at line 117 of file ImageHandler.h.

const string ImageLoader::GIF_EXTENSION
static

Definition at line 118 of file ImageHandler.h.

const string ImageLoader::HDR_EXTENSION
static

Definition at line 119 of file ImageHandler.h.

const string ImageLoader::JPEG_EXTENSION
static

Definition at line 121 of file ImageHandler.h.

const string ImageLoader::JPG_EXTENSION
static

Definition at line 120 of file ImageHandler.h.

const string ImageLoader::PIC_EXTENSION
static

Definition at line 122 of file ImageHandler.h.

const string ImageLoader::PNG_EXTENSION
static

Definition at line 123 of file ImageHandler.h.

const string ImageLoader::PSD_EXTENSION
static

Definition at line 124 of file ImageHandler.h.

const string ImageLoader::TGA_EXTENSION
static

Definition at line 125 of file ImageHandler.h.

const string ImageLoader::TIF_EXTENSION
static

Definition at line 126 of file ImageHandler.h.

const string ImageLoader::TIFF_EXTENSION
static

Definition at line 127 of file ImageHandler.h.

const string ImageLoader::TX_EXTENSION
static

Definition at line 129 of file ImageHandler.h.

const string ImageLoader::TXR_EXTENSION
static

Definition at line 130 of file ImageHandler.h.

const string ImageLoader::TXT_EXTENSION
static

Definition at line 128 of file ImageHandler.h.


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