diff options
author | MarianoGNU <marianognu.easyrpg@gmail.com> | 2015-10-24 11:55:00 -0300 |
---|---|---|
committer | MarianoGNU <marianognu.easyrpg@gmail.com> | 2015-10-24 11:55:00 -0300 |
commit | 754908844ae52c04ed68ef27c02481479f1e2ab4 (patch) | |
tree | 90b95accfabc9bc12a6479c004183ff7d28b6fcd /core/image.cpp | |
parent | 6df7d923797908ecf38684c0008c0e4b6475d884 (diff) | |
parent | 4baf65dab78b6e8062de760010338c316c628394 (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot into posta
Diffstat (limited to 'core/image.cpp')
-rw-r--r-- | core/image.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/core/image.cpp b/core/image.cpp index 4c0a23492b..06b7a78488 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -34,6 +34,33 @@ #include "print_string.h" #include <stdio.h> + +const char* Image::format_names[Image::FORMAT_MAX]={ + "Grayscale", + "Intensity", + "GrayscaleAlpha", + "RGB", + "RGBA", + "Indexed", + "IndexedAlpha", + "YUV422", + "YUV444", + "BC1", + "BC2", + "BC3", + "BC4", + "BC5", + "PVRTC2", + "PVRTC2Alpha", + "PVRTC4", + "PVRTC4Alpha", + "ETC", + "ATC", + "ATCAlphaExp", + "ATCAlphaInterp", + +}; + SavePNGFunc Image::save_png_func = NULL; void Image::_put_pixel(int p_x,int p_y, const BColor& p_color, unsigned char *p_data) { @@ -2355,6 +2382,12 @@ void Image::fix_alpha_edges() { } +String Image::get_format_name(Format p_format) { + + ERR_FAIL_INDEX_V(p_format,FORMAT_MAX,String()); + return format_names[p_format]; +} + Image::Image(const uint8_t* p_png,int p_len) { width=0; |