- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions

# MImageFileInfo Class Reference
OpenMaya - API module for common classes

Search for all occurrences

## Detailed Description

Image manipulation.

This class provides methods for reading file images stored on disk.

MImageFileInfo is a utility class used to describe the characteristics of an image file, such as dimensions, channel count, and pixel format. This class is used in MPxImageFile.

Examples:

  ddsFloatReader.cpp, OpenEXR.cpp, simpleImageFile.cpp, and tiffFloatReader.cpp.

`#include <MImageFileInfo.h>`

List of all members.

## Public Types
enum | MHwTextureType { kHwTextureUnknown, kHwTexture1D, kHwTexture2D, kHwTexture3D, kHwTextureRectangle, kHwTextureCubeMap }
| Hardware texture types. More...
enum | MImageType { kImageTypeUnknown, kImageTypeColor, kImageTypeNormal, kImageTypeBump }
| Image types. More...
## Public Member Functions
| MImageFileInfo ()
| The default class constructor.
void | width (unsigned int value)
| Set the width in pixels of this image file.
void | height (unsigned int value)
| Set the height in pixels of this image file.
void | channels (unsigned int value)
| Set the number of channels per pixels in this image file.
void | numberOfImages (unsigned int value)
| Set the total number of images in this image file.
void | pixelType (MImage::MPixelType value)
| Set the native pixel format of this image file.
void | imageType (MImageType value)
| Set the type of information stored in this image file (e.g.
void | hardwareType (MHwTextureType value)
| Set the hardware texture type of this image file, configuring whether this image contains a 2D texture, a cubemap, etc.
void | hasAlpha (bool value)
| Set whether or not this image file contains alpha.
void | hasMipMaps (bool value)
| Set whether or not this image file contains or can generate mipmaps.
unsigned int | width () const
| Get the width in pixels of this image file.
unsigned int | height () const
| Get the height in pixels of this image file.
unsigned int | channels () const
| Get the number of channels in this image file.
unsigned int | numberOfImages () const
| Get the number of images in this image file.
MImage::MPixelType | pixelType () const
| Get the native pixel format of this image file.
MImageType | imageType () const
| Query the type of information in this image file (e.g.
MHwTextureType | hardwareType () const
| Get the hardware texture type of this image file, describing whether this image contains a 2D texture, a cubemap, etc.
bool | hasAlpha () const
| Query whether this image contains alpha information.
bool | hasMipMaps () const
| Query whether this image contains or can generate mipmap information.

## Member Enumeration Documentation

enum MHwTextureType

Search for all occurrences

Hardware texture types.

Enumerator:

  kHwTextureUnknown | Search for all occurrences
  kHwTexture1D | Search for all occurrences
  kHwTexture2D | Search for all occurrences
  kHwTexture3D | Search for all occurrences
  kHwTextureRectangle | Search for all occurrences
  kHwTextureCubeMap | Search for all occurrences

enum MImageType

Search for all occurrences

Image types.

Enumerator:

  kImageTypeUnknown | Search for all occurrences
  kImageTypeColor | Search for all occurrences
  kImageTypeNormal | Search for all occurrences
  kImageTypeBump | Search for all occurrences

## Constructor & Destructor Documentation

MImageFileInfo | ( |  | ) |

The default class constructor.

Initialize the image information structure.

## Member Function Documentation

void width | ( | unsigned int | value | ) |

Search for all occurrences

Set the width in pixels of this image file.

Parameters:

  [in] | value | the width in pixels

Examples:
  ddsFloatReader.cpp, OpenEXR.cpp, simpleImageFile.cpp, and tiffFloatReader.cpp.

void height | ( | unsigned int | value | ) |

Search for all occurrences

Set the height in pixels of this image file.

Parameters:

  [in] | value | the height in pixels

Examples:
  ddsFloatReader.cpp, OpenEXR.cpp, simpleImageFile.cpp, and tiffFloatReader.cpp.

void channels | ( | unsigned int | value | ) |

Search for all occurrences

Set the number of channels per pixels in this image file.

Parameters:

  [in] | value | the number of channels per pixel

Examples:
  ddsFloatReader.cpp, OpenEXR.cpp, simpleImageFile.cpp, and tiffFloatReader.cpp.

void numberOfImages | ( | unsigned int | value | ) |

Search for all occurrences

Set the total number of images in this image file.

Parameters:

  [in] | value | the number of images

Examples:
  ddsFloatReader.cpp, OpenEXR.cpp, and tiffFloatReader.cpp.

void pixelType | ( | MImage::MPixelType | value | ) |

Search for all occurrences

Set the native pixel format of this image file.

Parameters:

  [in] | value | the native pixel format of this image file

Examples:
  ddsFloatReader.cpp, OpenEXR.cpp, simpleImageFile.cpp, and tiffFloatReader.cpp.

void imageType | ( | MImageType | value | ) |

Search for all occurrences

Set the type of information stored in this image file (e.g.

the image contains a color map, a bump map, etc). This is an optional call as most image file formats do not describe the semantic use of the pixels they contains. In such cases it is safe to leave this as the default value of kImageTypeUnknown.

Parameters:

  [in] | value | the type of information in this image file

Examples:
  ddsFloatReader.cpp.

void hardwareType | ( | MHwTextureType | value | ) |

Search for all occurrences

Set the hardware texture type of this image file, configuring whether this image contains a 2D texture, a cubemap, etc.

Parameters:

  [in] | value | the hardware texture type of this image file

Examples:
  ddsFloatReader.cpp, and simpleImageFile.cpp.

void hasAlpha | ( | bool | value | ) |

Search for all occurrences

Set whether or not this image file contains alpha.

Parameters:

  [in] | value | true if the image contains alpha, false otherwise.

Examples:
  ddsFloatReader.cpp.

void hasMipMaps | ( | bool | value | ) |

Search for all occurrences

Set whether or not this image file contains or can generate mipmaps.

Parameters:

  [in] | value | true if the image contains or can generate mipmaps, false otherwise.

Examples:
  ddsFloatReader.cpp.

unsigned int width | ( |  | ) | const

Search for all occurrences

Get the width in pixels of this image file.

Returns:
  The width in pixels

unsigned int height | ( |  | ) | const

Search for all occurrences

Get the height in pixels of this image file.

Returns:
  The height in pixels

unsigned int channels | ( |  | ) | const

Search for all occurrences

Get the number of channels in this image file.

Returns:
  The number of channels in this image file

unsigned int numberOfImages | ( |  | ) | const

Search for all occurrences

Get the number of images in this image file.

Returns:
  The number of images in this image file

MImage::MPixelType pixelType | ( |  | ) | const

Search for all occurrences

Get the native pixel format of this image file.

Returns:
  The image file's native pixel format

MImageFileInfo::MImageType imageType | ( |  | ) | const

Search for all occurrences

Query the type of information in this image file (e.g.

is it a color map, a normal map, etc). Most image file formats do not contain this information, meaning this will be left as kImageTypeUnknown.

Returns:
  The type of information stored in this image file

MImageFileInfo::MHwTextureType hardwareType | ( |  | ) | const

Search for all occurrences

Get the hardware texture type of this image file, describing whether this image contains a 2D texture, a cubemap, etc.

Returns:
  The image file's hardware texture type

bool hasAlpha | ( |  | ) | const

Search for all occurrences

Query whether this image contains alpha information.

Returns:
  true if this image contains alpha, false otherwise

bool hasMipMaps | ( |  | ) | const

Search for all occurrences

Query whether this image contains or can generate mipmap information.

Returns:
  true if this image contains or can generate mipmaps, false otherwise

MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo
MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo MImageFileInfo