105 if (mipMap.
width != width)
106 throw Common::Exception(
"dumpTGA(): Unsupported image with variable layer width");
PixelFormat getFormat() const
Return the image data's general format.
static void writeMipMap(Common::WriteStream &stream, const ImageDecoder::MipMap &mipMap, PixelFormat format)
Generic image decoder interface.
static void writePixel(Common::WriteStream &file, const byte *&data, PixelFormat format)
virtual void flush()
Commit any buffered data to the underlying channel or storage medium; unbuffered streams can use the ...
A class holding an UTF-8 string.
Common::ScopedArray< byte > data
The mip map's data.
static Common::WriteStream * openTGA(const Common::UString &fileName, int width, int height)
size_t getLayerCount() const
Return the number of layers contained in the image.
int height
The mip map's height.
A simple scoped smart pointer template.
void dumpTGA(const Common::UString &fileName, const ImageDecoder *image)
Dump image into a TGA file.
Basic exceptions to throw.
const MipMap & getMipMap(size_t mipMap, size_t layer=0) const
Return a mip map.
void writeUint16LE(uint16 value)
A scoped plain pointer, allowing pointer-y access and normal deletion.
void writeByte(byte value)
Generic interface for a writable data stream.
PointerType get() const
Returns the plain pointer value.
int width
The mip map's width.
Implementing the stream writing interfaces for files.
A generic interface for image decoders.
size_t getMipMapCount() const
Return the number of mip maps contained in the image.
A simple streaming file writing class.
void writeUint32LE(uint32 value)