====== format_IsNative ====== ===== Description ===== Determine whether a file format has full 'native' support. Please see [[#comments]] for the distinction between native and non-native support. ===== Function prototype ===== bool CExtAPI::format_IsNative(ZFORMAT hFormat); ===== Arguments ===== ^ Name ^ Type ^ Comment ^ | //hFormat// | ZFORMAT | A handle to a format variable, the native support (or otherwise) of which is to be ascertained. | ===== Return value ===== False if: * The format is non-native, or; * An error occurred. True otherwise. ===== Comments ===== A format is considered native if: - It can both load and save maps. - The load/save operation is lossless, or minimally lossy. - The files contain sufficient information to load the maps, without human intervention (i.e. no import interface required.) Here are some examples: * RAW is non-native for heightfields because the format does not encode width/height, nor data type. Human intervention is always required to open RAW files. * JPEG is non-native for heightfields, because the format has only 8-bit precision (which is too lossy for elevation data), and also discards the actual elevation data by clamping values between 0 and 255. * JPEG //is// native for texture maps, because it supports 24bit colour, and with suitable compression, provides minimal loss.