From a774dc8bae93ac59a4b618348ee8b471bf289d1a Mon Sep 17 00:00:00 2001 From: asterix Date: Thu, 13 Mar 2008 09:29:02 +0000 Subject: [PATCH] Add icons folder for demo app. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1184 38d2e660-2303-0410-9eaa-f027e97ec537 --- icons/Makefile | 45 +++++++++++++++++ icons/flipimage.cpp | 120 ++++++++++++++++++++++++++++++++++++++++++++ icons/logo.png | Bin 0 -> 5105 bytes 3 files changed, 165 insertions(+) create mode 100644 icons/Makefile create mode 100644 icons/flipimage.cpp create mode 100755 icons/logo.png diff --git a/icons/Makefile b/icons/Makefile new file mode 100644 index 00000000..50469549 --- /dev/null +++ b/icons/Makefile @@ -0,0 +1,45 @@ +# +# $Id: Makefile 18234 2007-10-08 13:39:48Z rasky $ +# Copyright 2004, 2006 Develer S.r.l. (http://www.develer.com/) +# All rights reserved. +# +# Author: Stefano Fedrigo +# +# $Log$ +# Revision 1.2 2006/09/20 14:18:01 marco +# Use only icons neede by demo. +# +# Revision 1.1 2006/09/19 17:48:00 bernie +# Add temporary logo. +# +# + +# Set to 1 for debug builds +DEBUG = 1 + +RASTERS = logo.raster + +FLIPIMAGE = flipimage +flipimage_SRC = flipimage.cpp +flipimage_OBJ = $(flipimage_SRC:%.cpp=%.o) + +.PHONY: all +all: $(RASTERS) + +# Link rule +$(FLIPIMAGE): $(flipimage_OBJ) + $(CXX) $^ $(flipimage_LIBS) $(LDFLAGS) -o $@ + +.PHONY: clean +clean: + rm -f $(TRG) $(flipimage_OBJ) + rm -f $(RASTERS) + +.PHONY: rasters +rasters: $(FLIPIMAGE) $(RASTERS) + +%.raster: %.png $(FLIPIMAGE) + convert $< txt:- | ./flipimage >$@ + +# Include dependencies +-include *.d diff --git a/icons/flipimage.cpp b/icons/flipimage.cpp new file mode 100644 index 00000000..f28af7da --- /dev/null +++ b/icons/flipimage.cpp @@ -0,0 +1,120 @@ +/** + * \file + * + * + * \version $Id$ + * \author Stefano Fedrigo + * + * \brief Conversion tool from image TXT format to LCD bitmap + */ + +/* + * $Log$ + * Revision 1.1 2006/09/19 17:48:00 bernie + * Add temporary logo. + * + * Revision 1.3 2004/09/24 17:25:32 powersoft + * Fix for new version of ImageMagick. + * + * Revision 1.2 2004/03/13 22:52:54 aleph + * documentation fixes + * + * Revision 1.1 2004/01/26 15:31:17 aleph + * Add boot images and tools for importing them + * + */ + +#include +#include +#include + +#define RASTER_WIDTH 82 +#define RASTER_HEIGHT 64 + +// Minimum color level to consider a pixel on +#define COLOR_THRESHOLD 128 + + +using namespace std; + + +int main(void) +{ + char buf[64]; + int n; + unsigned char mask; + unsigned char line[RASTER_WIDTH]; + + for (int l = 0; l < RASTER_HEIGHT/8; l++) + { + mask = 1; + memset(line, 0, sizeof(line)); + + do + { + for (int x = 0; x < RASTER_WIDTH; x++) + { + if (!cin.getline(buf, sizeof(buf))) + goto print_line; + + istringstream ss(buf); + string s; + char c; + + ss + >> s // skip glob coord spec + >> c // skip open paren + >> n; // this is the red level + + //DEBUG + //cout << "s='" << s << "' n='" << n << "'" << endl; + + if (n < COLOR_THRESHOLD) + line[x] |= mask; + } + } + while (mask <<= 1); + +print_line: + cout << "\n\t"; + for (int x = 0; x < RASTER_WIDTH; x++) + { + printf("0x%02X", line[x]); + if (x % 8 == 7) + cout << ",\n\t"; + else + cout << ", "; + } + cout << endl; + } + + return 0; +} diff --git a/icons/logo.png b/icons/logo.png new file mode 100755 index 0000000000000000000000000000000000000000..e3ab3eb0d89e8a2576aa59ff59b94340fcfa42b2 GIT binary patch literal 5105 zcmZ`*WmHt(*S>^wNw*9jAl;oqcMBsOGIU6HH&O%A2q;}rqjWb60@5JTB_XNge|}%z zwcfqfxqIFF;huAz{XEa!@j6<{_&C%!007{tswn6o^M6Yg3l;gq(D`bLOxW%!5KjQW zCHZfm0J-^;0Dz`jR0MQ|!tg4=^v{1q4i5}%Y;((o z<1o7eL|9F>AkPOT6yR@&q$CGp4`vsD;x~(n1@vg<_3+ZhJ`o;*b4*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