aboutsummaryrefslogtreecommitdiff
path: root/KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h')
-rw-r--r--KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h b/KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h
new file mode 100644
index 00000000..da5f1f59
--- /dev/null
+++ b/KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h
@@ -0,0 +1,32 @@
+#pragma once
+#include <cstdio>
+#include <cstdlib>
+#include "jpeglib.h"
+#include "jerror.h"
+
+class CPPJPEGWrapper{
+public:
+ CPPJPEGWrapper();
+ ~CPPJPEGWrapper();
+ void Unload();
+
+ unsigned char* GetData() const;
+ unsigned GetWidth();
+ unsigned GetHeight();
+ unsigned GetBPP();
+ unsigned GetChannels();
+
+
+ bool LoadJPEG(const char* FileName, bool Fast = true);
+protected:
+ //if the jpeglib stuff isnt after I think stdlib then it wont work just put it at the end
+ unsigned long x;
+ unsigned long y;
+ unsigned short int bpp; //bits per pixels unsigned short int
+ unsigned char* data; //the data of the image
+ unsigned int ID; //the id ogl gives it
+ unsigned long size; //length of the file
+ int channels; //the channels of the image 3 = RGA 4 = RGBA
+
+
+};