25 #ifndef GRAPHICS_IMAGES_DECODER_H 26 #define GRAPHICS_IMAGES_DECODER_H 30 #include <boost/noncopyable.hpp> 41 class SeekableReadStream;
67 void getPixel(
int x,
int y,
float &r,
float &g,
float &b,
float &a)
const;
69 void getPixel(
int n,
float &r,
float &g,
float &b,
float &a)
const;
72 void setPixel(
int x,
int y,
float r,
float g,
float b,
float a);
74 void setPixel(
int n,
float r,
float g,
float b,
float a);
140 #endif // GRAPHICS_IMAGES_DECODER_H PixelFormat getFormat() const
Return the image data's general format.
void getPixel(int x, int y, float &r, float &g, float &b, float &a) const
Get the color values of the pixel at this position.
A class holding an UTF-8 string.
MipMap(const ImageDecoder *i=0)
Common::ScopedArray< byte > data
The mip map's data.
bool _isCubeMap
Is this image a cube map? A cube map always needs to have 6 layers!
const TXI & getTXI() const
Return the texture information TXI, which may be embedded in the image.
bool isCubeMap() const
Is this image a cube map?
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 decompress()
Manually decompress the texture image data.
bool dumpTGA(const Common::UString &fileName) const
Dump the image into a TGA.
void setPixel(int x, int y, float r, float g, float b, float a)
Set the color values of the pixel at this position.
size_t _layerCount
Number of layers in this image.
PixelFormatRaw getFormatRaw() const
Return the image data's raw format.
PixelFormatRaw _formatRaw
const MipMap & getMipMap(size_t mipMap, size_t layer=0) const
Return a mip map.
Low-level type definitions to handle fixed width types portably.
A vector storing pointer to objects, with automatic deletion.
const ImageDecoder * image
The image the mip map belongs to.
PixelDataType getDataType() const
Return the image data pixel's type.
int width
The mip map's width.
ImageDecoder & operator=(const ImageDecoder &image)
Common::PtrVector< MipMap > MipMaps
A generic interface for image decoders.
size_t getMipMapCount() const
Return the number of mip maps contained in the image.
uint32 size
The mip map's size in bytes.
bool hasAlpha() const
Does the image data have alpha? .
bool isCompressed() const
Is the image data compressed?