| 1234567891011121314151617181920212223242526272829303132333435363738 |
- $#include "Image.h"
- enum CompressedFormat
- {
- CF_NONE = 0,
- CF_DXT1,
- CF_DXT3,
- CF_DXT5,
- CF_ETC1,
- CF_PVRTC_RGB_2BPP,
- CF_PVRTC_RGBA_2BPP,
- CF_PVRTC_RGB_4BPP,
- CF_PVRTC_RGBA_4BPP,
- };
- class Image : public Resource
- {
- void FlipVertical();
- bool SaveBMP(const char* fileName);
- bool SavePNG(const char* fileName);
- bool SaveTGA(const char* fileName);
- bool SaveJPG(const char* fileName, int quality);
-
- int GetWidth() const;
- int GetHeight() const;
- unsigned GetComponents() const;
- bool IsCompressed() const;
- CompressedFormat GetCompressedFormat() const;
- unsigned GetNumCompressedLevels() const;
- CompressedLevel GetCompressedLevel(unsigned index) const;
-
- tolua_readonly tolua_property__get_set int width;
- tolua_readonly tolua_property__get_set int height;
- tolua_readonly tolua_property__get_set unsigned components;
- tolua_readonly tolua_property__is_set bool compressed;
- tolua_readonly tolua_property__get_set CompressedFormat compressedFormat;
- tolua_readonly tolua_property__get_set unsigned numCompressedLevels;
- };
|