summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2010-11-15 19:30:44 -0500
committerEamon Walsh <ewalsh@tycho.nsa.gov>2010-11-15 19:30:44 -0500
commit00755b7ca1cff3d64dc78f4209380c56e775ec6a (patch)
treed475f9ec9f9f02cbc6a22436a11f4e1ca3d188e4 /data
parent00795b8ebd6a7ee6a36e43ce74e161a33f581c5e (diff)
Add a graphical background image for the server screen.
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am6
-rw-r--r--data/backgrounds.odpbin0 -> 19256 bytes
-rw-r--r--data/genimage.c30
-rw-r--r--data/serverbg.rgbbin0 -> 909434 bytes
4 files changed, 35 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index c64bc70..f87562e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,2 +1,6 @@
+noinst_PROGRAMS = genimage
+
+genimage_SOURCES = genimage.c
+
fontdir = $(datadir)/linpicker
-dist_font_DATA = decker.ttf
+dist_font_DATA = decker.ttf serverbg.rgb
diff --git a/data/backgrounds.odp b/data/backgrounds.odp
new file mode 100644
index 0000000..44d16d5
--- /dev/null
+++ b/data/backgrounds.odp
Binary files differ
diff --git a/data/genimage.c b/data/genimage.c
new file mode 100644
index 0000000..8e65525
--- /dev/null
+++ b/data/genimage.c
@@ -0,0 +1,30 @@
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "linpicker_server_screen.c"
+
+int main(int argc, char **argv)
+{
+ uint32_t width = gimp_image.width;
+ uint32_t height = gimp_image.height;
+ unsigned i, r, g, b;
+ unsigned char pixel;
+
+ write(1, &width, sizeof(width));
+ write(1, &height, sizeof(height));
+
+ for (i = 0; i < width * height * 3; i += 3) {
+ r = gimp_image.pixel_data[i];
+ g = gimp_image.pixel_data[i + 1];
+ b = gimp_image.pixel_data[i + 2];
+
+ pixel = (r & 0xe0) | ((g >> 5) << 2) | (b >> 6);
+ write(1, &pixel, 1);
+ }
+
+ return 0;
+}
diff --git a/data/serverbg.rgb b/data/serverbg.rgb
new file mode 100644
index 0000000..56ca21f
--- /dev/null
+++ b/data/serverbg.rgb
Binary files differ