From b90619a95d2b4303e21c0b9de3364e3744ca50b1 Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 12 Sep 2007 12:20:04 +0200 Subject: [PATCH] create a bmp copy with 4 colors + modified default log --- betty/bmp2b.c | 30 ++++++- betty/default_logo.h | 204 +++++++++++++++++++++---------------------- 2 files changed, 130 insertions(+), 104 deletions(-) diff --git a/betty/bmp2b.c b/betty/bmp2b.c index 9baf3b5..a2badfd 100644 --- a/betty/bmp2b.c +++ b/betty/bmp2b.c @@ -21,13 +21,15 @@ #define BINARY 1 #define CHAR 2 +#define SHOW 3 int main(int argc,char **argv) { int i,fd; - t_bmp src; + t_bmp src,dst; char in[128]; char out[128]; + char blook[128+8]; unsigned char stat; unsigned char buf[2]; int page,col; @@ -64,9 +66,18 @@ int main(int argc,char **argv) { /* the bitmap infile */ bmp_init(&src,1); src.mode=READ; - strcpy(src.file,in); + strncpy(src.file,in,128); bmp_read_file(&src); + /* the bitmap outfile */ + sprintf(blook,"blook_%s",in); + bmp_init(&dst,1); + dst.mode=WRITE; + strncpy(dst.file,blook,128+8); + dst.width=src.width; + dst.height=src.height; + bmp_alloc_map(&dst); + if((src.width!=DX)|(src.height=!DY)) { printf("wrong dimensions: %d %d (need: %d %d)\n", src.width,src.height,DX,DY); @@ -94,17 +105,29 @@ int main(int argc,char **argv) { if(b<=(0.25*255)) { buf[0]|=(1<