summaryrefslogtreecommitdiff
path: root/osframework/source/ImageLib/ImageLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'osframework/source/ImageLib/ImageLib.h')
-rw-r--r--osframework/source/ImageLib/ImageLib.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/osframework/source/ImageLib/ImageLib.h b/osframework/source/ImageLib/ImageLib.h
new file mode 100644
index 0000000..081beae
--- /dev/null
+++ b/osframework/source/ImageLib/ImageLib.h
@@ -0,0 +1,42 @@
+#ifndef __IMAGELIB_H__
+#define __IMAGELIB_H__
+
+#include <string>
+
+namespace ImageLib
+{
+
+class Image
+{
+public:
+ int mWidth;
+ int mHeight;
+ unsigned long* mBits;
+
+public:
+ Image();
+ virtual ~Image();
+
+ int GetWidth();
+ int GetHeight();
+ unsigned long* GetBits();
+};
+
+bool WriteJPEGImage(const std::string& theFileName, Image* theImage);
+bool WritePNGImage(const std::string& theFileName, Image* theImage);
+bool WriteTGAImage(const std::string& theFileName, Image* theImage);
+bool WriteBMPImage(const std::string& theFileName, Image* theImage);
+extern int gAlphaComposeColor;
+extern bool gAutoLoadAlpha;
+extern bool gIgnoreJPEG2000Alpha; // I've noticed alpha in jpeg2000's that shouldn't have alpha so this defaults to true
+
+
+Image* GetImage(const std::string& theFileName, bool lookForAlphaImage = true);
+
+void InitJPEG2000();
+void CloseJPEG2000();
+void SetJ2KCodecKey(const std::string& theKey);
+
+}
+
+#endif //__IMAGELIB_H__ \ No newline at end of file