11 #ifndef __IMG_Format__
12 #define __IMG_Format__
67 static int getNFormats();
82 static void findFormatReadable(
87 static void findFormatWritable(
94 static const IMG_Format *findFormatByName(
const char *format_name);
95 static const IMG_Format *findFormatByLabel(
const char *format_label);
101 IMG_File *allocValidFile()
const;
106 static const IMG_Format *metadataPrefix(
const char *key);
110 virtual const char *getFormatName()
const = 0;
113 virtual const char *getFormatLabel()
const;
117 virtual const char *getMetadataKey()
const;
122 virtual const char *getFormatDescription()
const;
131 virtual const char *getDefaultExtension()
const;
140 virtual int checkExtension(
const char *
filename)
const = 0;
143 virtual int checkMagic(
unsigned int)
const;
146 virtual int checkMagicSeekable(
UT_IStream &is)
const;
152 virtual int checkDevice(
const char *)
const;
170 virtual void getMaxResolution(
unsigned &
x,
171 unsigned &
y)
const = 0;
178 virtual int isReadRandomAccess()
const;
181 virtual int isWriteRandomAccess()
const;
186 virtual int isTopFirst()
const;
190 virtual int isLeftFirst()
const;
195 virtual bool isReadable()
const;
198 virtual bool isWritable()
const;
204 virtual bool isDataWindowSupported()
const;
208 virtual bool isDataWindowCropOnly()
const;
212 virtual bool isDataWindowStreakSupported()
const;
217 virtual bool isDeepRasterSupported()
const;
225 virtual bool isDataInterleaved()
const;
229 virtual bool canPlaneTypesDiffer()
const;
250 void defaultMetadata(
IMG_Stat &stat) const;
253 static
void setGlobalOption(const
char *
name, const
char *
value);
255 static
void getGlobalOption(const
char *name,
UT_String &value);
260 static
bool setFormatOptionDefault(const
char *format_name,
261 const
char *format_option,
262 const
char *defvalue);
265 static
bool getFormatOptionDefault(const
char *format_name,
266 const
char *format_option,
270 static
int matchExtension(const
char *
filename, const
char *ext);
274 static
int matchExtensions(const
char *filename, const
char *ext[]);
289 virtual
fpreal formatColorSpaceGamma() const;
294 virtual
bool formatStoresColorSpace() const;
303 fpreal src_color_space_gamma,
304 bool src_data_is_8bit,
305 bool *dest_data_is_8bit = NULL)
const
307 return adjustGammaForFormat(&src_color_space,
308 src_color_space_gamma, src_data_is_8bit,
312 fpreal src_color_space_gamma,
313 bool src_data_is_8bit,
314 bool *dest_data_is_8bit)
const;
318 static void installBasics();
326 virtual IMG_File *createFile()
const = 0;
327 virtual int isFormatOk(
const IMG_Stat &stat)
const;
328 void removeFormatFromList();
333 static void findFormat(
345 static void loadGlobalOptions();
346 static bool loadOldFBOptions();
347 static bool emptyFormats();
348 static void adjustPriorities();
GT_API const UT_StringHolder filename
#define SYS_DEPRECATED(__V__)
IMG_ImageType
Type of image we want to create or have opened.
#define SYS_VISIBILITY_EXPORT
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
GLuint GLint GLboolean GLint GLenum access
GLint GLint GLsizei GLint GLenum format
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
GLuint const GLchar * name
Contains the details of a specific image file, used by IMG_File. This class contains all the high-lev...