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)
 
  204             writeTextureOption(theTextureOptions[i], value);
 
  213     if (myOS) myOS->flush();    
 
  225 IMG_Sample::readHeader()
 
  241     myStat.setResolution(header.
xres, header.
yres);
 
  242     plane = myStat.addDefaultPlane();
 
  251 IMG_Sample::writeHeader()
 
  256     header.
xres = myStat.getXres();
 
  257     header.
yres = myStat.getYres();
 
  258     header.
model = myStat.getPlane()->getColorModel();
 
  259     header.
data  = myStat.getPlane()->getDataType();
 
  273     if (y >= myStat.getYres()) 
return 0;
 
  275     nbytes = myStat.bytesPerScanline();
 
  276     if (!readBytes((
char *)buf, nbytes))
 
  283         switch (myStat.getPlane()->getDataType())
 
  312     return (!myOS->write((
char *)buf, myStat.bytesPerScanline())) ? 0 : 1;
 
GLenum GLuint GLenum GLsizei const GLchar * buf
 
GT_API const UT_StringHolder filename
 
GLsizei const GLfloat * value
 
void setDataType(IMG_DataType dt)
 
Describes the format and layout of a single plane in an image The plane specifies the format and name...
 
void newIMGFormat(void *)
 
void setColorModel(IMG_ColorModel cm)
 
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
 
int readScanline(int y, void *buf) override