BitmapInfo Class Reference

#include <bitmap.h>

Class Description

Information about an image file or in-memory bitmap, including settings for loading/saving, gamma, etc.

See also
Class Bitmap, Working with Bitmaps, Bitmap Error (result) Codes.

Description:
This class describes the properties of a bitmap such as its path name or device name, width, height, gamma, number of frames, etc. Methods are available to set and retrieve these properties. All methods are implemented by the system unless noted otherwise.
In general, BitmapInfo should be used and saved for user-defined files rather than filenames, because the BitmapInfo encodes information beyond the filename, including file-format specific settings (e.g. compression on .JPG files) and so on.
The file dialog functions (such as BitmapManager::SelectFileInput() or BitmapManager::SelectFileOutput()) can be seen as "BitmapInfo editors", since they allow the user to edit its content.
+ Inheritance diagram for BitmapInfo:

Public Member Functions

BMMExport BitmapInfo ()
 
BMMExport BitmapInfo (const MCHAR *n)
 
BMMExport BitmapInfo (const MaxSDK::AssetManagement::AssetUser &asset)
 
BMMExport BitmapInfo (const BitmapInfo &bi)
 
BMMExport ~BitmapInfo ()
 
BMMExport MaxSDK::Util::Path GetPathEx () const
 Returns the currently set path of the image file. More...
 
BMMExport void CopyImageInfo (BitmapInfo *from)
 
BMMExport void SetPath (const MaxSDK::Util::Path &path)
 Set the path to the image file. More...
 
BMMExport const MaxSDK::AssetManagement::AssetUserGetAsset () const
 returns this bitmap's asset More...
 
BMMExport void SetAsset (const MaxSDK::AssetManagement::AssetUser &assetUser)
 sets this bitmap's asset More...
 
BMMExport voidGetPiData ()
 Returns the plugin data stored on the BitmapInfo. More...
 
BMMExport void SetPiData (void *ptr)
 Sets the plugin data stored on the BitmapInfo. More...
 
BMMExport DWORD GetPiDataSize ()
 Returns the size of the plugin data stored on the BitmapInfo. More...
 
BMMExport void SetPiDataSize (DWORD s)
 Sets the reported size of the plugin data stored on the BitmapInfo. More...
 
BMMExport void ResetPiData ()
 Resets the plugin data stored on the BitmapInfo. More...
 
BMMExport BOOL AllocPiData (DWORD size)
 Allocates the plugin data memory and set the plugin data size. More...
 
BMMExport BitmapInfoGetProxySubject (BOOL create=FALSE)
 Returns the subject info of the proxy. When create is TRUE, the subject info will be allocated if it was null. More...
 
BMMExport void ResetProxySubject ()
 Deletes the subject info and sets it to null. More...
 
BMMExport BOOL AllocProxySubject ()
 Creates the subject info. More...
 
BMMExport voidCreateFmtSpecBlock (void)
 
BMMExport void Copy (const BitmapInfo *from, BOOL copyProxySubject)
 Assignment function. The data members of the specified BitmapInfo are copied to this BitmapInfo, with option to also copy the proxySubject info. More...
 
BMMExport void Copy (const BitmapInfo *from)
 
BMMExport IOResult Save (ISave *isave)
 
BMMExport IOResult Load (ILoad *iload)
 
BMMExport void EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD vflags)
 
BMMExport BOOL Validate ()
 
BMMExport HWND GetUpdateWindow ()
 
BMMExport void SetUpdateWindow (HWND hwnd)
 
BMMExport DWORD GetGChannels ()
 
BMMExport DWORD GetDeviceFlags ()
 
BMMExport BOOL FixDeviceName ()
 Sets the appropriate device name, as derived from the filename. More...
 
Flag Access
BMMExport DWORD Flags ()
 
BMMExport DWORD SetFlags (DWORD f)
 
BMMExport DWORD ResetFlags (DWORD f)
 
BMMExport BOOL TestFlags (DWORD f)
 
Get/Set Bitmap Properties
BMMExport WORD Width ()
 
BMMExport WORD Height ()
 
BMMExport float Gamma ()
 
BMMExport float Aspect ()
 
BMMExport int Type ()
 
BMMExport WORD SetWidth (WORD s)
 
BMMExport WORD SetHeight (WORD u)
 
BMMExport float SetGamma (float c)
 
BMMExport float SetAspect (float k)
 
BMMExport int SetType (int s)
 
