3ds Max C++ API Reference
Loading...
Searching...
No Matches
Custom Bitmap Flags

These can be OR'd together. More...

Macros

#define BMM_CUSTOM_GAMMA   ((DWORD)(1 << 0))
 Flags that a Custom gamma is used.
 
#define BMM_CUSTOM_SIZE   ((DWORD)(1 << 1))
 Custom size setting.
 
#define BMM_CUSTOM_RESFIT   ((DWORD)(1 << 2))
 Bitmap is to be resized.
 
#define BMM_CUSTOM_POS   ((DWORD)(1 << 3))
 Bitmap has a custom positioning.
 
#define BMM_CUSTOM_FILEGAMMA   ((DWORD)(1 << 4))
 This flags if a loaded bitmap's gamma came from file, as well as flags the "Automatic" gamma correction mode for file load and save.
 
#define BMM_CUSTOM_IFLENUMFILES   ((DWORD)(1 << 5))
 
#define BMM_CUSTOM_HDR_TYPE   ((DWORD)(1 << 6))
 Internal Use Only.
 
#define BMM_CUSTOM_INFERREDGAMMA   ((DWORD)(1 << 8))
 Additional flag to BMM_CUSTOM_FILEGAMMA. Did gamma actually come from data stored in the file, or was it inferred from the file type?
 
#define BMM_CUSTOM_NOGAMMAUI   ((DWORD)(1 << 9))
 Settings this flag causes the Bitmap file dialog to gray out the Gamma UI.
 

Detailed Description

These can be OR'd together.

Macro Definition Documentation

◆ BMM_CUSTOM_GAMMA

#define BMM_CUSTOM_GAMMA   ((DWORD)(1 << 0))

Flags that a Custom gamma is used.

When this flag is used, the actual gamma value is NOT read with Gamma() and set with SetGamma(), but instead read with GetCustomGamma() and set with SetCustomGamma()!

This flag can be used in several cases:

  • when examining the BitmapInfo of a loaded bitmap, this indicates that the file was loaded with the custom gamma (i.e. a user override).
  • when using the BitmapManager::SelectFileInput() (or output) file dialogs, it indicates the "Custom" gamma option.
  • when set before loading Bitmap files (calling BitmapManager::Load()), it indicates that the gamma should be read using the custom gamma.
  • when set before opening Bitmap files for write (calling Bitmap::OpenOutput()), it indicates that the file should be written with the custom gamma.

◆ BMM_CUSTOM_SIZE

#define BMM_CUSTOM_SIZE   ((DWORD)(1 << 1))

Custom size setting.

◆ BMM_CUSTOM_RESFIT

#define BMM_CUSTOM_RESFIT   ((DWORD)(1 << 2))

Bitmap is to be resized.

◆ BMM_CUSTOM_POS

#define BMM_CUSTOM_POS   ((DWORD)(1 << 3))

Bitmap has a custom positioning.

◆ BMM_CUSTOM_FILEGAMMA

#define BMM_CUSTOM_FILEGAMMA   ((DWORD)(1 << 4))

This flags if a loaded bitmap's gamma came from file, as well as flags the "Automatic" gamma correction mode for file load and save.

This flag can be used in several cases:

  • when examining the BitmapInfo of a loaded bitmap, this indicates that the gamma came from the file (as opposed from a user override or the defaults). See also BMM_CUSTOM_INFERREDGAMMA.
  • when using the BitmapManager::SelectFileInput() (or output) file dialogs, it indicates the "Automatic" gamma correction mode
  • when set before loading Bitmap files (calling BitmapManager::Load()), it indicates that the gamma should be read from file (if possible) and inferred from the file-type if not.
  • when set before opening Bitmap files for write (calling Bitmap::OpenOutput()), it indicates that the actual gamma used should be inferred from the kind of file being written.

    See BitmapIOMetaData for more information about automatic gamma correction.

◆ BMM_CUSTOM_IFLENUMFILES

#define BMM_CUSTOM_IFLENUMFILES   ((DWORD)(1 << 5))

◆ BMM_CUSTOM_HDR_TYPE

#define BMM_CUSTOM_HDR_TYPE   ((DWORD)(1 << 6))

Internal Use Only.

Bitmap has custom hdr type that reads storage info from BitMap Info and not from UI.

◆ BMM_CUSTOM_INFERREDGAMMA

#define BMM_CUSTOM_INFERREDGAMMA   ((DWORD)(1 << 8))

Additional flag to BMM_CUSTOM_FILEGAMMA. Did gamma actually come from data stored in the file, or was it inferred from the file type?

If BMM_CUSTOM_FILEGAMMA is set prior to loading a file (calling BitmapManager::Load()), the BitmapManager will attempt to load a file using gamma information stored in the file header. After load, BMM_CUSTOM_FILEGAMMA will be set and the Bitmap's BitmapInfo::Gamma() value will be set to the appropriate gamma.

  • If only BMM_CUSTOM_FILEGAMMA is set, it means that the gamma truly came from a stored value in the file header.
  • If, in addition, the BMM_CUSTOM_INFERREDGAMMA is set, this indicates the case where no actual gamma was stored in the file header, but gamma was computed based on the automatic gamma correction feature, i.e. "inferred" from the file type, bit depth, etc.

See BitmapIOMetaData for more information about automatic gamma correction.

◆ BMM_CUSTOM_NOGAMMAUI

#define BMM_CUSTOM_NOGAMMAUI   ((DWORD)(1 << 9))

Settings this flag causes the Bitmap file dialog to gray out the Gamma UI.

This can be used when the BitmapManager::SelectFileInput() or BitmapManager::SelectFileOutput() are used to request only a filename. This avoids the user being confused by an UI that does nothing and has no effect.