Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
om::images::base::ImageFormat Class Reference

An enum class representing the different kinds of image encoding formats. More...

#include <omImageFormat.h>

Public Types

enum  Enum {
  UNDEFINED, BMP, JPEG, PNG,
  TGA, TIFF, GIF, JPEG_2000,
  DDS
}
 An enum type representing the different kinds of image encoding formats. More...
 

Public Member Functions

 ImageFormat ()
 Create an image format object with an UNDEFINED image format. More...
 
 ImageFormat (ImageFormat::Enum newFormat)
 Create an image format object from the specified image format Enum. More...
 
 ImageFormat (const om::resources::ResourceFormat &newFormat)
 Create an image format object from the specified resource format. More...
 
const om::resources::ResourceFormatgetResourceFormat () const
 Return a reference to a resource format object that corresponds to this image format. More...
 
 operator Enum () const
 Convert this image format to an enum value. More...
 
Bool isLossy () const
 Return whether or not this image format is lossy (loses information). More...
 
UTF8String getExtension () const
 Return the standard file extension used for this image format. More...
 
String toString () const
 Return a string representation of the image format. More...
 
 operator String () const
 Convert this image format into a string representation. More...
 

Static Public Member Functions

static ImageFormat getFormatForExtension (const UTF8String &extension)
 Return an image format which corresponds to the format with the given extension string. More...
 

Static Public Attributes

static const om::resources::ResourceFormat BMP_FORMAT
 The resource format for BMP images. More...
 
static const om::resources::ResourceFormat JPEG_FORMAT
 The resource format for JPEG images. More...
 
static const om::resources::ResourceFormat PNG_FORMAT
 The resource format for PNG images. More...
 
static const om::resources::ResourceFormat TGA_FORMAT
 The resource format for TGA images. More...
 
static const om::resources::ResourceFormat TIFF_FORMAT
 The resource format for TIFF images. More...
 
static const om::resources::ResourceFormat GIF_FORMAT
 The resource format for GIF images. More...
 
static const om::resources::ResourceFormat JPEG_2000_FORMAT
 The resource format for JPEG 2000 images. More...
 
static const om::resources::ResourceFormat DDS_FORMAT
 The resource format for DDS images. More...
 

Detailed Description

An enum class representing the different kinds of image encoding formats.

Member Enumeration Documentation

An enum type representing the different kinds of image encoding formats.

Enumerator
UNDEFINED 

An undefined image format.

BMP 

The uncompressed .bmp image file format.

JPEG 

The lossily-compressed .jpg image file format.

PNG 

The losslessly-compressed .png image file format.

TGA 

The .tga image file format.

TIFF 

The .tiff image file format.

GIF 

The .gif image file format.

JPEG_2000 

The JPEG 2000 image file format.

DDS 

The DDS image/texture file format.

Constructor & Destructor Documentation

om::images::base::ImageFormat::ImageFormat ( )
inline

Create an image format object with an UNDEFINED image format.

om::images::base::ImageFormat::ImageFormat ( ImageFormat::Enum  newFormat)
inline

Create an image format object from the specified image format Enum.

om::images::base::ImageFormat::ImageFormat ( const om::resources::ResourceFormat newFormat)

Create an image format object from the specified resource format.

Member Function Documentation

const om::resources::ResourceFormat& om::images::base::ImageFormat::getResourceFormat ( ) const

Return a reference to a resource format object that corresponds to this image format.

om::images::base::ImageFormat::operator Enum ( ) const
inline

Convert this image format to an enum value.

Bool om::images::base::ImageFormat::isLossy ( ) const

Return whether or not this image format is lossy (loses information).

Lossy formats will suffer from generation loss each time they are re-encoded.

UTF8String om::images::base::ImageFormat::getExtension ( ) const

Return the standard file extension used for this image format.

static ImageFormat om::images::base::ImageFormat::getFormatForExtension ( const UTF8String &  extension)
static

Return an image format which corresponds to the format with the given extension string.

String om::images::base::ImageFormat::toString ( ) const

Return a string representation of the image format.

om::images::base::ImageFormat::operator String ( ) const
inline

Convert this image format into a string representation.

Member Data Documentation

const om::resources::ResourceFormat om::images::base::ImageFormat::BMP_FORMAT
static

The resource format for BMP images.

const om::resources::ResourceFormat om::images::base::ImageFormat::JPEG_FORMAT
static

The resource format for JPEG images.

const om::resources::ResourceFormat om::images::base::ImageFormat::PNG_FORMAT
static

The resource format for PNG images.

const om::resources::ResourceFormat om::images::base::ImageFormat::TGA_FORMAT
static

The resource format for TGA images.

const om::resources::ResourceFormat om::images::base::ImageFormat::TIFF_FORMAT
static

The resource format for TIFF images.

const om::resources::ResourceFormat om::images::base::ImageFormat::GIF_FORMAT
static

The resource format for GIF images.

const om::resources::ResourceFormat om::images::base::ImageFormat::JPEG_2000_FORMAT
static

The resource format for JPEG 2000 images.

const om::resources::ResourceFormat om::images::base::ImageFormat::DDS_FORMAT
static

The resource format for DDS images.


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