Frame Ranges
BMMExport int FirstFrame ()
 
BMMExport int LastFrame ()
 
BMMExport int NumberFrames ()
 
BMMExport int CurrentFrame ()
 
BMMExport WORD SequenceOutBound ()
 
BMMExport int SetFirstFrame (int m)
 
BMMExport int SetLastFrame (int s)
 
BMMExport int SetCurrentFrame (int v)
 
BMMExport WORD SetSequenceOutBound (WORD c)
 
Name/Device Access
BMMExport const MCHARName () const
 Returns the currently set path of the image file. More...
 
BMMExport const MCHARFilename ()
 
BMMExport const MCHARDevice ()
 
BMMExport BOOL CompareName (BitmapInfo *bi)
 
BMMExport const MCHARSetName (const MCHAR *n)
 Set the path to the image file. More...
 
BMMExport const MCHARSetDevice (const MCHAR *d)
 Sets the device name. More...
 
Custom Input Processing
BMMExport WORD CustWidth ()
 
BMMExport WORD CustHeight ()
 
BMMExport void SetCustWidth (WORD w)
 
BMMExport void SetCustHeight (WORD h)
 
BMMExport int StartFrame ()
 
BMMExport int EndFrame ()
 
BMMExport void SetStartFrame (int s)
 
BMMExport void SetEndFrame (int e)
 
BMMExport void SetCustomX (int x)
 
BMMExport void SetCustomY (int y)
 
BMMExport int GetCustomX ()
 
BMMExport int GetCustomY ()
 
BMMExport void SetCustomGamma (float g)
 
BMMExport float GetCustomGamma ()
 
BMMExport float GetEffectiveGamma ()
 
BMMExport void SetCustomStep (int s)
 
BMMExport int GetCustomStep ()
 
BMMExport void SetPresetAlignment (int p)
 
BMMExport int GetPresetAlignment ()
 
Custom Input Flags
BMMExport DWORD GetCustomFlags ()
 
BMMExport void SetCustomFlag (DWORD f)
 
BMMExport void ResetCustomFlag (DWORD f)
 
BMMExport BOOL TestCustomFlags (DWORD f)
 
Operators
BMMExport BitmapInfooperator= (const BitmapInfo &from)
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Constructor & Destructor Documentation

Remarks
Constructor. The following defaults are set by this constructor.

The width = 640;

The height = 480;

The custom width = 320;

The custom height = 200;

The custom flags = BMM_CUSTOM_RESFIT | BMM_CUSTOM_FILEGAMMA;

The custom gamma = 1.0f;

The frame number = 0;

The aspect ratio = 1.0f;

The gamma setting = 1.0f;

The name and device name are set to NULL.

The looping flag = BMM_SEQ_WRAP;
BMMExport BitmapInfo ( const MCHAR n)
Remarks
Constructor. The defaults are set as above excepting the bitmap name is set.
Parameters:
MCHAR *n

The bitmap file name is set.
Remarks
Constructor. The defaults are set as above excepting the bitmap asset is set.
Parameters:
AssetUser &asset

The bitmap file asset is set.
BMMExport BitmapInfo ( const BitmapInfo bi)
Remarks
This method is available in release 3.0 and later only.

Copy Constructor.
Parameters:
const BitmapInfo &bi

The BitmapInfo to copy from.

Member Function Documentation

BMMExport DWORD Flags ( )
inline
Remarks
Returns the flags of this BitmapInfo. See Bitmap Flags.
906 { return (flags); }
BMMExport DWORD SetFlags ( DWORD  f)
inline
Remarks
Sets the flags for this BitmapInfo. These are bitwise OR-ed into the current flags.
Parameters:
DWORD f

The flag bits to set. See Bitmap Flags.
Returns
The revised flags are returned.
913 { flags |= f; return (flags); }
BMMExport DWORD ResetFlags ( DWORD  f)
inline
914 { flags &= ~f; return (flags); }
BMMExport BOOL TestFlags ( DWORD  f)
inline
Remarks
Determines if a set of flag bits are set.
Parameters:
DWORD f

