$#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 String fileName); bool SavePNG(const String fileName); bool SaveTGA(const String fileName); bool SaveJPG(const String 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; };