From e893e5c5607eb1726be4c3e3c0b158feb3fb02f5 Mon Sep 17 00:00:00 2001 From: Laurence Bank Date: Mon, 30 Sep 2024 09:16:46 +0100 Subject: [PATCH] updated image compression tool --- fontconvert/fontconvert.c | 2 +- imageconvert/main.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fontconvert/fontconvert.c b/fontconvert/fontconvert.c index 68be53f..d34f9db 100644 --- a/fontconvert/fontconvert.c +++ b/fontconvert/fontconvert.c @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) return 1; } // Write the file header - bbff.u16Marker = BB_MARKER; + bbff.u16Marker = BB_FONT_MARKER; bbff.first = first; bbff.last = last; bbff.rotation = iRotation; // save rotation angle diff --git a/imageconvert/main.c b/imageconvert/main.c index f6ad235..637ff5e 100644 --- a/imageconvert/main.c +++ b/imageconvert/main.c @@ -6,6 +6,7 @@ // #include +#define MAX_IMAGE_FLIPS 256 #include "../src/Group5.h" #include "../src/g5enc.inl" // @@ -118,7 +119,8 @@ int main(int argc, const char * argv[]) { FILE *f; printf("Encode succeeded!\n"); iOutSize = g5_encode_getOutSize(&g5enc); - printf("Input size = %d, output size = %d\n", iPitch*h, iOutSize); + printf("Input size: %d bytes, output size: %d bytes\n", iPitch*h, iOutSize); + printf("Compression ratio: %2.1f:1\n", (float)(iPitch*h) / (float)iOutSize); bbbm.u16Marker = BB_BITMAP_MARKER; bbbm.width = w; bbbm.height = h;