The flag bits to test. See Bitmap Flags.
Returns
TRUE if the bits are set; otherwise FALSE.
920 { return (flags & f); }
BMMExport WORD Width ( )
inline
Remarks
Returns the width (horizontal dimension) property of this BitmapInfo.
929 { return (width); }
BMMExport WORD Height ( )
inline
Remarks
Returns the height (vertical dimension) setting of this BitmapInfo.
932 { return (height); }
BMMExport float Gamma ( )
inline
Remarks
Returns the gamma setting property of this BitmapInfo.
934 { return (gamma); }
BMMExport float Aspect ( )
inline
Remarks
Returns the aspect ratio property of this BitmapInfo.
936 { return (aspect);}
BMMExport int Type ( )
inline
Remarks
Returns the type property of this BitmapInfo. See Bitmap Types.
938 { return (type); }
BMMExport WORD SetWidth ( WORD  s)
inline
Remarks
Sets the width (horizontal dimension) property of this BitmapInfo.
Parameters:
WORD w

Specifies the width setting in pixels.
Returns
The old (previously set) width of the bitmap.
945 { WORD o = width; width = s; return (o);}
BMMExport WORD SetHeight ( WORD  u)
inline
Remarks
Sets the height (vertical dimension) property of this BitmapInfo.
Parameters:
WORD h

Specifies the height setting in pixels.
Returns
The old (previous) height setting.
952 { WORD o = height; height = u; return (o);}
BMMExport float SetGamma ( float  c)
inline
Remarks
Sets the gamma property of this BitmapInfo to the value passed.
Parameters:
float g

Specifies the gamma setting.
Returns
The old (previous) gamma setting.
959 { float o = gamma; gamma = c; return (o);}
BMMExport float SetAspect ( float  k)
inline
Remarks
Set the aspect ratio property of this BitmapInfo to the specified value.
Parameters:
float a

Specifies the aspect ratio setting.
Returns
The old (previous) aspect ratio of the bitmap.
966 { float o = aspect; aspect = k; return (o);}
BMMExport int SetType ( int  s)
inline
Remarks
Sets the type property of this BitmapInfo to the specified value.
Parameters:
int t

Specifies the type of bitmap. See Bitmap Types.
Returns
The old (previous) type setting.
973 { int o = type; type = s; return (o);}
BMMExport int FirstFrame ( )
inline
Remarks
Returns the first frame property of this BitmapInfo. Note that for a multi-frame bitmap some sequences may start with something other than 0.
981 { return (fstart); }
BMMExport int LastFrame ( )
inline
Remarks
Returns the last frame property of this BitmapInfo.
983 { return (fend); }
BMMExport int NumberFrames ( )
inline
Remarks
Returns the total number of frames setting of this BitmapInfo.
986 { return (fend - fstart + 1); }
BMMExport int CurrentFrame ( )
inline
Remarks
Returns the current frame setting of this BitmapInfo.
988 { return (fnumber); }
BMMExport WORD SequenceOutBound ( )
inline
Remarks
When multi-frame BitmapIO loaders are reading a sequence of frames, this method is called to indicate what to do when reading beyond the end of available frames. The defaults is BMM_SEQ_WRAP.
Returns
One of the following values:

BMM_SEQ_WRAP

Wraps around back to start point.

BMM_SEQ_ERROR

Generates an error if reading goes beyond the end.

BMM_SEQ_PINGPONG

This causes the sequence to turn around and goes the other direction, back and forth.

BMM_SEQ_HOLD

When the last frame is reached it is held and used over and over.
1003 { return (loopflag); }
BMMExport int SetFirstFrame ( int  m)
inline
Remarks
Sets the first frame property of this BitmapInfo.
Parameters:
int f

Specifies the first frame setting.
Returns
The old (previous) first frame setting.
1010 { int o = fstart; fstart = m; return (o);}
BMMExport int SetLastFrame ( int  s)
inline
Remarks
Sets the last frame property of this BitmapInfo.
Parameters:
int f

Specifies the last frame.
Returns
The old (previous) frame setting.
1016 { int o = fend; fend = s; return (o);}
BMMExport int SetCurrentFrame ( int  v)
inline
Remarks
Sets the current frame setting of this BitmapInfo.
Parameters:
int v

Specifies the current frame.
Returns
The old (previous) current frame setting.
1022 { int o = fnumber; fnumber = v; return (o);}
BMMExport WORD SetSequenceOutBound ( WORD  c)
inline
Remarks
Sets the sequence out of bounds property of this BitmapInfo. When reading a sequence of frames, this specifies what to do when reading beyond the end of available frames.
Parameters:
WORD s

One of the following values:

BMM_SEQ_WRAP

Wraps around back to start point.

BMM_SEQ_ERROR

Generates an error if reading goes beyond the end.

BMM_SEQ_PINGPONG

