summaryrefslogtreecommitdiff
path: root/lib/Image.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Image.cc')
-rw-r--r--lib/Image.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Image.cc b/lib/Image.cc
index f4d2ee0..8a87a0e 100644
--- a/lib/Image.cc
+++ b/lib/Image.cc
@@ -167,6 +167,20 @@ unsigned char * Image::GetBuffer() {
#define WORDS_BIGENDIAN 1
#endif
+bool Image::SupportsFormat(unsigned int f) {
+ switch(f) {
+ case FORMAT_TGA_BASIC:
+ return true;
+ case FORMAT_JPEG:
+#ifndef HAVE_LIBJPEG
+ return false;
+#else
+ return true;
+#endif
+ }
+ return false;
+}
+
bool Image::Prepare(unsigned int f) throw (GeneralException) {
int ix, iy;