summaryrefslogtreecommitdiffstats
path: root/src/pngenc.h
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-02-24 18:57:25 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-02-24 18:57:25 (GMT)
commitc7bc295f92f56d1dea369663e058933f550a0187 (patch)
tree81d72027898b1a75221b9ca82b04075277821a9f /src/pngenc.h
parent9793ce49f1d7641854ef0608b34c1dd2d4891a20 (diff)
downloadDoxygen-c7bc295f92f56d1dea369663e058933f550a0187.zip
Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.gz
Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.bz2
Release-1.2.14-20020224
Diffstat (limited to 'src/pngenc.h')
-rw-r--r--src/pngenc.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/pngenc.h b/src/pngenc.h
new file mode 100644
index 0000000..598cf80
--- /dev/null
+++ b/src/pngenc.h
@@ -0,0 +1,54 @@
+/******************************************************************************
+ *
+ *
+ *
+ *
+ * Copyright (C) 1997-2001 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef _PNGENC_H
+#define _PNGENC_H
+#include <qfile.h>
+
+typedef unsigned char Byte;
+
+struct Color
+{
+ Byte red;
+ Byte green;
+ Byte blue;
+};
+
+class PngEncoder
+{
+ public:
+ PngEncoder(Byte *rawBytes,Color *p,int w,int h,Byte d,int t);
+ ~PngEncoder();
+ void write(const char *fileName);
+
+ protected:
+
+ private:
+ // image variables
+ Byte *data; // pointer to the image data (one byte per pixel)
+ Color *palette; // pointer to the color palette
+ int width; // image width
+ int height; // image height
+ Byte depth; // bits per CLUT entry
+ int transIndex; // index of the transparant color; -1 = none
+ int numPixels; // total number of pixel (i.e. width * height)
+ Byte *dataPtr; // pointer located at the current pixel.
+
+};
+
+#endif