29 #include <sys/types.h>
40 #define MAGIC 0x1234567a
41 #define MAGIC_SWAP 0xa7654321 // Swapped magic number
43 namespace HDK_Sample {
78 unsigned &
y)
const override;
85 using namespace HDK_Sample;
98 return "Sample HDK Format";
106 return "HDK Sample image format. Not very useful";
127 static const char *extensions[] = {
"smp",
".SMP", 0 };
170 static const char *theTextureOptions[] = {
183 writeTextureOption(
const char *token,
const char *
value)
200 for (
int i = 0; theTextureOptions[i]; ++i)
205 writeTextureOption(theTextureOptions[i], value);
226 IMG_Sample::readHeader()
252 IMG_Sample::writeHeader()
GT_API const UT_StringHolder filename
IMG_Plane * getPlane(int i=0) const
Get an image plane by index.
void setDataType(IMG_DataType dt)
void setResolution(unsigned xres, unsigned yres)
IMG_DataType getDataType() const
int64 bytesPerScanline() const
Describes the format and layout of a single plane in an image The plane specifies the format and name...
void newIMGFormat(void *)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
const char * getOption(const char *name) const
IMG_ColorModel getColorModel() const
void setColorModel(IMG_ColorModel cm)
Generic interface for reading and writing image files. This class handles the reading and writing of ...
IMG_Plane * addDefaultPlane()
Add a default 8bit, RGBA plane to the image.
bool readBytes(void *buffer, int size)
int open() override
Only called by format class.
int writeScanline(int scan, const void *buf) override
UT_API void UTswapBytes(int16 *values, int64 num)
Contains the details of a specific image file, used by IMG_File. This class contains all the high-lev...
int create(const IMG_Stat &stat) override
GLenum GLuint GLsizei const GLchar * buf
GLsizei const GLfloat * value
int readScanline(int y, void *buf) override