This causes the sequence to turn around and goes the other direction, back and forth.

BMM_SEQ_HOLD

When the last frame is reached it is held and used over and over.
Returns
The old (previous) value that was set.
1039 { WORD o = loopflag; loopflag = c; return (o);}
BMMExport const MCHAR* Name ( ) const

Returns the currently set path of the image file.

Returns
The currently set path of the image file.
\remarks Returns the name property of this BitmapInfo. This is the
full path name. See MCHAR *Filename() for just the file name.
BMMExport const MCHAR* Filename ( )
Remarks
Returns just the file name of this BitmapInfo (not the entire path name).
BMMExport const MCHAR* Device ( )
inline
Remarks
Returns the device name responsible for producing this image. For file types, this is just informative. For non-file types (devices) this is the way this image is identified. Therefore, it is important to save both name and device in order to properly identify an image.
1070 { return (const MCHAR *)device; }
#define MCHAR
MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
Definition: strbasic.h:42
BMMExport BOOL CompareName ( BitmapInfo bi)
Remarks
This method will compare names taking in consideration both file names and device names. As devices don't have a file name, this method will first determine what type of image this is, and then perform a proper comparison.
Parameters:
BitmapInfo *bi

The other BitmapInfo with which to compare names.
Returns
TRUE if the BitmapInfos have the same name and device name; otherwise FALSE.
BMMExport const MCHAR* SetName ( const MCHAR n)

Set the path to the image file.

This is a convenience method and calls SetPath under the hood.

Parameters
nNew path for the bitmap.
\remarks Sets the name property of this BitmapInfo. When writing
n should have a fully qualified filename. When reading, it only matters if the image is not in the MAP path. Note that a "feature" of the MAP path system is that if an image with same name is found more than once (in different paths), only the first one is seen.

Note: If loading an image from a device, make sure the name is empty (bi.SetName(_M(""));). This is automatic if you use BitmapManager::SelectDeviceInput(). If you just create a BitmapInfo instance and set the device name by hand (bi.SetDevice()), this is also automatic as both name and device names are by default set to NULL (""). This is only a concern if you reuse a BitmapInfo class previously used for image files.
Parameters:
const MCHAR *n

Specifies the name of the bitmap.
Returns
The old (previous) name that was set.
BMMExport const MCHAR* SetDevice ( const MCHAR d)

Sets the device name.

Remarks
This copies the supplied string into the member variable device. The string corresponds with the long description of a BitmapIO plugin: BitmapIO::LongDesc(). However it is not necessary to call this as the system will do it automatically when Bitmap::OpenOutput is called. Or as alternative, it can properly be set in a localized environment by calling BitmapInfo::FixDeviceName().
Parameters
d- The name to set.
Returns
The device name that was set.
BMMExport MaxSDK::Util::Path GetPathEx ( ) const

Returns the currently set path of the image file.

Returns
The currently set path of the image file.
BMMExport void CopyImageInfo ( BitmapInfo from)
Remarks
Copies the image information of the from BitmapInfo to this bitmap. Only the name, device and image characteristics are copied. User info, such as Custom Width, etc. is not copied.

The following properties of the from BitmapInfo are copied:

from->Name(),from->Device(),from->Width(), from->Height(), from->Aspect(), from->Gamma(),from->Type(), from->Flags(), from->FirstFrame(), from->LastFrame(), from->CurrentFrame(), from->GetCustomFlags()
Parameters:
BitmapInfo *from

The bitmap whose information will be copied.
BMMExport void SetPath ( const MaxSDK::Util::Path path)

Set the path to the image file.

Parameters
pathNew path for the bitmap.
BMMExport const MaxSDK::AssetManagement::AssetUser& GetAsset ( ) const

returns this bitmap's asset

BMMExport void SetAsset ( const MaxSDK::AssetManagement::AssetUser assetUser)

sets this bitmap's asset

param[in] assetUser the new asset

BMMExport WORD CustWidth ( )
inline
Remarks
Returns the custom width setting of this BitmapInfo.
1167 { return (cwidth); }
BMMExport WORD CustHeight ( )
inline
Remarks
Returns the custom height setting of this BitmapInfo.
1169 { return (cheight); }
BMMExport void SetCustWidth ( WORD  w)
inline
Remarks
Sets the custom width setting for this BitmapInfo.
Parameters:
WORD w

The new custom width setting.
1174 { cwidth = w; }
BMMExport void SetCustHeight ( WORD  h)
inline
Remarks
Sets the custom height property of this BitmapInfo.
Parameters:
WORD h

The new custom height setting.
1179 { cheight = h; }
BMMExport int StartFrame ( )
inline
Remarks
Returns the custom start frame property of this BitmapInfo.
1182 { return (start); }
BMMExport int EndFrame ( )
inline
Remarks
Returns the custom end frame setting of this BitmapInfo.
1185 { return (end); }
BMMExport void SetStartFrame ( int  s)
inline
Remarks
Sets the custom start frame property to the specified value.
Parameters:
int s

Specifies the start frame setting.
1191 { start = s; }
BMMExport void SetEndFrame ( int  e)
inline
Remarks
Sets the custom end frame property of this BitmapInfo.
Parameters:
int e

The new end frame setting.
1196 { end = e; }
BMMExport void SetCustomX ( int  x)
inline
Remarks
Specifies the optional X coordinate (offset) property of this BitmapInfo. This specifies where to place the image if the image being copied from one Bitmap to another is smaller.
Parameters:
int x

Specifies the custom X offset.
1203 { custxpos = x; }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
BMMExport void SetCustomY ( int  y)
inline
Remarks
Sets the optional Y coordinate (offset) property of this BitmapInfo. This specifies where to place the image if the image being copied from one Bitmap to another is smaller.
Parameters:
int y

Specifies the custom y offset.
1210 { custypos = y; }
BMMExport int GetCustomX ( )
inline
Remarks
Returns the custom x offset setting of this BitmapInfo.
1212 { return custxpos; }
BMMExport int GetCustomY ( )
inline
Remarks
Returns the custom Y offset setting of this BitmapInfo.
1214 { return custypos; }
BMMExport void SetCustomGamma ( float  g)
inline
Remarks
Sets a custom gamma setting of this BitmapInfo to the specified value.
Parameters:
float g

Specifies the custom gamma setting.
1220 { custgamma = g; }
BMMExport float GetCustomGamma ( )
inline
Remarks
Returns the custom gamma setting of this BitmapInfo.
1222 { return custgamma; }
BMMExport float GetEffectiveGamma ( )
Remarks
Returns the bitmap's currently used input gamma value. This is taken from either the image file's gamma, the system defaults, or the user override, according to the custom flags.
BMMExport void SetCustomStep ( int  s)
inline
Remarks
Sets the custom frame increment setting of this BitmapInfo.
Parameters:
int s

Specifies the frame increment to use.
1231 { step = s; }
BMMExport int GetCustomStep ( )
inline
Remarks
Returns the custom frame step setting of this BitmapInfo.
1234 { return step; }
BMMExport void SetPresetAlignment ( int  p)
inline
Remarks
Establishes the optional alignment setting of this BitmapInfo. This specifies where to place the image if the image being copied from one Bitmap to another is smaller.
Parameters:
int p

Specifies one of the following nine values that define the position of the bitmap:

See Bitmap Alignment Positions.
1243 { preset_al = p; }
BMMExport int GetPresetAlignment ( )
inline
Remarks
Returns the optional alignment setting of this BitmapInfo. This indicates where to place the image if the image being copied from one Bitmap to another is smaller.
Returns
See Bitmap Alignment Positions.
1248 { return preset_al; }
BMMExport DWORD GetCustomFlags ( )
inline
Remarks
Retrieves the custom flags setting of this BitmapInfo . See Custom Bitmap Flags.
1257 { return (customflags); }
BMMExport void SetCustomFlag ( DWORD  f)
inline
Remarks
Sets the custom flag(s) for this BitmapInfo.
Parameters:
DWORD f

Specifies the custom flags. See Custom Bitmap Flags.
1262 { customflags |= f; }
BMMExport void ResetCustomFlag ( DWORD  f)
inline
Remarks
Clears the specified flag(s) of this BitmapInfo. See Custom Bitmap Flags.
Parameters:
DWORD f

Specifies the flag bits to reset.
1267 { customflags &= ~f; }
BMMExport BOOL TestCustomFlags ( DWORD  f)
inline
Remarks
Tests the custom flags of this BitmapInfo. See Custom Bitmap Flags.
Parameters:
DWORD f

The flag bits to test.
Returns
Returns TRUE if the specified flags were set; otherwise FALSE.
1274 { return (customflags & f); }
BMMExport void* GetPiData ( )
inline

Returns the plugin data stored on the BitmapInfo.

