class MImageFileInfo

Jump to documentation

Image manipulation (OpenMaya) (OpenMaya.py)

public members:

enum MHwTextureType
kHwTextureUnknown
kHwTexture1D
kHwTexture2D
kHwTexture3D
kHwTextureRectangle
kHwTextureCubeMap
enum MImageType
kImageTypeUnknown
kImageTypeColor
kImageTypeNormal
kImageTypeBump
MImageFileInfo ()
void width ( unsigned int value)
void height ( unsigned int value)
void channels ( unsigned int value)
void numberOfImages ( unsigned int value)
void pixelType ( MImage::MPixelType value)
void imageType ( MImageType value)
void hardwareType ( MHwTextureType value)
void hasAlpha ( bool value)
void hasMipMaps ( bool value)
unsigned int width () const
unsigned int height () const
unsigned int channels () const
unsigned int numberOfImages () const
MImage::MPixelType pixelType () const
MImageType imageType () const
MHwTextureType hardwareType () const
bool hasAlpha () const
bool hasMipMaps () const

Documentation

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

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.

Functions

MImageFileInfo:: MImageFileInfo ()

Description

The default class constructor. Initialize the image information structure.

void MImageFileInfo:: width ( unsigned int value)

Description

Set the width in pixels of this image file.

Arguments

  • value the width in pixels

void MImageFileInfo:: height ( unsigned int value)

Description

Set the height in pixels of this image file.

Arguments

  • value the height in pixels

void MImageFileInfo:: channels ( unsigned int value)

Description

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

Arguments

  • value the number of channels per pixel

void MImageFileInfo:: numberOfImages ( unsigned int value)

Description

Set the total number of images in this image file.

Arguments

  • value the number of images

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

Description

Set the native pixel format of this image file.

Arguments

  • value the native pixel format of this image file

void MImageFileInfo:: imageType ( MImageType value)

Description

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.

Arguments

  • value the type of information in this image file

void MImageFileInfo:: hardwareType ( MHwTextureType value)

Description

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

Arguments

  • value the hardware texture type of this image file

void MImageFileInfo:: hasAlpha ( bool value)

Description

Set whether or not this image file contains alpha.

Arguments

  • value true if the image contains alpha, false otherwise.

void MImageFileInfo:: hasMipMaps ( bool value)

Description

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

Arguments

  • value true if the image contains or can generate mipmaps, false otherwise.

unsigned int MImageFileInfo:: width () const

Description

Get the width in pixels of this image file.

Return Value

  • The width in pixels

unsigned int MImageFileInfo:: height () const

Description

Get the height in pixels of this image file.

Return Value

  • The height in pixels

unsigned int MImageFileInfo:: channels () const

Description

Get the number of channels in this image file.

Return Value

  • The number of channels in this image file

unsigned int MImageFileInfo:: numberOfImages () const

Description

Get the number of images in this image file.

Return Value

  • The number of images in this image file

MImage::MPixelType MImageFileInfo:: pixelType () const

Description

Get the native pixel format of this image file.

Return Value

  • The image file's native pixel format

MImageFileInfo::MImageType MImageFileInfo:: imageType () const

Description

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.

Return Value

  • The type of information stored in this image file

MImageFileInfo::MHwTextureType MImageFileInfo:: hardwareType () const

Description

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

Return Value

  • The image file's hardware texture type

bool MImageFileInfo:: hasAlpha () const

Description

Query whether this image contains alpha information.

Return Value

  • true if this image contains alpha
  • false otherwise

bool MImageFileInfo:: hasMipMaps () const

Description

Query whether this image contains or can generate mipmap information.

Return Value

  • true if this image contains or can generate mipmaps
  • false otherwise

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright