summaryrefslogtreecommitdiff
path: root/tests/make_png/bitmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/make_png/bitmap.h')
-rw-r--r--tests/make_png/bitmap.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/tests/make_png/bitmap.h b/tests/make_png/bitmap.h
index fb7ab12e5..8a3a4f58e 100644
--- a/tests/make_png/bitmap.h
+++ b/tests/make_png/bitmap.h
@@ -1,7 +1,17 @@
#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
#include <ft2build.h>
+
#include "murmur3.h" // MurmurHash3_x64_128 header file
-#include <unistd.h>
+
+#include <png.h>
+
#include FT_FREETYPE_H
#include FT_MODULE_H
@@ -18,6 +28,28 @@ typedef struct { // To store 128bit Hash
FT_UInt32 hash[4];
}HASH_128;
+typedef struct {
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+ unsigned char alpha;
+} PIXEL;
+
+typedef struct {
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+ unsigned char alpha;
+} PIXEL_BGRA;
+
+/* A picture. */
+
+typedef struct {
+ PIXEL *pixels;
+ size_t width;
+ size_t height;
+} IMAGE;
+
//-------------------------------------------------------------------------------
HASH_32 * Generate_Hash_x86_32(FT_Bitmap * bitmap, HASH_32 * murmur);
@@ -25,3 +57,9 @@ HASH_128 * Generate_Hash_x86_128(FT_Bitmap * bitmap, HASH_128 * murmur);
HASH_128 * Generate_Hash_x64_128(FT_Bitmap * bitmap, HASH_128 * murmur);
//-------------------------------------------------------------------------------
+
+PIXEL * Pixel_At (IMAGE * bitmap, int x, int y);
+
+void Make_PNG(FT_Bitmap* bitmap,char* name,int i,int render_mode);
+int Generate_PNG (IMAGE *bitmap, const char *path,int render_mode);
+