The plugin data is set by BitmapIO class responsible for producing this image. The BitmapIO class stores its image specific data in the plugin data. For example, the avi BitmapIO class stores the compressor name, quality, and keyframe in the plugin data. The BitmapInfo owns the memory associated with the plugin data and will free the memory when deleted.

Returns
Pointer to the plugin data.
1286 { return pidata; }
BMMExport void SetPiData ( void ptr)
inline

Sets the plugin data stored on the BitmapInfo.

This method is not normally called, rather a BitmapIO instance will call AllocPiData(), which will allocate the plugin data memory and set the plugin data size. The BitmapIO will then acquire the pointer to the plugin data memory via GetPiData()

Parameters
[in]ptrPointer to the plugin data.
1293 { pidata = ptr; }
BMMExport DWORD GetPiDataSize ( )
inline

Returns the size of the plugin data stored on the BitmapInfo.

Returns
Size of the plugin data.
1298 { return pisize; }
BMMExport void SetPiDataSize ( DWORD  s)
inline

Sets the reported size of the plugin data stored on the BitmapInfo.

This method is not normally called, rather a BitmapIO instance will call AllocPiData(), which will allocate the plugin data memory and set the plugin data size. The BitmapIO will then acquire the pointer to the plugin data memory via GetPiData()

Parameters
[in]sReported size of the plugin data.
1305 { pisize = s; }
BMMExport void ResetPiData ( )

Resets the plugin data stored on the BitmapInfo.

Frees existing plugin data memory and sets plugin data size to zero.

BMMExport BOOL AllocPiData ( DWORD  size)

Allocates the plugin data memory and set the plugin data size.

Acquire the pointer to the plugin data memory via GetPiData()

Parameters
[in]sizeRequested size of the plugin data.
BMMExport void* CreateFmtSpecBlock ( void  )
Remarks
This method is available in release 2.0 and later only.

This method provides some access to device specific data (for instance the compression ratio in a JPEG file). This method will return a buffer containing a given device specific data (or NULL if the device referenced is unknown or doesn't have "specific data"). The buffer structure will depend on the device. For all drivers shipped with the SDK, this structure is defined in their header files (which must be included in the project for which this method is used). Internally, this method validates the driver, calls its EvaluateConfigure() method to define the buffer size, creates this buffer and, if the returned size is greater than zero, calls the driver's SaveConfigure() method in order to set default values. The developer may then change whatever they want, create and write a file using this BitmapInfo which includes the device's specific data.

There is no need to free this buffer as this is handled by the BitmapInfo destructor.

Note: The name and/or device properties must be defined before using this method.
BMMExport void Copy ( const BitmapInfo from,
BOOL  copyProxySubject 
)

Assignment function. The data members of the specified BitmapInfo are copied to this BitmapInfo, with option to also copy the proxySubject info.

BMMExport void Copy ( const BitmapInfo from)
BMMExport BitmapInfo& operator= ( const BitmapInfo from)
Remarks
Assignment operator. The data members of the specified BitmapInfo are copied to this BitmapInfo.
Parameters:
BitmapInfo &from

The source BitmapInfo.
BMMExport IOResult Save ( ISave isave)
BMMExport IOResult Load ( ILoad iload)
BMMExport void EnumAuxFiles ( AssetEnumCallback assetEnum,
DWORD  vflags 
)
BMMExport BOOL Validate ( )
Remarks
Implemented by the System.

This method is used to check the width, height, aspect ratio, and gamma settings to make sure they are within an acceptable range of values. The comparison is as follows:

if (width < 1 ||

height < 1 ||

aspect <= 0.0 ||

gamma < MINGAMMA ||

gamma > MAXGAMMA)

return (FALSE);

else

return (TRUE);

Where:

#define MINGAMMA 0.2f

#define MAXGAMMA 5.0f
Returns
TRUE if the BitmapInfo's settings are valid ; otherwise FALSE.
BMMExport HWND GetUpdateWindow ( )
inline
Remarks
Returns the window handle to send progress or check abort messages to.
1398 { return hWnd; }
BMMExport void SetUpdateWindow ( HWND  hwnd)
inline
Remarks
This is used internally - the system calls this method. This is how a window handle is sent down to device drivers and filters so they can send progress reports and check for cancel.
1402 { hWnd = hwnd; }
BMMExport DWORD GetGChannels ( )
BMMExport DWORD GetDeviceFlags ( )
BMMExport BOOL FixDeviceName ( )

Sets the appropriate device name, as derived from the filename.