*** empty log message ***

This commit is contained in:
Marc Lehmann
1999-09-03 23:14:44 +00:00
parent dac729ca3f
commit 625df2ac59
15 changed files with 5551 additions and 553 deletions

View File

@ -1,10 +1,10 @@
Sat Sep 4 01:04:00 CEST 1999 Marc Lehmann <pcg@goof.com>
* plug-ins/Makefile.am, plug.ins/AlienMap2: new plug-in.
* plug-ins/Makefile.am, plug-ins/AlienMap2: new plug-in.
Sat Sep 4 00:38:01 CEST 1999 Marc Lehmann <pcg@goof.com>
* plug-ins/common/nova.c,
* plug-ins/common/nova.c, plug-ins/common/Makefile.am,
plug-ins/script-fu/scripts/starburst-logo.scm,
plug-ins/script-fu/scripts/starscape-logo.scm: updated nova plug-in
and two dependent scripts.
@ -16,7 +16,7 @@ Sat Sep 4 00:32:18 CEST 1999 Marc Lehmann <pcg@goof.com>
Sat Sep 4 00:23:07 CEST 1999 Marc Lehmann <pcg@goof.com>
* plug-ins/common/sparkle.c,
* plug-ins/common/sparkle.c, plug-ins/common/Makefile.am,
plug-ins/script-fu/scripts/frosty-logo.scm,
plug-ins/script-fu/scripts/t-o-p-logo.scm: updated sparkle plug-in and
two dependent scripts.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
## Process this file with automake to produce Makefile.in
pluginlibdir = $(gimpplugindir)/plug-ins
pluginlib_PROGRAMS = AlienMap2
AlienMap2_SOURCES = \
AlienMap2.c \
logo.h
INCLUDES = \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimp.la \
$(GTK_LIBS)
DEPS = \
$(top_builddir)/libgimp/libgimp.la
AlienMap2_DEPENDENCIES = $(DEPS)
.PHONY: files
files:
@files=`ls $(DISTFILES) 2> /dev/null`; for p in $$files; do \
echo $$p; \
done
@for subdir in $(SUBDIRS); do \
files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
for file in $$files; do \
echo $$subdir/$$file; \
done; \
done

788
plug-ins/AlienMap2/logo.h Normal file
View File

@ -0,0 +1,788 @@
/* GIMP header image file format (Indexed): //logo.h */
static unsigned int logo_width = 200;
static unsigned int logo_height = 72;
/* Call this macro repeatedly. After each use, the pixel data can be extracted */
#define HEADER_PIXEL(data,pixel) \
pixel[0] = palette_data[data[0]*3+2]; \
pixel[1] = palette_data[data[0]*3+1]; \
pixel[2] = palette_data[data[0]*3+0]; \
data--;
static unsigned char
palette_data[] = { 4,2,2,4,110,178,32,4,122,4,36,
86,15,3,66,4,58,127,36,8,186,4,34,122,17,2,
34,4,19,66,12,4,162,90,2,69,88,2,48,7,20,
2,25,2,103,8,14,48,4,58,186,90,3,154,82,2,
129,55,2,34,17,2,18,17,34,191,94,2,101,57,2,
70,7,32,154,12,22,157,17,3,50,4,88,150,96,3,
186,86,2,138,87,2,86,212,214,210,4,19,98,52,2,
154,15,11,2,4,132,216,7,18,125,12,6,82,37,12,
18,4,88,189,86,14,48,128,2,157,32,4,138,4,60,
155,4,48,126,60,2,218,7,10,52,13,12,66,129,2,
50,56,2,52,52,14,98,4,47,157,6,20,87,48,2,
24,58,2,101,120,2,141,52,5,170,4,113,215,127,2,
73,4,90,210,4,52,112,36,18,194,59,2,85,42,2,
10,107,2,173,95,2,114,31,3,52,4,79,160,84,3,
189,14,10,40,30,2,69,96,2,58,113,2,126,9,37,
231,17,33,170,28,14,2,4,30,146,68,10,37,132,2,
82,23,4,7,4,10,122,4,36,108,32,2,37,7,27,
2,4,98,175,84,10,146,4,101,191,4,14,146,8,29,
86,4,2,170,8,60,230,84,10,162,72,2,39,102,2,
142,4,142,221,4,49,143,68,12,170,4,124,213,15,4,
74,114,2,69,112,2,158,32,3,23,8,50,190,111,2,
104,6,40,154,96,2,210,6,28,104,60,2,138,61,2,
25,68,2,114,58,2,125,39,2,114,73,2,69,16,4,
58,4,88,177,56,14,26,138,2,173,4,68,176,71,2,
55,76,2,210,4,78,130,17,3,42,6,27,69,112,2,
49,12,26,178,47,13,159,18,11,10,13,11,74,141,2,
58,52,18,234,4,82,186,4,126,198,4,103,213,4,62,
206,4,72,226,12,46,210,72,12,222,12,26,146,20,34,
210,4,113,197,4,131,229,4,48,170,4,76,170,7,43,
95,52,30,218,15,11,170,52,14,202,12,14,86,4,40,
174,108,14,202,156,2,186,60,12,130,5,40,129,73,13,
189,12,42,138,44,14,202,4,59,143,4,124,229,4,69,
191,4,69,157,4,60,114,4,43,110,14,14,58,20,26,
157,28,26,210,4,87,162,4,91,202,4,110,226,4,98,
226,4,101,202,17,14,186,28,18,18,60,2,234,28,10,
114,4,30,114,8,10,162,12,54,186,20,26,130,100,10,
170,40,18,154,4,22,114,28,26,234,4,22,58,4,66,
226,4,54,202,12,42,202,4,38,98,4,145,234,4,76,
146,4,94,148,4,138,213,4,94,186,4,54,126,4,54,
154,4,118,211,4,106,178,4,106,188,4,54,142,4,94,
170,4,70,202,4,118,197,4,54,173,4,82,178,72,4,
172,36,10,138,76,14,162,4,98,210,4,118,226,112,2,
114,24,19,8,30,2,85,84,6,226,141,2,73,28,30,
10,28,46,186,112,4,206,36,10,90,36,2,174,108,2,
58,41,3,130,44,10,194,9,33,130,92,2,162,51,2,
42,12,32,162,81,3,146,44,11,26,28,6,146,44,2,
178,30,12,10,60,10,178,64,2,146,28,10,178,92,10,
210,5,41,146,40,2,102,96,2,125,100,2,88,74,2,
157,142,2,159,26,10,55,143,2,50,73,2,102,134,2,
142,73,2,84,127,2,126,142,2,82,156,2,178,28,10,
158,28,26,114,84,14,202,12,4,10,5,20,74,17,2,
26,92,2,194,7,19,106};
static unsigned char header_data[] = { 71,99,218,218,99,11,71,218,71,71,
218,99,99,99,71,99,218,99,99,99,99,218,71,218,99,218,218,99,99,218,
218,99,99,218,99,218,99,58,218,99,99,99,58,218,99,99,99,58,99,58,
99,58,11,58,99,58,58,11,99,58,99,58,99,99,99,218,99,218,99,58,
99,71,99,218,71,12,12,12,12,12,12,12,12,12,92,19,19,19,92,92,
92,92,19,108,19,19,19,19,19,19,53,53,53,53,101,19,19,53,53,19,
19,19,12,92,92,12,12,12,71,71,218,99,218,218,71,71,12,12,218,99,
58,58,58,99,99,99,58,99,99,99,11,58,11,58,58,99,58,99,99,99,
58,99,99,99,99,58,99,99,99,99,99,218,99,99,11,99,99,99,11,99,
99,218,218,218,99,218,99,99,218,218,99,99,218,99,218,218,99,99,218,11,
218,71,99,218,99,218,218,99,71,8,218,99,218,218,99,99,99,99,99,99,
218,218,99,99,218,99,218,99,218,71,99,99,99,218,99,99,218,99,99,99,
218,218,99,99,99,99,58,99,58,30,99,99,99,99,99,99,58,99,99,58,
99,58,99,58,99,99,58,58,58,99,58,58,99,218,218,71,99,99,71,71,
71,123,12,118,71,71,12,71,123,12,12,19,19,19,53,19,19,53,53,19,
19,53,101,63,20,63,20,63,53,53,53,101,53,53,53,19,53,53,53,19,
92,12,12,12,71,12,12,12,12,12,92,71,218,218,71,218,71,71,71,71,
99,218,58,58,58,99,99,99,99,58,58,58,99,58,99,58,58,99,58,58,
99,99,58,99,99,99,99,58,99,58,30,99,99,99,218,99,58,99,99,58,
11,99,99,218,99,218,218,99,99,218,71,99,218,99,99,218,99,99,218,99,
11,218,99,218,99,11,218,99,99,8,71,71,71,99,218,71,218,99,71,218,
11,99,218,218,99,218,99,218,99,99,99,99,218,99,99,99,99,99,218,99,
99,99,99,99,99,11,99,99,99,99,99,99,58,99,58,99,58,99,58,58,
99,11,58,58,99,58,99,99,58,58,218,99,123,71,71,71,123,71,71,218,
99,99,218,71,12,12,12,12,92,19,19,53,19,53,53,53,53,19,53,53,
53,53,19,53,19,53,53,53,53,53,63,63,101,63,63,20,53,19,53,53,
53,19,92,92,12,12,12,71,71,71,71,12,12,71,71,12,12,12,12,12,
12,218,218,99,58,58,99,58,99,58,99,58,99,99,58,218,58,99,58,99,
99,99,99,11,58,99,99,58,99,99,58,58,99,99,99,99,99,99,99,99,
99,58,218,99,218,99,99,99,218,99,99,218,99,11,218,99,218,218,99,99,
218,99,218,11,99,71,99,218,71,8,99,99,218,99,99,99,218,99,99,218,
218,99,11,99,99,218,99,218,99,218,218,99,58,99,99,99,58,11,99,99,
58,99,99,58,58,58,58,99,99,99,99,218,58,99,99,99,58,58,99,99,
58,58,99,58,99,58,99,99,58,58,99,218,71,71,218,218,218,58,58,58,
218,99,71,123,12,12,12,19,19,108,108,108,92,92,92,12,71,12,12,92,
19,53,53,53,101,53,53,19,53,101,53,20,53,79,79,0,34,79,20,63,
53,53,53,19,19,19,12,12,12,71,71,71,71,71,71,123,71,12,12,12,
12,12,71,71,218,58,99,58,218,58,218,99,58,99,58,99,99,218,58,58,
58,99,58,58,99,99,58,99,58,99,99,218,58,58,99,99,99,99,99,99,
58,11,99,99,218,218,218,99,218,99,99,218,218,99,218,99,99,218,218,99,
218,99,71,218,99,218,99,99,99,8,218,218,99,218,99,218,99,218,218,99,
11,218,218,218,218,99,71,99,218,99,99,99,218,58,99,99,99,99,218,30,
58,99,58,99,58,11,58,99,58,99,58,58,58,99,58,58,99,99,58,58,
58,99,58,99,58,58,99,58,218,99,99,218,58,99,58,58,58,58,58,218,
71,12,12,71,71,12,12,12,12,71,71,118,71,71,118,71,71,12,223,19,
19,53,53,53,53,63,229,20,79,20,34,0,20,101,101,63,20,101,101,53,
108,53,53,53,53,53,101,19,92,12,12,12,12,71,71,218,218,218,71,71,
118,12,71,71,218,218,58,58,58,58,58,58,218,58,58,58,99,99,218,99,
58,58,99,99,58,99,58,99,58,58,58,99,99,99,58,99,99,99,58,58,
99,58,58,99,99,99,99,99,99,99,218,99,99,218,99,218,218,99,99,218,
99,58,99,99,218,99,218,218,218,8,99,218,99,218,99,218,11,99,218,99,
99,99,99,99,218,99,58,99,99,99,58,99,218,99,99,99,99,99,58,99,
58,218,99,99,99,58,218,58,58,58,99,99,58,99,218,58,99,99,58,218,
58,99,58,99,99,99,58,99,58,58,58,58,99,58,58,58,58,218,218,12,
71,71,71,12,12,71,71,12,71,12,71,71,71,71,12,92,19,53,53,53,
101,63,79,34,251,0,0,63,20,53,19,53,53,53,53,19,19,53,19,19,
19,108,19,19,19,19,19,19,53,53,108,12,12,12,71,71,218,58,58,58,
99,218,71,71,71,12,218,99,99,58,58,58,58,218,58,58,58,58,58,99,
99,58,58,99,58,218,58,99,99,99,99,58,99,128,99,58,99,99,11,99,
99,58,11,58,99,99,99,218,58,11,99,58,99,218,99,99,218,99,99,99,
218,71,99,99,218,99,11,99,218,8,218,99,218,99,218,99,99,218,99,218,
58,218,58,218,99,99,218,99,58,99,99,99,99,78,11,58,99,58,99,99,
99,58,58,99,58,11,58,58,218,99,99,58,58,58,99,58,58,58,99,99,
58,58,58,58,58,58,99,58,99,99,99,58,58,58,58,58,218,71,118,12,
71,71,71,71,71,12,71,71,71,71,71,12,92,19,19,53,53,63,20,251,
0,79,79,0,79,34,34,79,0,63,229,20,63,101,53,101,19,53,19,92,
12,71,12,92,12,12,12,12,12,92,19,92,92,71,12,118,71,218,99,58,
58,58,58,58,218,123,71,218,58,58,58,99,58,58,58,218,58,218,58,58,
218,58,99,58,58,58,99,99,58,99,58,99,218,99,99,99,58,58,58,11,
58,58,99,58,99,99,30,99,99,99,58,218,218,30,99,218,99,99,99,218,
99,99,218,218,99,99,218,71,99,8,99,99,71,99,218,218,99,218,99,218,
99,218,99,58,11,58,99,99,11,58,99,58,99,99,99,99,58,58,99,99,
58,99,99,99,99,58,99,78,58,58,99,99,218,78,58,218,58,99,212,58,
99,58,58,58,218,58,58,58,58,58,58,58,58,58,218,71,12,12,71,71,
123,218,218,58,99,71,123,71,71,12,19,19,19,53,53,19,19,53,63,53,
101,101,101,63,101,101,20,20,79,0,0,79,79,34,251,79,79,251,101,53,
19,92,12,71,71,71,218,12,218,12,71,71,71,71,71,12,71,71,123,71,
58,58,58,58,58,58,58,99,99,58,58,58,99,58,58,58,99,58,99,58,
99,58,58,99,58,58,58,58,99,58,99,58,99,58,99,58,99,99,58,58,
99,99,99,58,99,58,58,58,99,99,99,30,128,58,99,99,99,99,99,58,
218,99,99,218,218,99,99,218,71,8,71,218,99,99,99,99,218,99,99,99,
99,30,58,11,58,58,99,58,58,58,58,30,58,58,99,99,99,58,99,58,
99,58,99,58,58,58,218,99,58,99,58,58,58,218,99,58,58,58,58,58,
58,99,99,99,58,99,99,58,58,212,99,58,58,218,71,71,218,218,99,58,
58,58,58,218,123,71,71,12,108,19,19,108,19,19,223,92,19,92,12,12,
19,19,19,19,53,53,63,63,229,0,34,34,79,0,79,0,75,34,0,34,
79,20,53,19,92,12,71,71,71,218,71,123,71,123,71,71,71,71,71,71,
71,218,58,58,58,58,58,58,58,99,58,58,58,58,58,58,58,58,99,58,
58,99,99,58,99,58,58,58,58,58,58,99,58,99,58,99,58,58,99,99,
58,58,99,99,58,58,218,58,58,99,58,99,11,58,58,99,58,218,99,99,
99,99,218,99,99,218,99,99,99,8,99,218,99,218,99,99,99,99,58,58,
11,58,99,58,58,30,58,11,58,11,58,99,99,58,99,58,58,58,99,58,
58,99,58,99,99,58,58,99,58,99,58,99,58,99,212,58,58,58,58,58,
58,58,58,58,58,58,58,58,58,58,212,58,218,218,218,99,58,58,58,58,
58,99,71,71,71,12,71,71,12,12,12,71,71,123,71,218,71,71,71,92,
19,108,63,79,229,126,0,79,0,0,34,34,34,126,34,251,79,0,126,34,
79,0,79,20,63,19,19,12,71,71,71,218,71,99,71,71,71,71,71,71,
71,71,218,58,58,58,212,58,58,58,58,58,58,58,58,58,58,58,58,58,
58,58,99,58,58,99,58,58,99,99,128,218,58,58,99,58,99,58,58,99,
218,58,58,218,99,99,99,99,99,99,58,99,99,58,30,218,99,99,99,99,
99,99,218,99,99,99,218,218,99,8,218,99,99,99,58,99,99,99,99,99,
58,58,218,99,99,99,58,99,58,58,58,99,58,99,58,99,99,99,58,58,
99,99,58,58,58,58,58,58,99,99,58,99,99,58,58,58,58,99,58,58,
99,58,99,58,78,212,99,212,99,58,58,99,58,58,78,78,246,99,212,58,
99,71,123,71,71,71,71,71,218,218,71,123,218,218,218,118,12,19,63,63,
0,0,0,34,34,0,34,79,79,79,0,34,79,79,20,101,53,101,53,19,
53,53,101,101,53,53,19,19,19,92,218,218,218,218,218,212,78,58,218,218,
71,71,71,11,58,246,58,78,246,58,58,58,99,99,58,58,99,58,212,58,
99,58,99,58,58,99,58,58,58,58,58,212,218,58,58,99,58,58,99,58,
99,99,99,58,58,99,99,99,58,99,58,58,99,99,99,58,58,99,99,99,
99,99,99,11,58,99,99,99,218,8,99,99,218,99,99,218,99,218,58,58,
11,78,58,99,58,99,58,99,58,11,58,99,58,99,58,58,58,99,99,58,
99,99,99,58,58,58,58,58,58,58,58,58,58,58,58,212,99,58,212,99,
58,58,78,58,78,58,58,58,58,58,58,58,58,58,246,58,246,58,58,71,
218,71,71,71,218,71,71,71,71,218,218,71,71,92,92,53,63,126,79,0,
0,79,0,79,34,79,0,126,79,79,79,79,79,229,229,101,53,108,92,71,
71,71,71,71,71,12,12,19,108,19,92,71,71,71,71,218,212,246,78,58,
58,218,218,71,71,58,58,212,212,78,212,78,78,58,58,58,58,58,99,58,
78,58,58,99,58,58,58,58,58,58,58,58,99,58,99,58,58,212,99,58,
58,99,58,99,58,99,99,58,58,99,99,58,58,58,58,11,78,99,99,99,
99,58,99,58,71,99,99,99,99,8,99,99,99,218,99,58,99,30,58,11,
58,11,58,58,99,58,58,99,58,99,58,99,99,58,99,58,99,58,58,99,
58,58,58,58,58,78,58,99,58,99,58,58,58,58,99,58,212,99,58,58,
58,78,78,78,58,58,58,58,58,212,58,78,58,78,78,78,58,99,218,218,
71,218,218,71,58,99,58,99,71,71,71,12,19,20,79,251,0,251,79,251,
79,63,126,79,79,79,79,229,79,79,79,126,126,79,79,63,20,53,53,92,
12,12,218,71,71,218,218,218,71,218,71,71,71,218,71,218,218,58,246,246,
78,212,78,58,218,218,58,58,58,246,78,212,78,212,58,58,58,58,58,212,
78,78,78,58,58,99,58,58,58,58,58,58,58,58,58,218,99,99,58,99,
58,58,218,99,58,58,99,58,99,99,58,99,99,99,58,99,99,58,58,58,
218,99,11,58,99,99,99,218,99,8,99,30,218,58,11,99,99,58,99,58,
99,58,58,99,218,99,218,58,99,99,58,58,58,58,99,58,99,99,58,99,
58,58,58,78,78,58,58,58,58,58,99,246,78,78,58,58,58,58,58,78,
78,212,78,246,246,58,58,58,212,58,212,246,78,246,58,212,218,218,218,218,
218,58,246,58,246,58,218,218,123,12,19,19,53,53,101,53,63,101,63,63,
63,63,63,63,63,101,63,53,63,53,53,53,53,108,19,19,19,19,108,19,
92,92,12,12,71,71,218,99,99,218,218,218,218,218,71,71,71,218,218,246,
78,78,246,78,78,78,58,58,58,78,78,78,78,246,58,58,58,58,58,78,
212,78,78,58,58,58,58,99,58,58,58,58,58,58,99,58,58,58,58,58,
58,99,58,58,99,58,58,58,58,58,58,99,58,58,58,58,58,99,99,99,
58,99,58,99,99,58,99,99,99,8,99,99,30,58,58,58,58,58,58,99,
58,11,99,58,99,58,58,58,58,58,58,99,58,58,58,58,58,58,99,58,
99,58,78,58,58,58,99,58,58,78,246,78,58,78,58,58,58,58,78,212,
246,78,246,78,78,99,212,246,78,246,58,246,246,78,246,218,218,218,58,58,
246,78,78,246,58,218,218,71,12,12,108,92,108,19,108,53,63,63,63,53,
53,53,19,223,92,92,49,118,118,118,118,118,118,118,71,118,118,12,12,12,
92,71,71,123,218,99,11,58,58,58,58,78,58,99,99,123,71,218,218,218,
246,246,78,212,78,212,78,246,78,78,58,78,246,78,246,78,58,58,58,58,
99,78,246,78,246,99,58,58,58,58,58,78,78,78,78,99,58,99,58,99,
78,58,58,99,58,218,218,58,58,99,58,58,58,218,99,58,58,58,58,11,
58,99,99,99,58,99,99,218,58,8,99,99,58,99,58,11,58,11,58,58,
99,58,99,58,99,58,99,58,58,218,58,58,58,99,58,99,58,58,58,99,
78,58,58,58,99,58,58,78,78,58,246,78,246,99,58,58,58,212,78,78,
246,58,246,58,78,78,78,58,246,78,78,58,246,58,58,58,212,58,246,78,
212,246,58,58,71,71,71,71,12,92,92,92,108,53,53,53,19,19,223,223,
49,223,92,49,49,223,92,49,118,118,118,71,118,112,118,11,11,112,71,112,
71,71,11,11,11,99,99,58,58,78,78,78,246,78,246,58,99,71,218,71,
218,78,78,246,78,246,58,246,78,246,212,58,246,58,246,78,212,78,246,58,
58,58,78,246,246,78,78,99,58,58,58,212,78,58,78,58,58,58,58,58,
78,58,78,99,58,58,99,58,58,58,58,99,58,58,99,218,58,99,58,58,
58,58,99,58,99,99,58,99,99,8,99,99,58,58,58,99,58,99,99,58,
99,58,58,58,58,58,58,218,99,58,99,58,58,58,58,58,99,58,58,78,
58,78,78,78,78,58,78,58,78,78,78,212,78,58,78,58,78,212,78,246,
78,246,78,78,212,246,246,78,246,212,246,246,78,246,58,246,78,246,58,246,
246,58,99,218,218,218,71,12,92,19,19,19,19,19,223,223,49,223,49,118,
49,112,30,30,237,103,208,208,245,208,245,208,245,245,245,103,208,103,22,237,
30,30,11,11,11,11,71,71,11,99,58,78,78,246,58,246,246,246,58,99,
99,218,212,78,246,78,246,78,246,58,78,58,246,78,58,246,78,212,78,246,
58,212,58,78,78,212,78,78,58,58,99,78,78,78,78,78,58,58,99,58,
58,78,78,78,58,58,99,58,99,58,58,99,58,218,58,58,99,58,58,218,
99,58,99,99,58,99,30,99,99,8,58,99,58,99,58,58,58,99,58,99,
58,218,218,58,99,58,99,58,58,58,78,99,78,58,99,58,58,78,58,78,
78,58,78,78,58,78,78,246,246,212,78,78,78,58,78,246,78,246,58,246,
212,78,58,78,78,58,246,78,78,78,58,246,78,246,78,58,246,78,78,78,
58,218,99,11,71,12,92,92,92,223,223,223,223,223,49,118,112,22,237,208,
72,245,55,243,245,72,72,72,65,208,236,208,208,245,72,55,243,55,55,243,
245,245,245,103,237,237,30,11,11,112,71,11,99,58,78,246,246,246,246,78,
58,218,58,58,246,78,212,78,246,78,246,78,212,78,78,212,78,246,78,78,
58,78,78,78,78,78,246,246,246,58,58,78,58,246,78,212,78,78,99,58,
58,78,58,58,58,58,58,99,58,58,58,58,78,58,58,99,99,58,58,58,
99,218,58,99,99,99,58,99,58,8,99,99,99,58,11,58,58,58,99,58,
58,58,58,58,58,58,58,99,99,78,78,58,58,78,58,58,99,78,78,78,
78,78,78,78,78,78,212,246,246,246,246,78,78,246,246,58,246,78,246,78,
78,78,212,246,246,246,78,78,212,246,246,246,58,246,246,78,246,246,78,58,
218,99,71,12,12,92,92,82,223,49,223,118,112,22,208,72,72,208,65,22,
22,112,11,112,112,112,112,112,118,118,118,112,112,112,30,244,244,30,237,65,
236,72,55,55,243,243,208,208,237,237,11,71,11,11,71,11,99,58,246,246,
246,78,78,246,58,246,78,246,58,246,58,246,58,246,246,78,78,78,212,78,
212,246,212,78,246,246,58,78,78,246,99,246,246,58,246,58,78,78,78,58,
78,78,78,78,78,78,58,58,58,99,58,58,78,99,58,58,58,218,99,99,
58,58,99,58,99,58,58,99,99,8,58,58,99,58,99,218,99,58,99,99,
99,58,99,58,99,58,58,58,58,78,58,58,58,58,58,58,58,78,212,78,
78,58,246,78,58,246,246,246,246,246,246,246,78,58,246,78,246,58,246,58,
246,78,78,78,58,246,212,78,78,78,58,246,78,212,246,58,78,212,58,99,
218,71,12,92,19,223,49,49,118,62,30,22,208,208,103,30,244,112,244,118,
112,23,49,49,49,49,49,49,49,49,82,82,223,82,49,118,23,118,118,112,
11,30,237,22,65,245,55,243,245,245,103,237,237,11,71,11,71,71,218,58,
246,246,78,246,78,212,78,246,246,78,246,246,78,78,212,78,212,78,246,78,
78,58,246,78,58,246,78,212,78,246,78,78,78,78,78,212,246,246,246,78,
58,78,78,78,58,78,78,58,58,58,58,58,99,58,58,58,58,58,99,58,
58,58,58,58,58,99,99,58,58,8,99,99,58,58,58,99,99,99,99,58,
58,99,78,58,78,99,58,58,99,78,78,78,58,78,58,58,78,246,78,212,
78,78,58,78,246,246,246,246,246,246,58,78,78,246,58,246,78,246,78,246,
78,212,78,212,212,246,78,78,246,246,78,212,58,99,212,246,246,58,99,218,
118,12,92,223,223,49,49,11,237,208,208,103,244,23,118,112,118,112,49,49,
19,82,82,82,223,49,66,49,49,82,223,223,101,19,223,82,223,82,223,82,
82,49,23,112,11,244,30,65,72,55,55,245,208,22,237,112,11,118,71,218,
218,58,58,78,246,78,212,78,78,212,99,78,212,246,78,246,78,246,78,212,
246,246,78,246,246,78,246,78,246,58,246,78,58,78,246,246,246,246,212,246,
78,78,78,78,78,58,78,78,99,58,78,78,78,99,58,58,99,58,99,99,
58,99,99,99,99,58,99,58,99,8,99,99,99,58,58,99,58,58,99,58,
58,58,78,78,58,58,58,58,58,58,78,78,78,78,78,58,246,246,246,246,
246,78,78,212,246,246,246,246,246,246,78,212,78,246,78,212,78,246,58,246,
78,246,78,58,58,212,246,58,78,246,246,58,58,58,58,246,58,218,71,12,
223,223,49,49,49,30,65,72,72,30,112,118,118,112,118,49,223,223,223,49,
244,244,244,244,23,23,23,23,70,66,49,70,49,70,70,118,23,23,23,23,
49,223,19,82,223,223,23,11,244,237,208,72,55,55,208,103,30,11,11,49,
71,71,99,58,246,78,246,246,58,246,58,58,246,212,78,246,58,246,78,58,
58,212,78,78,212,78,212,78,78,78,212,78,78,78,246,212,246,246,246,212,
246,58,78,78,78,78,58,78,78,99,58,58,78,58,58,58,99,58,58,58,
58,58,58,58,99,58,99,58,99,8,99,58,58,218,58,58,58,99,58,58,
58,99,58,58,99,58,78,78,78,78,78,78,78,58,246,246,246,212,246,246,
212,246,78,246,246,246,246,246,212,246,246,78,246,58,212,246,78,78,78,246,
58,246,212,99,58,246,78,246,246,58,58,58,58,78,246,58,99,118,12,92,
223,223,223,11,22,72,208,244,49,112,112,118,49,82,223,49,244,244,242,62,
23,62,23,23,244,244,244,244,244,244,62,30,244,244,244,244,23,112,210,23,
62,244,244,23,223,82,53,82,49,112,30,30,65,72,55,245,208,237,30,112,
71,49,118,71,99,78,78,78,246,246,58,99,58,246,212,78,246,58,246,212,
99,58,212,246,78,246,78,246,212,246,78,246,246,212,246,246,246,212,246,246,
246,246,78,78,246,246,78,78,78,78,58,58,78,58,58,58,58,58,99,99,
99,78,99,58,99,99,58,99,58,8,58,99,58,99,99,58,58,99,58,58,
58,58,58,58,78,58,78,78,58,78,58,246,78,78,78,212,246,246,212,246,
246,246,246,246,246,246,246,246,246,246,246,58,246,58,99,212,246,212,78,78,
78,99,58,58,78,246,58,78,246,58,58,58,58,212,58,218,71,12,49,49,
49,112,22,72,65,112,49,112,112,112,223,19,118,62,244,62,62,23,23,244,
244,244,244,112,23,49,49,223,19,223,82,223,223,49,223,23,118,112,244,30,
62,62,62,62,23,62,23,223,82,8,82,71,30,244,22,72,55,245,103,237,
11,71,12,12,71,99,78,78,78,58,212,58,58,58,58,212,78,58,246,78,
58,58,58,212,78,246,58,78,78,212,212,246,246,246,212,246,246,246,246,246,
246,246,58,78,78,58,246,212,78,78,58,78,58,78,78,78,58,78,58,58,
218,58,58,99,58,99,99,99,58,8,218,99,58,58,58,99,58,58,99,78,
78,58,99,58,58,78,58,78,246,78,78,58,78,212,246,246,246,246,246,246,
246,246,246,212,246,212,246,246,246,212,78,246,58,58,58,246,78,78,212,246,
58,58,58,58,212,78,246,212,58,58,58,58,58,58,71,12,49,223,223,49,
30,208,72,30,49,49,112,49,223,223,23,22,244,62,23,23,62,22,112,118,
49,49,223,118,23,244,30,242,22,242,242,62,242,244,244,112,23,49,49,223,
23,112,30,244,62,112,210,23,23,49,82,8,223,244,237,30,208,55,243,245,
22,30,71,118,12,71,99,78,78,246,212,58,58,58,58,246,246,246,78,246,
58,58,58,78,212,78,246,246,246,58,58,212,246,246,246,246,246,246,246,246,
246,78,246,58,246,246,246,78,212,78,78,78,58,78,58,78,58,58,99,58,
58,58,99,58,58,58,58,58,58,8,58,99,58,58,58,58,99,58,78,78,
58,58,78,58,58,78,78,58,78,78,78,78,78,246,212,246,246,246,246,246,
246,246,246,246,246,246,212,246,246,246,78,58,58,58,58,246,78,78,246,99,
212,58,212,58,212,78,78,58,58,218,58,212,58,99,71,49,223,49,49,30,
55,72,112,49,244,11,49,82,112,242,242,62,23,62,244,112,118,223,82,118,
30,236,29,225,231,33,248,42,42,42,219,2,42,219,110,107,231,29,65,244,
112,223,223,49,112,30,30,23,23,23,23,49,82,101,49,30,30,242,72,243,
208,103,30,71,118,12,71,99,78,78,78,58,58,58,58,58,78,58,246,78,
58,58,99,58,246,58,246,58,246,58,99,58,212,246,246,212,246,246,246,246,
246,246,246,246,212,246,246,246,246,78,58,78,78,78,78,78,58,78,78,78,
58,78,99,99,99,58,58,99,99,8,99,58,99,99,58,58,58,58,78,78,
78,78,58,58,58,78,78,78,78,78,246,246,58,246,246,246,246,246,246,246,
246,246,212,246,99,58,246,246,246,246,212,58,58,58,99,212,78,212,212,58,
78,58,58,58,246,246,78,58,71,218,58,58,11,71,118,223,49,23,103,243,
22,49,118,30,118,82,49,30,242,62,70,62,244,118,223,82,112,65,93,205,
217,42,80,147,98,4,26,8,8,8,8,121,8,8,26,4,98,210,111,219,
29,29,65,112,223,82,23,30,244,62,62,62,62,49,82,82,112,30,30,65,
243,245,103,30,71,118,12,71,218,212,246,58,58,212,212,58,58,246,212,78,
58,58,212,58,58,246,78,246,58,58,58,58,246,212,246,246,246,246,246,246,
246,212,246,246,246,246,212,246,246,212,78,246,212,78,58,78,78,78,58,78,
78,78,58,58,58,58,99,58,58,8,58,58,58,58,58,58,58,58,237,78,
58,78,78,58,78,78,212,78,246,78,78,246,246,246,246,246,246,246,246,246,
246,246,246,58,58,58,246,246,246,246,58,58,99,58,58,246,246,78,99,78,
246,78,58,58,58,58,58,218,12,99,58,99,71,92,49,223,118,22,41,65,
223,23,30,118,19,23,22,242,23,23,30,112,223,19,112,29,222,232,87,80,
98,26,121,8,20,253,20,20,20,20,101,20,20,20,253,253,20,8,121,26,
4,14,2,231,29,30,49,82,112,30,244,62,23,210,118,82,101,223,30,244,
65,55,243,103,237,71,118,71,71,99,58,58,58,58,218,58,58,58,246,212,
58,58,212,78,99,58,246,246,78,58,58,58,58,246,246,246,246,246,246,246,
246,246,246,212,246,246,246,246,246,246,246,78,78,78,78,78,58,78,58,78,
78,58,58,58,78,99,58,58,99,8,99,58,58,99,99,58,58,58,58,237,
78,78,58,78,78,246,78,246,78,246,78,246,246,246,246,246,246,246,246,246,
246,246,58,58,58,58,246,246,246,58,99,78,246,212,99,246,212,58,78,246,
58,246,58,58,58,212,218,12,118,58,58,71,12,49,19,49,237,41,65,49,
118,112,223,82,244,236,62,66,62,30,82,8,112,93,68,6,137,88,162,253,
253,20,253,19,223,23,244,244,54,242,54,242,244,62,112,49,223,20,20,20,
20,253,26,98,14,33,29,244,82,101,112,22,62,62,62,23,49,53,82,30,
112,22,243,243,208,11,71,118,12,218,99,58,58,58,12,71,58,58,58,58,
99,58,58,246,246,58,58,246,246,58,58,58,99,58,246,246,246,246,78,58,
246,212,246,246,246,246,246,212,246,246,78,78,78,78,58,78,78,78,78,58,
78,58,78,237,78,58,99,99,78,8,58,99,58,58,78,78,78,78,78,78,
58,78,78,58,78,246,78,212,246,246,246,246,246,246,246,246,246,103,246,246,
246,246,58,58,58,99,212,246,246,58,212,78,246,58,58,58,58,58,212,78,
78,78,58,58,58,58,123,49,218,99,11,118,223,223,82,237,41,208,23,118,
237,223,82,244,18,210,23,23,112,19,223,103,64,6,148,147,26,253,20,8,
66,23,54,111,219,219,137,24,76,24,163,25,137,42,204,42,151,109,244,223,
20,20,20,20,8,4,111,231,236,23,82,12,237,62,62,23,62,223,253,223,
237,244,22,41,245,103,11,112,118,71,218,58,58,99,92,92,128,58,58,58,
58,58,58,212,78,58,58,212,58,58,58,78,78,58,212,246,246,246,58,58,
212,246,212,246,246,246,246,246,246,212,246,78,246,246,78,78,78,78,78,58,
78,58,58,78,99,58,58,58,99,8,99,58,58,58,58,78,78,58,78,78,
78,78,78,78,78,58,246,246,246,246,246,246,246,246,103,246,246,246,246,246,
246,78,58,58,58,58,58,212,58,58,78,212,78,78,99,58,58,212,78,246,
212,212,58,58,58,218,92,12,218,99,71,12,223,82,118,243,55,23,223,30,
223,19,244,93,54,49,23,112,82,82,245,153,138,234,162,8,253,101,49,30,
111,125,24,201,142,16,159,142,43,95,197,156,193,193,51,141,224,25,248,231,
65,118,20,20,20,20,121,210,231,55,244,82,49,30,244,62,62,244,223,20,
118,237,112,208,243,245,237,71,118,49,71,58,58,218,92,92,12,58,58,99,
58,58,212,78,212,212,58,58,58,58,58,212,78,58,58,246,246,246,99,58,
99,246,246,246,246,246,246,246,246,246,212,246,58,78,78,78,78,78,58,78,
78,58,78,78,58,78,58,99,58,8,99,99,58,58,58,78,78,58,78,58,
78,78,78,246,78,78,78,246,246,246,246,246,246,246,246,103,246,246,246,246,
246,58,58,58,58,58,58,58,58,58,78,78,246,78,58,58,58,212,78,58,
58,78,58,58,58,12,92,12,99,218,118,19,82,223,22,116,237,49,112,112,
101,112,93,109,70,112,118,82,223,55,136,185,44,26,253,253,82,62,107,163,
117,16,114,159,161,106,98,46,26,26,26,26,26,4,32,81,44,142,43,234,
10,56,236,23,20,20,20,8,4,219,225,237,19,82,11,244,62,54,62,223,
20,112,30,244,72,239,103,237,71,12,12,71,58,71,92,92,12,128,58,58,
58,58,246,78,246,58,58,58,99,58,58,246,78,78,58,246,246,58,58,58,
58,212,246,212,246,246,246,246,246,246,78,78,246,58,246,58,78,246,78,58,
78,58,78,78,58,58,58,58,58,8,58,58,58,58,78,237,58,78,78,78,
78,78,78,58,246,246,212,246,246,246,246,246,246,246,246,246,246,246,246,246,
78,58,58,58,58,58,99,58,58,246,246,246,58,246,58,58,58,78,246,218,
11,58,58,58,58,12,92,71,218,11,49,223,101,23,239,93,23,118,244,223,
223,65,29,70,70,112,82,82,72,233,135,152,121,253,20,49,242,179,176,39,
198,156,32,47,26,26,69,113,26,47,9,47,162,113,26,121,113,252,152,159,
43,234,217,238,30,253,20,251,8,4,107,17,30,82,223,22,62,62,54,244,
82,19,237,112,244,41,245,30,112,71,92,71,99,71,12,92,92,71,78,58,
58,246,246,58,78,212,58,58,58,58,58,78,246,58,99,58,212,58,58,58,
58,78,246,246,246,246,246,246,246,246,246,246,78,78,78,78,246,58,78,78,
58,58,58,99,58,99,58,58,58,8,58,99,99,58,58,78,78,58,78,58,
78,58,78,78,78,78,78,246,246,246,246,246,246,246,246,246,78,246,246,246,
58,58,78,58,78,58,58,99,58,78,58,246,246,58,58,58,212,58,58,12,
71,58,58,58,99,92,92,71,218,71,223,8,19,22,150,30,49,11,23,101,
30,93,54,49,112,49,20,30,254,181,95,26,253,253,49,65,163,166,206,202,
52,26,8,121,4,161,43,114,139,131,57,200,195,188,192,88,26,26,121,98,
197,67,234,145,230,22,82,20,20,8,98,107,100,112,253,112,103,244,54,62,
49,20,49,237,118,208,243,103,11,11,12,92,92,92,92,12,49,12,58,58,
78,58,246,78,246,78,212,99,58,58,78,246,58,78,58,58,58,99,58,58,
58,99,246,246,246,246,246,246,246,246,246,246,246,78,246,78,246,78,58,78,
78,58,78,78,78,58,58,99,58,8,99,58,58,58,99,78,58,78,78,78,
78,78,78,78,78,246,246,246,246,246,246,246,246,246,246,246,58,212,58,246,
99,212,58,99,78,99,58,58,78,246,58,58,58,78,78,58,78,78,99,71,
12,71,58,58,12,12,12,71,11,12,223,101,49,243,100,118,223,112,82,19,
93,225,113,23,244,101,223,41,129,199,52,253,20,223,242,124,39,57,117,122,
121,121,47,44,195,35,94,196,165,189,189,189,27,84,200,139,67,186,26,121,
240,106,159,234,175,68,242,20,20,20,8,210,238,93,223,19,237,244,23,54,
62,19,101,244,112,30,243,208,237,11,12,92,49,223,12,12,92,12,58,78,
246,78,58,246,78,212,78,78,58,58,212,58,58,58,78,99,58,58,99,58,
58,58,246,246,246,246,246,246,246,246,246,246,78,246,58,78,58,78,78,78,
78,78,237,78,58,58,58,58,58,8,99,58,99,58,78,78,78,58,78,78,
78,78,78,78,78,58,246,246,246,246,103,246,246,246,246,218,58,58,78,78,
58,99,71,12,58,78,58,78,58,78,123,12,78,78,58,212,78,78,123,92,
12,12,99,99,12,92,92,71,11,118,82,101,112,116,236,82,112,112,82,118,
100,110,66,23,49,101,244,215,73,43,69,253,101,23,219,59,97,202,52,8,
8,4,120,97,187,139,27,143,46,113,26,26,46,88,60,27,131,200,192,47,
82,66,81,159,234,170,68,118,20,251,20,26,2,64,244,101,118,22,23,62,
62,49,20,118,244,23,208,245,30,11,71,12,92,12,12,49,12,12,71,58,
246,246,78,246,78,246,58,78,58,78,212,218,12,246,78,99,58,78,78,11,
12,58,58,246,246,103,246,246,58,246,246,246,246,78,246,78,78,78,58,78,
78,58,58,58,78,58,58,99,58,8,99,58,58,58,99,78,58,78,78,78,
78,212,78,246,246,78,99,58,246,246,246,246,246,246,71,12,99,58,58,99,
58,58,53,251,71,78,78,78,78,246,19,19,71,246,246,78,212,246,12,92,
12,12,12,12,92,12,12,71,218,118,19,101,244,239,65,223,244,11,53,112,
222,235,66,112,223,20,72,45,90,221,8,253,19,242,214,97,57,152,26,8,
26,188,57,187,139,186,8,8,8,8,121,121,8,8,26,4,44,131,94,67,
162,82,113,44,159,76,220,29,82,0,20,8,98,238,245,82,82,237,23,62,
54,112,20,223,237,49,22,245,237,11,71,49,12,92,12,12,12,12,71,78,
246,58,246,58,246,78,246,58,246,212,58,19,101,218,78,78,99,58,58,53,
101,71,58,246,246,246,78,71,92,58,246,246,212,246,78,58,58,78,78,58,
78,78,78,78,58,58,58,58,58,8,99,99,58,99,58,78,78,58,99,58,
78,78,58,246,78,58,71,92,218,246,246,246,103,246,12,92,92,58,58,58,
58,218,63,53,19,246,246,78,78,212,53,92,92,212,246,78,78,58,92,218,
12,12,92,92,92,12,12,71,11,118,101,101,22,116,242,223,237,11,8,30,
17,62,70,112,8,53,72,172,134,143,8,20,223,109,102,57,97,81,121,82,
252,114,35,157,165,26,253,8,8,46,182,4,26,26,8,8,113,160,190,35,
186,66,121,106,117,152,232,68,49,79,20,8,26,42,17,223,53,22,112,244,
54,244,8,82,30,118,30,245,30,11,99,12,12,92,123,12,12,12,71,78,
246,78,246,78,58,246,246,58,246,58,12,53,53,12,78,78,78,99,12,63,
63,92,78,78,246,246,78,229,229,12,246,246,246,212,78,71,71,58,78,78,
58,78,78,58,58,58,212,58,58,8,99,58,58,58,58,78,78,58,99,218,
99,58,246,78,78,58,12,92,12,78,246,246,246,218,92,92,19,71,58,58,
58,12,38,92,53,71,246,58,246,218,108,92,92,218,246,212,78,58,12,218,
12,12,12,92,12,92,12,71,71,118,82,8,103,116,242,82,244,11,82,30,
222,210,223,23,8,101,55,172,183,186,8,253,223,110,102,157,97,161,8,8,
127,67,190,140,189,26,8,8,69,127,120,5,52,26,26,8,121,9,84,187,
43,113,82,98,142,152,89,119,244,20,0,253,121,219,64,23,101,30,30,23,
54,244,82,101,30,112,112,72,237,71,30,12,12,92,118,12,12,12,71,58,
246,246,58,246,58,212,78,246,58,246,108,63,53,19,78,78,78,58,53,101,
53,108,78,246,246,246,108,79,20,53,246,246,246,78,99,92,92,12,99,78,
78,58,58,218,218,218,99,58,58,8,99,99,58,58,58,99,99,218,71,11,
99,99,78,246,212,71,218,71,92,71,246,246,246,71,92,92,19,19,58,58,
58,92,53,92,92,108,58,246,246,71,92,92,92,92,212,246,246,58,123,48,
12,12,12,92,92,12,12,12,99,118,19,101,237,116,65,49,30,112,82,244,
222,235,26,118,82,101,65,136,183,7,8,8,82,242,21,157,57,192,69,8,
26,7,191,157,190,60,9,8,26,52,84,131,60,4,121,8,26,113,67,94,
142,113,82,98,43,152,10,119,244,251,0,253,121,111,64,23,101,244,22,49,
62,62,82,101,112,23,112,103,30,71,11,12,12,118,12,12,118,12,71,78,
78,246,78,58,218,58,78,246,246,12,53,101,53,19,58,78,58,12,63,63,
53,63,218,246,246,71,79,20,63,101,218,246,246,218,12,19,108,12,99,58,
99,71,218,71,71,218,71,218,71,8,99,58,99,99,58,58,11,218,71,218,
71,71,218,58,58,99,218,99,71,92,218,78,246,92,92,12,223,53,71,58,
58,19,19,92,92,19,12,78,78,12,92,92,92,92,71,78,78,218,123,241,
48,12,12,92,49,12,118,12,71,49,223,101,11,116,65,66,112,11,82,112,
100,54,66,66,223,20,244,105,90,159,8,8,8,244,10,167,187,202,98,8,
121,47,192,169,190,35,195,188,188,195,57,84,106,47,8,8,8,122,195,140,
95,66,82,98,142,221,175,119,244,251,251,20,8,219,64,112,101,30,242,118,
23,62,19,20,11,118,112,22,11,11,99,12,12,12,12,71,12,118,71,58,
246,58,246,99,12,99,212,78,58,19,53,53,101,53,58,78,218,53,101,53,
53,63,218,246,246,63,0,101,19,53,12,78,58,12,108,92,19,108,92,71,
71,12,71,71,123,71,71,123,71,8,99,99,58,58,58,11,58,11,99,218,
99,11,99,99,218,99,218,99,71,12,12,99,99,92,92,92,12,19,53,71,
99,38,53,12,12,92,19,218,212,92,92,92,48,12,108,128,246,218,123,48,
128,123,12,12,12,12,12,118,71,71,223,8,112,41,55,49,49,244,223,49,
93,231,70,82,223,20,82,116,181,158,252,8,20,223,242,214,57,157,156,46,
8,66,26,147,44,198,86,196,86,198,44,52,4,8,8,8,46,60,97,194,
52,82,82,180,159,177,232,64,66,79,20,8,26,231,100,49,8,237,62,23,
62,244,82,82,30,223,11,237,112,11,11,12,12,71,12,12,118,12,71,218,
246,78,58,218,92,99,246,212,92,53,79,79,53,53,218,58,19,63,38,126,
53,101,92,58,19,251,63,223,19,19,92,71,12,223,92,223,223,92,19,92,
12,71,123,71,71,71,71,71,71,8,11,58,11,58,99,58,99,58,99,58,
58,218,218,218,99,218,11,99,99,71,92,92,12,49,92,71,99,12,53,53,
92,20,53,123,48,12,92,19,218,19,92,12,241,48,92,92,58,218,92,241,
128,212,71,12,118,12,12,71,71,112,223,19,82,55,116,112,49,244,223,19,
208,238,235,66,223,253,82,22,250,73,95,113,8,82,49,111,102,207,132,188,
252,69,8,121,162,4,47,52,127,4,4,26,26,8,8,46,186,86,169,95,
66,8,4,95,192,87,45,236,101,251,253,8,70,222,236,223,223,237,244,23,
54,244,82,82,237,118,11,244,71,11,99,71,118,12,12,12,12,12,12,58,
78,78,246,123,108,12,212,12,53,63,13,83,63,53,12,92,53,226,13,13,
53,53,53,226,75,63,12,71,92,19,19,92,92,92,19,12,12,12,92,12,
71,71,71,71,71,12,71,71,71,8,99,99,58,99,99,58,58,99,58,58,
11,218,71,71,11,218,99,99,58,218,12,19,92,92,92,99,78,58,92,101,
75,251,53,12,123,48,92,108,101,63,92,12,241,241,92,92,108,92,108,128,
212,246,58,12,12,12,49,12,12,118,12,49,19,237,116,22,49,118,244,82,
112,17,231,70,223,82,20,82,93,45,133,7,46,8,8,49,50,224,168,207,
142,60,127,46,8,26,8,8,8,8,8,8,121,26,47,192,166,169,7,113,
66,113,7,156,36,217,28,23,251,251,20,26,111,222,30,8,49,22,112,62,
242,112,101,112,30,49,244,11,112,11,99,71,12,12,118,12,12,12,71,246,
246,78,212,92,108,92,218,53,38,13,0,0,63,101,20,63,101,75,83,83,
63,101,229,79,126,92,58,78,12,19,92,92,19,92,12,71,71,118,71,71,
218,12,71,71,71,71,71,218,99,8,218,99,218,58,58,218,99,99,58,99,
58,58,99,99,218,99,218,99,58,58,99,92,92,92,19,58,78,78,99,108,
0,34,38,123,123,48,123,92,53,108,92,12,241,241,241,123,92,19,19,123,
241,212,246,99,12,71,12,71,12,71,118,223,82,118,245,100,112,49,30,118,
223,237,238,111,113,223,19,20,49,93,144,184,44,113,8,253,19,210,173,141,
168,57,196,142,60,52,122,182,113,113,122,3,60,159,130,86,43,122,26,223,
47,106,95,76,89,68,244,20,251,20,8,210,238,72,223,19,30,112,23,62,
244,223,20,118,112,112,244,118,11,99,99,218,71,218,71,12,12,71,58,58,
78,246,246,92,63,53,53,101,83,0,83,83,53,63,63,53,20,83,0,0,
53,53,79,0,226,78,58,78,12,108,92,19,92,71,58,58,99,71,71,123,
71,218,218,71,218,218,99,218,99,8,99,99,218,218,99,99,99,99,58,99,
99,58,99,11,71,99,99,58,58,58,58,71,92,92,19,78,78,58,78,218,
53,63,101,123,123,48,48,123,92,19,92,92,241,241,241,241,92,92,92,12,
241,212,78,78,123,118,12,12,12,12,112,92,49,223,30,247,65,49,23,112,
82,23,72,231,14,26,82,19,101,49,17,146,102,154,147,69,8,82,49,23,
249,104,158,39,206,169,86,130,202,142,202,114,39,117,76,88,4,66,66,113,
7,95,234,175,68,22,101,20,251,8,4,107,100,112,101,112,30,23,112,62,
49,101,49,244,118,112,112,118,11,78,99,99,99,58,71,12,92,99,246,78,
246,58,218,108,108,53,63,229,0,83,34,13,53,53,101,38,13,0,0,13,
53,101,63,101,99,78,58,78,71,19,19,92,71,58,99,58,11,218,218,71,
99,99,99,99,218,58,99,218,218,8,71,218,99,99,218,58,99,99,99,99,
99,58,99,58,99,218,11,58,58,99,58,58,71,92,92,58,78,78,78,78,
118,19,53,123,48,128,128,48,123,12,92,92,48,128,212,48,241,12,12,92,
241,128,246,246,246,71,12,12,12,71,71,118,49,223,49,208,116,22,49,23,
11,223,223,72,225,235,113,82,82,101,49,65,68,164,201,7,162,26,8,121,
66,223,23,216,14,36,177,152,154,152,80,255,98,66,66,223,66,4,32,152,
152,163,228,222,112,251,20,20,8,113,219,222,22,82,23,22,62,112,54,244,
101,82,112,112,23,118,112,11,11,78,58,58,246,99,71,71,99,58,246,212,
58,58,123,108,108,53,20,13,101,19,34,13,53,53,53,0,75,38,0,34,
63,53,53,71,58,78,58,78,11,92,92,71,58,58,58,58,99,218,11,99,
11,58,218,218,99,99,218,99,99,8,99,71,99,99,99,99,99,218,58,99,
218,58,99,99,99,58,58,78,58,99,58,58,58,71,12,78,78,78,78,78,
58,12,19,12,48,218,246,218,48,12,92,92,241,48,58,212,48,241,12,92,
48,241,212,58,212,212,123,118,12,71,118,118,12,223,49,118,55,239,244,223,
112,112,82,118,236,225,14,4,26,82,101,19,112,93,153,21,224,174,88,162,
26,26,121,82,66,66,66,66,66,66,26,82,66,26,113,127,32,44,51,87,
248,222,236,223,20,20,20,8,70,111,17,237,223,49,237,30,62,54,30,118,
253,49,112,118,23,118,118,11,99,58,58,58,212,99,71,218,246,78,78,58,
58,58,108,108,63,38,13,92,58,12,13,251,53,63,251,79,12,71,34,34,
251,53,19,58,78,78,78,58,58,71,71,58,99,99,58,99,58,11,58,99,
99,99,99,218,218,99,218,218,99,8,71,99,218,218,218,99,218,99,99,99,
99,71,58,99,99,99,99,58,58,99,58,58,78,58,99,78,58,78,58,78,
78,78,99,218,128,58,58,78,128,48,12,92,123,241,78,246,58,48,241,218,
12,128,212,212,58,58,212,218,71,12,71,12,118,12,223,49,11,243,55,244,
49,112,244,223,49,236,17,111,4,121,82,82,8,223,244,29,153,61,148,234,
152,32,147,52,4,4,113,26,113,26,98,98,147,255,7,193,24,163,217,238,
110,112,101,20,20,253,8,70,107,222,22,223,223,244,244,244,244,242,112,82,
223,118,23,23,49,118,71,11,58,58,58,246,246,58,99,78,58,212,212,78,
58,99,53,53,38,83,19,58,246,19,34,79,251,34,34,71,58,71,79,13,
83,63,218,58,58,99,58,78,58,99,78,58,99,99,99,58,58,99,99,58,
218,11,218,99,11,218,11,99,71,8,71,218,218,11,71,99,218,99,99,99,
99,218,11,99,58,58,58,58,11,58,99,218,58,58,78,78,78,78,58,58,
78,78,78,78,58,78,78,78,58,58,48,123,48,48,128,78,246,78,128,241,
241,241,128,212,58,58,58,58,218,12,118,71,71,112,118,223,49,11,245,55,
30,49,112,244,223,19,30,93,107,111,4,26,101,101,8,101,112,242,93,203,
6,170,21,74,51,51,104,24,234,76,24,104,76,124,232,56,225,18,30,223,
20,20,20,20,8,66,235,231,236,112,223,118,30,112,112,54,244,112,82,49,
112,23,118,118,12,11,99,99,246,58,58,58,78,58,246,246,78,78,212,78,
58,12,53,229,34,40,78,78,58,38,0,13,13,79,71,58,58,71,13,0,
38,71,58,99,58,99,58,99,78,58,58,99,99,99,71,99,58,99,218,99,
71,99,218,99,99,71,218,99,71,8,71,71,71,123,218,218,11,218,218,218,
218,99,218,218,99,99,99,99,58,99,99,99,99,99,58,78,78,58,58,99,
99,78,78,246,78,212,78,78,58,78,128,48,48,241,48,246,78,58,246,128,
128,128,128,128,212,78,212,78,58,218,71,71,12,12,118,118,49,49,112,208,
41,22,49,112,244,23,19,49,22,93,219,14,4,8,82,101,20,101,223,49,
30,65,18,29,17,203,228,230,56,96,91,225,225,236,242,112,49,82,20,20,
20,20,82,113,210,107,29,22,118,223,112,30,244,244,62,112,23,82,223,49,
118,118,49,49,118,71,99,246,58,58,212,246,246,78,212,58,246,246,78,58,
218,53,209,126,40,78,78,78,218,0,34,34,79,71,78,99,58,71,251,229,
12,58,99,99,99,58,58,58,58,99,99,99,99,218,99,58,99,99,99,218,
99,218,11,218,218,11,218,71,71,8,71,123,71,71,218,123,71,99,11,99,
218,11,99,71,218,99,58,99,99,58,218,218,99,99,58,58,58,58,99,58,
58,99,58,246,246,246,78,58,58,58,78,58,48,48,241,78,246,78,78,58,
58,241,241,241,212,58,246,78,246,58,218,71,71,71,118,118,118,49,49,112,
103,243,236,112,49,244,112,49,223,118,65,93,107,14,98,113,82,8,101,253,
101,20,101,82,82,223,118,118,49,49,49,82,82,101,101,20,20,253,253,121,
26,70,235,110,29,103,118,223,223,11,244,244,54,242,244,49,19,223,49,118,
118,49,12,71,11,99,212,246,78,78,78,78,212,246,78,58,78,212,78,58,
12,38,213,71,78,58,58,78,40,83,79,20,99,58,99,58,99,12,92,71,
78,58,99,99,99,99,99,99,99,99,218,218,99,218,218,99,218,218,11,218,
11,218,218,71,218,218,71,123,71,8,71,71,12,71,71,218,218,218,71,71,
218,218,218,218,71,218,218,99,99,218,99,99,99,99,99,99,58,99,58,99,
99,99,99,58,78,78,78,78,58,99,58,58,58,128,48,128,78,78,58,78,
212,212,212,241,128,58,246,246,58,246,58,218,218,118,71,71,118,12,118,49,
23,237,245,55,208,23,118,23,112,223,223,118,244,236,18,110,14,210,4,66,
121,8,82,20,82,101,101,251,20,20,20,101,8,20,8,8,26,26,210,235,
109,110,65,30,118,223,49,244,244,244,244,242,65,30,223,82,49,118,118,49,
92,49,118,71,11,78,246,78,58,246,212,246,78,78,246,78,246,78,212,218,
53,92,99,78,58,58,58,246,53,0,53,99,99,58,99,58,99,71,218,58,
99,58,99,218,58,99,58,78,99,99,11,99,71,99,99,218,99,99,218,71,
123,218,71,218,12,71,71,71,71,8,71,71,71,71,71,118,71,71,218,99,
71,71,71,123,71,71,218,99,99,218,218,71,11,218,99,99,58,99,58,99,
99,99,218,58,58,78,78,78,58,99,99,58,58,58,58,128,246,78,58,58,
58,58,246,128,128,58,212,246,78,78,78,58,58,218,71,71,11,118,118,49,
12,23,11,103,243,72,237,23,23,112,23,223,19,223,112,22,109,18,29,111,
111,210,210,70,4,26,26,26,26,26,26,4,4,70,98,235,2,18,29,65,
54,23,223,49,23,244,244,112,244,54,22,244,118,82,223,223,118,92,49,49,
223,71,11,99,99,78,246,58,246,78,58,212,78,78,58,58,246,78,58,218,
71,78,58,58,99,58,58,99,19,77,58,58,58,218,99,58,58,58,58,58,
218,99,11,218,58,99,218,58,218,218,71,218,218,71,99,71,218,71,71,218,
71,123,71,71,71,71,71,71,12,8,118,118,71,71,118,71,71,71,118,12,
71,123,71,71,71,71,71,71,218,99,99,99,218,218,71,218,99,99,58,99,
99,218,99,218,58,58,246,78,78,99,99,99,99,58,246,78,58,246,58,58,
58,58,58,78,78,58,58,58,246,212,99,58,58,58,218,99,71,118,11,118,
49,49,49,23,11,208,55,245,22,112,23,23,23,23,49,49,49,223,112,30,
22,236,18,18,18,29,18,18,18,18,107,236,29,236,236,22,30,23,223,223,
223,118,118,112,244,112,244,242,242,30,23,223,82,223,49,49,49,223,49,12,
71,71,99,58,246,212,58,58,58,78,78,78,58,58,58,58,78,212,246,78,
78,58,58,11,99,58,78,78,99,58,58,99,218,99,58,99,58,58,58,218,
99,71,218,99,218,58,99,218,218,71,218,123,71,99,71,218,71,71,71,12,
71,71,12,12,12,12,12,12,12,8,12,12,12,12,12,12,118,118,71,71,
71,218,71,123,71,71,71,71,123,71,218,11,218,71,218,123,218,99,218,58,
99,99,11,218,71,99,99,58,78,58,99,99,71,99,58,78,246,246,246,58,
58,218,58,99,78,78,246,78,78,246,58,58,58,212,58,58,99,71,71,118,
71,118,118,23,49,112,112,103,72,72,65,244,112,23,118,118,70,223,223,223,
223,49,118,23,118,112,112,244,112,112,23,23,23,49,49,223,223,49,23,118,
244,244,112,62,244,109,22,30,49,223,223,82,49,223,49,223,223,118,118,71,
99,99,99,78,78,246,58,58,78,78,58,58,58,99,78,246,78,78,78,78,
99,99,99,58,99,58,78,78,58,99,99,11,218,99,99,58,58,11,99,218,
218,218,71,99,218,218,11,218,123,71,218,71,71,218,71,71,123,71,118,12,
71,12,12,12,12,12,12,12,12,8,12,12,12,12,12,12,71,71,71,118,
71,118,71,71,118,12,71,71,71,71,99,218,123,71,218,71,218,71,99,99,
99,218,218,71,218,218,99,58,58,58,58,218,99,218,218,99,58,99,78,58,
58,99,99,99,58,58,78,246,246,78,78,78,58,99,58,58,99,58,99,71,
11,71,12,23,118,118,118,23,112,30,103,208,208,65,242,112,118,23,23,118,
118,118,49,112,23,112,11,112,112,112,118,49,49,49,49,112,23,23,112,244,
244,22,22,22,242,112,49,223,223,66,223,49,223,49,223,49,12,71,71,99,
99,58,212,212,246,58,78,78,58,58,99,99,99,58,78,78,78,78,58,58,
99,99,99,58,58,58,58,58,99,218,71,218,99,99,218,58,99,99,71,218,
71,71,218,99,71,99,123,71,118,118,123,71,71,123,71,71,12,12,118,12,
12,12,12,12,12,12,71,12,71,8,12,92,12,92,71,12,118,118,12,12,
118,71,71,12,71,71,118,12,12,71,118,218,71,71,71,12,71,12,218,218,
99,99,218,218,71,71,71,218,99,99,99,99,71,71,218,71,99,58,58,58,
58,58,99,11,99,99,99,58,246,78,246,78,58,99,99,99,58,58,99,99,
99,11,71,112,112,118,118,92,118,23,118,112,30,237,103,65,65,22,30,54,
244,244,23,112,244,112,244,112,244,23,244,23,112,62,244,244,30,242,22,242,
22,30,23,49,49,19,82,223,223,49,49,49,223,49,12,11,11,218,99,58,
58,78,78,78,246,78,78,99,99,58,99,58,58,78,78,78,58,99,218,218,
71,99,99,99,58,99,58,99,71,123,71,218,99,99,218,99,218,71,12,71,
71,218,71,71,218,71,71,71,71,71,12,71,71,71,118,12,12,12,71,71,
12,12,12,12,118,12,12,92,12,8,12,12,71,12,12,12,12,12,71,12,
118,12,12,12,118,12,71,12,12,71,71,71,71,123,71,12,12,71,71,218,
218,218,11,71,123,71,71,218,71,99,99,58,99,99,71,218,218,99,218,58,
58,58,58,99,218,71,99,218,58,58,58,246,212,58,58,99,99,58,99,58,
58,58,58,218,71,71,112,71,118,118,49,23,118,118,49,112,112,30,237,22,
22,22,103,22,22,22,22,22,30,242,22,22,22,103,22,22,30,112,112,23,
49,49,49,82,223,66,49,49,49,49,223,12,118,71,218,99,99,58,99,58,
78,246,78,246,58,58,99,99,218,218,99,99,99,58,58,58,99,218,71,218,
99,99,58,58,58,99,218,123,71,71,218,218,99,99,99,123,71,71,71,92,
71,71,218,218,71,12,12,12,118,71,12,118,71,71,71,12,12,12,12,12,
12,12,118,118,12,12,12,12,12,8,92,92,92,12,12,12,12,12,12,12,
92,12,12,12,71,12,118,12,12,12,12,12,71,71,71,12,12,71,118,71,
71,123,71,71,71,118,71,71,71,123,71,218,218,99,218,71,12,71,71,218,
218,58,58,99,58,71,71,218,218,218,99,58,58,58,58,58,99,99,99,218,
218,99,58,58,99,99,99,11,11,11,23,112,118,112,49,118,118,118,23,118,
49,118,23,112,112,112,112,244,112,112,118,112,118,49,49,223,49,223,223,49,
223,223,49,49,223,49,223,223,118,118,71,11,218,99,218,99,218,78,58,58,
58,58,58,218,218,218,218,218,58,99,58,58,58,58,218,99,71,71,123,71,
218,99,58,99,99,71,71,12,12,71,71,71,218,218,218,71,118,71,71,12,
123,71,12,71,71,12,12,12,118,71,12,12,12,118,118,12,71,118,12,118,
12,12,12,12,12,92,12,12,92,8,92,92,12,12,92,12,92,12,12,12,
12,12,118,12,12,12,12,12,12,12,118,12,12,71,118,71,12,12,71,118,
71,71,71,123,218,118,12,71,71,71,71,99,99,218,218,71,71,71,71,71,
99,218,99,58,99,218,218,71,71,71,218,71,58,99,58,58,99,58,218,99,
99,218,99,99,58,58,58,99,58,99,218,11,71,112,11,112,118,23,118,23,
49,118,118,92,49,92,49,92,49,92,49,223,223,49,223,49,49,49,49,82,
49,49,49,223,118,118,71,71,11,71,99,218,218,99,58,58,58,58,58,58,
58,218,218,218,71,218,218,99,99,99,99,58,218,218,71,123,71,71,218,11,
99,99,218,218,71,71,12,71,12,218,218,218,71,218,118,12,71,118,71,71,
71,71,71,71,118,71,12,12,12,71,12,12,12,12,12,12,12,49,12,12,
12,92,12,49,12,92,12,12,92,8,92,92,92,92,92,12,92,12,12,92,
12,92,12,92,12,71,71,12,12,12,12,71,12,118,71,118,71,118,12,12,
12,12,71,71,218,71,71,118,118,12,12,118,71,218,71,218,123,12,12,12,
12,71,71,99,99,99,218,71,71,71,71,123,71,218,218,58,99,99,58,218,
99,218,218,11,99,218,99,218,218,58,58,58,99,218,71,11,71,71,118,11,
112,71,112,118,112,12,118,118,118,118,118,118,118,118,118,118,223,223,49,49,
118,118,118,71,71,71,218,71,218,71,99,99,99,218,58,58,58,218,218,218,
218,71,71,218,123,71,218,99,58,218,218,99,71,118,12,71,71,71,218,218,
218,99,71,118,12,12,12,71,71,123,71,71,71,12,118,12,92,71,118,71,
12,12,71,12,12,92,12,12,12,118,12,12,12,12,12,92,12,12,12,92,
71,92,12,92,92,92,92,92,12,8,92,92,92,92,92,92,92,92,92,12,
92,12,92,12,92,92,12,118,92,12,12,92,92,12,12,12,12,12,12,12,
12,12,71,118,12,118,71,71,12,12,12,12,118,71,218,71,218,71,118,12,
12,71,12,71,218,71,99,218,123,71,71,12,71,118,71,71,99,218,218,99,
218,99,218,218,218,71,123,71,218,218,218,218,99,99,99,58,99,99,99,218,
99,71,71,71,11,71,11,11,11,11,11,11,11,11,71,118,12,118,218,218,
71,218,71,71,218,71,99,71,99,99,99,58,218,99,218,218,71,71,71,71,
71,71,123,71,11,99,99,99,218,218,71,71,12,12,12,71,123,218,71,218,
71,118,71,12,118,12,12,71,71,218,118,12,12,12,92,12,71,118,71,71,
12,71,92,12,92,12,12,12,118,12,12,92,92,12,92,12,92,92,92,92,
92,92,92,92,12,92,92,92,92,8,92,92,92,12,92,92,92,92,92,92,
92,92,92,12,92,92,12,12,92,92,92,12,92,92,12,12,118,12,12,92,
92,12,12,12,71,71,71,118,12,118,12,12,12,71,12,71,71,71,71,12,
12,12,118,12,12,118,218,71,71,71,12,71,71,71,12,12,71,71,71,11,
218,99,218,218,218,218,71,71,71,71,71,71,71,71,218,218,218,218,99,218,
218,218,99,218,99,218,218,218,218,218,218,218,218,99,218,11,218,71,71,71,
71,123,71,123,71,218,99,218,218,11,218,99,71,71,71,71,71,71,71,92,
71,71,71,123,71,218,71,71,71,118,12,12,12,12,71,71,71,218,71,71,
12,12,12,12,12,12,12,71,71,71,12,12,12,12,12,12,12,12,118,12,
12,92,92,92,12,92,12,71,12,92,92,12,92,92,92,92,92,12,92,92,
92,92,92,92,92,92,92,92,92,8,92,19,92,92,92,92,92,223,92,92,
92,92,92,92,92,92,92,92,92,92,92,92,12,92,12,92,12,118,12,12,
12,92,92,12,92,12,12,12,71,12,49,12,92,92,12,12,71,12,12,12,
12,71,12,12,12,12,71,12,71,71,218,218,71,118,12,12,12,71,12,12,
71,123,71,71,99,71,71,123,71,123,71,123,71,71,71,71,71,71,71,71,
71,218,218,218,71,71,218,71,218,71,218,71,71,123,71,123,71,123,71,123,
218,71,218,218,218,218,71,71,71,71,71,12,12,12,12,12,12,12,71,71,
71,123,218,218,71,71,12,12,12,71,12,12,12,12,71,71,71,12,118,12,
12,92,12,12,12,12,12,12,71,12,92,12,92,12,12,118,12,12,12,92,
92,92,92,92,92,12,92,92,12,92,92,92,92,19,12,92,92,92,92,92,
12,92,92,92,92,92,92,92,92,8,19,108,19,108,12,19,92,92,92,92,
92,92,92,92,92,19,92,92,92,92,92,92,92,92,92,92,92,92,12,92,
92,92,92,92,92,92,12,12,12,12,71,12,92,92,92,92,12,92,118,12,
12,12,12,12,92,12,12,12,71,12,71,71,71,12,12,12,12,12,12,92,
112,118,71,12,71,71,71,218,71,71,71,71,71,71,12,12,12,12,12,12,
12,118,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,
71,71,71,71,71,71,71,71,118,71,12,71,12,12,12,12,12,71,71,123,
71,71,71,92,12,12,12,12,92,92,71,12,12,12,12,71,12,12,92,12,
92,92,12,118,12,12,118,12,12,92,92,92,92,12,12,12,12,92,92,92,
92,12,92,12,92,12,92,92,92,92,92,92,92,92,92,92,92,92,92,92,
92,92,92,92,12,19,19,108,92,8,92,92,19,92,108,92,19,92,92,92,
92,108,92,92,92,12,92,92,12,92,92,92,92,92,92,92,92,92,92,12,
12,92,92,92,92,223,12,92,12,12,12,12,12,92,92,12,92,12,12,12,
12,12,12,12,49,12,92,92,92,92,12,12,71,12,12,12,12,12,12,12,
92,92,118,92,12,12,118,12,12,12,12,12,12,71,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,118,118,12,118,12,12,12,12,12,12,12,12,12,12,12,12,71,12,
12,12,71,92,12,92,92,49,12,12,12,12,118,12,12,118,92,12,92,92,
12,12,12,12,123,12,92,92,92,92,92,92,12,92,12,92,92,92,92,92,
92,92,92,92,92,92,92,92,92,92,92,92,12,92,92,92,19,92,92,108,
92,19,92,108,108,92,108,92,108,8,19,108,19,92,19,108,108,108,92,19,
92,92,19,92,108,108,92,108,108,92,92,92,92,92,92,19,92,92,92,92,
92,92,92,92,92,92,92,92,92,92,92,92,12,92,12,92,92,92,92,92,
92,12,12,12,12,12,12,92,92,92,92,92,92,12,12,12,12,12,118,12,
12,12,12,92,12,12,12,12,71,12,12,12,12,71,71,12,12,71,118,118,
12,12,12,12,12,118,12,12,12,92,12,12,12,12,12,71,12,12,118,12,
12,71,12,12,12,12,12,92,118,118,12,12,12,12,71,12,12,12,49,12,
92,12,92,92,92,12,92,12,12,12,12,12,92,92,92,92,92,92,92,92,
12,12,71,92,92,92,12,92,223,92,92,92,12,92,92,92,92,92,12,19,
92,92,92,92,92,92,108,92,108,19,92,108,108,108,92,92,19,108,92,108,
19,92,19,92,108,92,108,19,19,8,19,108,19,108,108,19,92,19,108,19,
19,108,108,19,19,92,108,92,92,108,19,12,108,108,92,19,108,108,92,19,
92,92,92,92,92,92,108,19,92,92,92,92,12,92,92,92,92,92,92,92,
92,92,92,12,12,118,123,92,12,12,92,92,92,92,92,92,12,12,12,12,
12,92,12,12,92,12,92,92,92,92,92,92,12,12,12,12,12,12,12,71,
71,12,12,12,12,12,12,12,71,12,12,12,12,12,12,92,12,12,92,12,
92,12,12,49,12,92,12,12,12,12,12,71,12,12,12,12,92,12,92,12,
92,92,92,92,92,12,12,12,12,92,12,12,92,92,92,92,92,92,12,12,
12,92,92,92,92,19,108,92,92,92,92,92,92,92,92,19,92,108,108,92,
92,92,92,19,108,92,19,108,92,108,108,92,19,92,108,19,108,92,108,92,
19,108,108,92,108,108,19,92,108,8,19,19,19,19,19,108,19,19,108,92,
19,19,108,92,19,19,108,19,108,92,108,19,92,19,92,92,92,19,92,92,
92,92,92,92,92,92,19,108,92,19,19,92,92,92,92,92,92,92,223,92,
223,92,92,92,92,92,92,92,92,92,92,92,92,223,92,92,92,12,92,12,
12,12,12,12,92,12,12,92,12,92,92,92,92,92,92,92,92,92,92,92,
92,92,12,92,49,92,12,92,92,12,12,92,12,92,12,92,12,12,92,12,
12,12,12,12,12,12,12,92,92,92,12,92,92,92,92,92,92,92,92,92,
92,92,12,12,12,12,92,92,92,92,92,92,92,92,92,92,92,92,92,92,
92,92,12,19,92,92,108,12,92,92,92,12,19,92,92,108,92,19,19,92,
92,92,92,92,108,19,92,19,19,92,92,108,108,92,108,92,19,19,19,108,
19,19,19,19,19,19,108,19,19,8,19,53,19,53,19,53,19,53,19,108,
19,108,19,108,108,108,19,108,19,108,19,108,108,108,108,19,108,19,108,19,
19,92,108,19,19,12,108,92,108,92,108,19,108,92,92,92,92,92,92,19,
92,19,108,92,19,92,92,92,92,92,92,92,92,92,92,92,108,108,19,92,
92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,
92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,
92,92,92,92,12,92,92,92,12,92,19,92,92,92,92,92,92,92,92,92,
92,92,92,92,92,92,92,92,92,108,19,92,92,223,92,92,92,92,92,92,
19,108,108,108,108,19,92,92,92,92,108,108,108,108,108,92,108,92,108,19,
92,19,108,108,19,108,108,108,108,108,19,19,19,19,19,19,108,108,53,19,
108,19,108,53,19,53,19,53,19,8,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,108,19,108,19,
19,19,19,19,108,19,108,19,108,19,108,19,19,19,19,108,19,92,92,92,
19,19,108,19,108,19,19,92,92,92,92,92,92,92,92,19,19,108,19,108,
19,92,19,92,92,92,92,92,92,92,92,92,92,92,92,19,92,92,92,92,
92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,
92,92,92,19,19,19,92,19,19,92,19,19,108,92,92,92,19,92,92,92,
92,92,92,92,92,19,19,19,19,108,19,108,92,92,92,92,92,92,19,19,
92,19,223,19,108,19,108,92,19,19,19,19,19,19,108,19,108,19,108,19,
19,19,19,19,19,19,19,19,19,108,19,108,19,108,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,8};

View File

@ -29,6 +29,7 @@ SUBDIRS = \
script-fu \
$(GIMP_PERL) \
AlienMap \
AlienMap2 \
FractalExplorer \
Lighting \
MapObject \

View File

@ -32,6 +32,7 @@ libexec_PROGRAMS = \
bz2 \
c_astretch \
checkerboard \
color_enhance \
colorify \
compose \
convmatrix \
@ -128,6 +129,7 @@ libexec_PROGRAMS = \
video \
vinvert \
vpropagate \
warp \
waves \
whirlpinch \
wind \
@ -277,6 +279,15 @@ checkerboard_LDADD = \
$(GTK_LIBS) \
$(INTLLIBS)
color_enhance_SOURCES = \
color_enhance.c
color_enhance_LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimp/libgimp.la \
$(GTK_LIBS) \
$(INTLLIBS)
colorify_SOURCES = \
colorify.c
@ -1061,6 +1072,15 @@ vpropagate_LDADD = \
$(GTK_LIBS) \
$(INTLLIBS)
warp_SOURCES = \
warp.c
warp_LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimp/libgimp.la \
$(GTK_LIBS) \
$(INTLLIBS)
waves_SOURCES = \
waves.c

View File

@ -0,0 +1,479 @@
/* Color Enhance 0.10 --- image filter plug-in for The Gimp image
* manipulation program
*
* Copyright (C) 1999 Martin Weber
* Copyright (C) 1996 Federico Mena Quintero
*
* You can contact me at martin.weber@usa.net
* You can contact the original The Gimp authors at gimp@xcf.berkeley.edu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* This simple plug-in does an automatic Saturation stretch. For each
channel in the image, it finds the minimum and maximum values... it
uses those values to stretch the individual histograms to the full
range. For some images it may do just what you want; for others
it may be total crap :) This version operates in HSV space
and preserves hue. Most code is taken from autostretch_hsv */
#include <stdlib.h>
#include <stdio.h>
#include "libgimp/gimp.h"
/* Declare local functions.
*/
static void query (void);
static void run (char *name,
int nparams,
GParam *param,
int *nreturn_vals,
GParam **return_vals);
static void Color_Enhance (GDrawable * drawable);
static void indexed_Color_Enhance (gint32 image_ID);
static void calc_rgb_to_hsv(gint r, gint g, gint b, double *h, double
*s, double *v);
static void calc_hsv_to_rgb(gint *r, gint *g, gint *b,
double h, double s, double v);
GPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
query, /* query_proc */
run, /* run_proc */
};
MAIN ()
static void
query ()
{
static GParamDef args[] =
{
{ PARAM_INT32, "run_mode", "Interactive, non-interactive" },
{ PARAM_IMAGE, "image", "Input image" },
{ PARAM_DRAWABLE, "drawable", "Input drawable" },
};
static GParamDef *return_vals = NULL;
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
gimp_install_procedure ("plug_in_Color_Enhance",
"Automatically stretch the saturation of the
specified drawable to cover all possible ranges.",
"This simple plug-in does an automatic
saturation stretch. For each channel in the image, it finds the
minimum and maximum values... it uses those values to stretch the individual
histograms to the full range. For some images it may do just what
you want; for others it may be total crap :). This version differs from
Contrast Autostretch in that it works in HSV space, and preserves hue.",
"Martin Weber",
"Martin Weber",
"1997",
"<Image>/Image/Colors/Color Enhance",
"RGB*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
args,
return_vals); }
static void
run (char *name,
int nparams,
GParam *param,
int *nreturn_vals,
GParam **return_vals)
{
static GParam values[1];
GDrawable *drawable;
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
gint32 image_ID;
run_mode = param[0].data.d_int32;
/* Get the specified drawable */
drawable = gimp_drawable_get (param[2].data.d_drawable);
image_ID = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_gray (drawable->id))
{
gimp_progress_init ("Color Enhance...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
Color_Enhance (drawable);
if (run_mode != RUN_NONINTERACTIVE)
gimp_displays_flush ();
}
else if (gimp_drawable_indexed (drawable->id))
{
indexed_Color_Enhance (image_ID);
if (run_mode != RUN_NONINTERACTIVE)
gimp_displays_flush ();
}
else
{
/* gimp_message ("Color_Enhance: cannot operate on indexed color images"); */
status = STATUS_EXECUTION_ERROR;
}
*nreturn_vals = 1;
*return_vals = values;
values[0].type = PARAM_STATUS;
values[0].data.d_status = status;
gimp_drawable_detach (drawable);
}
static void
indexed_Color_Enhance(gint32 image_ID) /* a.d.m. */
{
guchar *cmap;
gint ncols,i;
double vhi = 0.0, vlo = 1.0;
cmap = gimp_image_get_cmap (image_ID, &ncols);
if (cmap==NULL)
{
printf("Color_Enhance: cmap was NULL! Quitting...\n");
gimp_quit();
}
for (i=0;i<ncols;i++)
{
double h, s, v;
double c, m, y;
double k;
c = 255 - cmap[i*3+0];
m = 255 - cmap[i*3+1];
y = 255 - cmap[i*3+2];
k = c;
if (m < k) k = m;
if (y < k) k = y;
calc_rgb_to_hsv(c - k, m - k, y - k, &h, &s, &v);
if (v > vhi) vhi = v;
if (v < vlo) vlo = v;
}
for (i=0;i<ncols;i++)
{
double h, s, v;
gint c, m, y;
double k;
c = 255 - cmap[i*3+0];
m = 255 - cmap[i*3+1];
y = 255 - cmap[i*3+2];
k = c;
if (m < k) k = m;
if (y < k) k = y;
calc_rgb_to_hsv(c - k, m - k, y - k, &h, &s, &v);
if (vhi!=vlo)
v = (v-vlo) / (vhi-vlo);
calc_hsv_to_rgb(&c, &m, &y, h, s, v);
c += k;
if (c > 255) c = 255;
m += k;
if (m > 255) m = 255;
y += k;
if (y > 255) y = 255;
cmap[i*3+0] = 255 - c;
cmap[i*3+1] = 255 - m;
cmap[i*3+2] = 255 - y;
}
gimp_image_set_cmap (image_ID, cmap, ncols);
}
static void
Color_Enhance (GDrawable *drawable)
{
GPixelRgn src_rgn, dest_rgn;
guchar *src, *s;
guchar *dest, *d;
double vhi = 0.0, vlo = 1.0;
gint progress, max_progress;
gint has_alpha, alpha;
gint x1, y1, x2, y2;
gint x, y;
gpointer pr;
/* Get selection area */
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
has_alpha = gimp_drawable_has_alpha (drawable->id);
alpha = (has_alpha) ? drawable->bpp - 1 : drawable->bpp;
/* Initialize progress */
progress = 0;
max_progress = (x2 - x1) * (y2 - y1) * 2;
gimp_pixel_rgn_init (&src_rgn, drawable, x1, y1, (x2 - x1), (y2 - y1), FALSE, FALSE);
for (pr = gimp_pixel_rgns_register (1, &src_rgn); pr != NULL; pr = gimp_pixel_rgns_process (pr))
{
src = src_rgn.data;
for (y = 0; y < src_rgn.h; y++)
{
s = src;
for (x = 0; x < src_rgn.w; x++)
{
if (!has_alpha || (has_alpha && s[alpha]))
{
double h, z, v;
double c, m, y;
double k;
c = 255 - s[0];
m = 255 - s[1];
y = 255 - s[2];
k = c;
if (m < k) k = m;
if (y < k) k = y;
calc_rgb_to_hsv(c - k, m - k, y - k, &h, &z, &v);
if (v > vhi) vhi = v;
if (v < vlo) vlo = v;
}
s += src_rgn.bpp;
}
src += src_rgn.rowstride;
}
/* Update progress */
progress += src_rgn.w * src_rgn.h;
gimp_progress_update ((double) progress / (double) max_progress);
}
/* Now substitute pixel vales */
gimp_pixel_rgn_init (&src_rgn, drawable, x1, y1, (x2 - x1), (y2 - y1), FALSE, FALSE);
gimp_pixel_rgn_init (&dest_rgn, drawable, x1, y1, (x2 - x1), (y2 - y1), TRUE, TRUE);
for (pr = gimp_pixel_rgns_register (2, &src_rgn, &dest_rgn); pr != NULL; pr = gimp_pixel_rgns_process (pr))
{
src = src_rgn.data;
dest = dest_rgn.data;
for (y = 0; y < src_rgn.h; y++)
{
s = src;
d = dest;
for (x = 0; x < src_rgn.w; x++)
{
double h, z, v;
gint c, m, y;
double k;
c = 255 - s[0];
m = 255 - s[1];
y = 255 - s[2];
k = c;
if (m < k) k = m;
if (y < k) k = y;
calc_rgb_to_hsv(c - k, m - k, y - k, &h, &z, &v);
if (vhi!=vlo)
v = (v-vlo) / (vhi-vlo);
calc_hsv_to_rgb(&c, &m , &y, h, z, v);
c += k;
if (c > 255) c = 255;
m += k;
if (m > 255) m = 255;
y += k;
if (y > 255) y = 255;
d[0] = 255 - c;
d[1] = 255 - m;
d[2] = 255 - y;
if (has_alpha)
d[alpha] = s[alpha];
s += src_rgn.bpp;
d += dest_rgn.bpp;
}
src += src_rgn.rowstride;
dest += dest_rgn.rowstride;
}
/* Update progress */
progress += src_rgn.w * src_rgn.h;
gimp_progress_update ((double) progress / (double) max_progress);
}
/* update the region */
gimp_drawable_flush (drawable);
gimp_drawable_merge_shadow (drawable->id, TRUE);
gimp_drawable_update (drawable->id, x1, y1, (x2 - x1), (y2 - y1));
}
static void
calc_rgb_to_hsv(gint r, gint g, gint b, double *hue, double *sat, double
*val) {
double red, green, blue;
double h, s, v;
double min, max;
double delta;
red = (double)r / 255.0;
green = (double)g / 255.0;
blue = (double)b / 255.0;
h = 0.0; /* Shut up -Wall */
if (red > green)
{
if (red > blue)
max = red;
else
max = blue;
if (green < blue)
min = green;
else
min = blue;
}
else
{
if (green > blue)
max = green;
else
max = blue;
if (red < blue)
min = red;
else
min = blue;
}
v = max;
if (max != 0.0)
s = (max - min) / max;
else
s = 0.0;
if (s == 0.0)
h = 0.0;
else
{
delta = max - min;
if (red == max)
h = (green - blue) / delta;
else if (green == max)
h = 2 + (blue - red) / delta;
else if (blue == max)
h = 4 + (red - green) / delta;
h /= 6.0;
if (h < 0.0)
h += 1.0;
else if (h > 1.0)
h -= 1.0;
}
*hue = h;
*sat = s;
*val = v;
}
static void
calc_hsv_to_rgb(gint *r, gint *g, gint *b, double h, double s, double
v) {
double hue, saturation, value;
double f, p, q, t;
if (s == 0.0)
{
h = v;
s = v;
v = v; /* heh */
}
else
{
hue = h * 6.0;
saturation = s;
value = v;
if (hue == 6.0)
hue = 0.0;
f = hue - (int) hue;
p = value * (1.0 - saturation);
q = value * (1.0 - saturation * f);
t = value * (1.0 - saturation * (1.0 - f));
switch ((int) hue)
{
case 0:
h = value;
s = t;
v = p;
break;
case 1:
h = q;
s = value;
v = p;
break;
case 2:
h = p;
s = value;
v = t;
break;
case 3:
h = p;
s = q;
v = value;
break;
case 4:
h = t;
s = p;
v = value;
break;
case 5:
h = value;
s = p;
v = q;
break;
}
}
*r = h*255;
*g = s*255;
*b = v*255;
}

View File

@ -21,7 +21,7 @@
*/
/*
* version 1.1115
* version 1.122
* This plug-in requires GIMP v0.99.10 or above.
*
* This plug-in produces an effect like a supernova burst.
@ -30,6 +30,11 @@
* http://ha1.seikyou.ne.jp/home/taka/gimp/
*
*
* Changes from version 1.1115 to version 1.122 by Martin Weber:
* - Little bug fixes
* - Added random hue
* - Freeing memory
*
* Changes from version 1.1114 to version 1.1115:
* - Added gtk_rc_parse
* - Fixed bug that drawing preview of small height image
@ -49,12 +54,11 @@
* - fix preview
* - add notebook interface and so on
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "gtk/gtk.h"
#include "libgimp/gimp.h"
@ -66,6 +70,10 @@ static char rcsid[] = "$Id$";
/* Some useful macros */
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif /* M_PI */
#ifndef RAND_MAX
#define RAND_MAX 2147483647
#endif /* RAND_MAX */
@ -95,6 +103,7 @@ typedef struct {
gint color[3];
gint radius;
gint nspoke;
gint randomhue;
} NovaValues;
typedef struct {
@ -165,6 +174,19 @@ static void nova_paired_int_entry_update (GtkWidget *widget,
static void nova (GDrawable *drawable);
static void rgb_to_hsl (gdouble r,
gdouble g,
gdouble b,
gdouble * h,
gdouble * s,
gdouble * l);
static void hsl_to_rgb (gdouble h,
gdouble sl,
gdouble l,
gdouble * r,
gdouble * g,
gdouble * b);
GPlugInInfo PLUG_IN_INFO =
{
@ -179,7 +201,8 @@ static NovaValues pvals =
128, 128, /* xcenter, ycenter */
{ 90, 100, 256 }, /* color */
20, /* radius */
100 /* nspoke */
100, /* nspoke */
0 /* random hue */
};
static NovaInterface pint =
@ -202,7 +225,8 @@ query()
{ PARAM_INT32, "ycenter", "Y coordinates of the center of supernova" },
{ PARAM_COLOR, "color", "Color of supernova" },
{ PARAM_INT32, "radius", "Radius of supernova" },
{ PARAM_INT32, "nspoke", "Number of spokes" }
{ PARAM_INT32, "nspoke", "Number of spokes" },
{ PARAM_INT32, "randomhue", "Random hue" }
};
static GParamDef *return_vals = NULL;
static gint nargs = sizeof (args) / sizeof (args[0]);
@ -265,7 +289,7 @@ run (gchar *name,
case RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
if (nparams != 8)
if (nparams != 9)
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS)
{
@ -276,6 +300,7 @@ run (gchar *name,
pvals.color[2] = param[5].data.d_color.blue;
pvals.radius = param[6].data.d_int32;
pvals.nspoke = param[7].data.d_int32;
pvals.randomhue = param[8].data.d_int32;
}
if ((status == STATUS_SUCCESS) &&
pvals.radius <= 0 )
@ -392,7 +417,7 @@ nova_dialog ( GDrawable *drawable )
gtk_container_border_width (GTK_CONTAINER (frame), 10);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
table = gtk_table_new (6, 2, FALSE);
table = gtk_table_new (7, 2, FALSE);
gtk_container_border_width (GTK_CONTAINER (table), 10);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_row_spacings (GTK_TABLE (table), 3);
@ -416,6 +441,9 @@ nova_dialog ( GDrawable *drawable )
nova_int_entryscale_new( GTK_TABLE (table), 0, 5,
"Spokes:", &pvals.nspoke,
1, 1024, TRUE );
nova_int_entryscale_new( GTK_TABLE (table), 0, 6,
"Random hue:", &pvals.randomhue,
0, 360, TRUE );
gtk_widget_show (frame);
gtk_widget_show (table);
@ -1066,8 +1094,11 @@ nova (GDrawable *drawable)
gdouble new_alpha;
gdouble compl_ratio;
gdouble ratio;
gint i;
gdouble r, g, b, h, s, lu;
gdouble spokecol;
gint i, j;
gint color[4];
gint *spokecolor;
/* initialize */
@ -1075,8 +1106,21 @@ nova (GDrawable *drawable)
srand(time(NULL));
spoke = g_new( gdouble, pvals.nspoke );
spokecolor = g_new (gint, 3 * pvals.nspoke);
rgb_to_hsl (pvals.color[0]/255.0, pvals.color[1]/255.0, pvals.color[2]/255.0, &h, &s, &lu);
for( i=0; i<pvals.nspoke; i++ )
{
spoke[i] = gauss();
h += (gdouble)pvals.randomhue / 360.0 * ((gdouble) rand() / (gdouble) RAND_MAX - 0.5) ;
if (h < 0) h += 1.0;
else if (h >= 1.0) h -= 1.0;
hsl_to_rgb (h, s, lu, &r, &g, &b);
spokecolor[3*i+0] = 255.0 * r;
spokecolor[3*i+1] = 255.0 * g;
spokecolor[3*i+2] = 255.0 * b;
}
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
@ -1116,7 +1160,7 @@ nova (GDrawable *drawable)
l = sqrt( u*u + v*v );
/* This algorithm is still under construction. */
c = (atan2 (u, v) / (2 * G_PI) + .51) * pvals.nspoke;
c = (atan2 (u, v) / (2 * M_PI) + .51) * pvals.nspoke;
i = (int) floor (c);
c -= i;
i %= pvals.nspoke;
@ -1142,17 +1186,18 @@ nova (GDrawable *drawable)
compl_ratio = 1.0 - ratio;
for (i = 0; i < alpha; i++)
for (j = 0; j < alpha; j++)
{
spokecol = (gdouble)spokecolor[3*i+j]*(1.0-c) + (gdouble)spokecolor[3*((i + 1) % pvals.nspoke)+j]*c;
if (w > 1.0)
color[i] = CLAMP (pvals.color[i] * w, 0, 255);
color[j] = CLAMP (spokecol * w, 0, 255);
else
color[i] = src[i] * compl_ratio + pvals.color[i] * ratio;
color[j] = src[j] * compl_ratio + spokecol * ratio;
c = CLAMP (w1 * w, 0, 1);
color[i] = color[i] + 255 * c;
color[j] = color[j] + 255 * c;
dest[i]= CLAMP (color[i], 0, 255);
dest[j]= CLAMP (color[j], 0, 255);
}
if (has_alpha)
@ -1174,5 +1219,104 @@ nova (GDrawable *drawable)
gimp_drawable_update (drawable->id, x1, y1, (x2 - x1), (y2 - y1));
g_free( spoke );
g_free( spokecolor );
}
/*
* RGB-HSL transforms.
* Ken Fishkin, Pixar Inc., January 1989.
*/
/*
* given r,g,b on [0 ... 1],
* return (h,s,l) on [0 ... 1]
*/
static void
rgb_to_hsl (gdouble r,
gdouble g,
gdouble b,
gdouble *h,
gdouble *s,
gdouble *l)
{
gdouble v;
gdouble m;
gdouble vm;
gdouble r2, g2, b2;
v = MAX(r,g);
v = MAX(v,b);
m = MIN(r,g);
m = MIN(m,b);
if ((*l = (m + v) / 2.0) <= 0.0)
return;
if ((*s = vm = v - m) > 0.0)
{
*s /= (*l <= 0.5) ? (v + m ) : (2.0 - v - m) ;
}
else
return;
r2 = (v - r) / vm;
g2 = (v - g) / vm;
b2 = (v - b) / vm;
if (r == v)
*h = (g == m ? 5.0 + b2 : 1.0 - g2);
else if (g == v)
*h = (b == m ? 1.0 + r2 : 3.0 - b2);
else
*h = (r == m ? 3.0 + g2 : 5.0 - r2);
*h /= 6;
}
/*
* given h,s,l on [0..1],
* return r,g,b on [0..1]
*/
static void
hsl_to_rgb (gdouble h,
gdouble sl,
gdouble l,
gdouble *r,
gdouble *g,
gdouble *b)
{
gdouble v;
v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);
if (v <= 0)
{
*r = *g = *b = 0.0;
}
else
{
gdouble m;
gdouble sv;
gint sextant;
gdouble fract, vsf, mid1, mid2;
m = l + l - v;
sv = (v - m ) / v;
h *= 6.0;
sextant = h;
fract = h - sextant;
vsf = v * sv * fract;
mid1 = m + vsf;
mid2 = v - vsf;
switch (sextant)
{
case 0: *r = v; *g = mid1; *b = m; break;
case 1: *r = mid2; *g = v; *b = m; break;
case 2: *r = m; *g = v; *b = mid1; break;
case 3: *r = m; *g = mid2; *b = v; break;
case 4: *r = mid1; *g = m; *b = v; break;
case 5: *r = v; *g = m; *b = mid2; break;
}
}
}

View File

@ -14,6 +14,7 @@
'bz2' => { libdep => 'glib' },
'c_astretch' => { libdep => 'glib' },
'checkerboard' => { libdep => 'gtk' },
'color_enhance' => { libdep => 'gtk', ui => 1 },
'colorify' => { libdep => 'gtk' },
'compose' => { libdep => 'gtk', ui => 1 },
'convmatrix' => { libdep => 'gtk' },
@ -110,6 +111,7 @@
'video' => { libdep => 'gtk' },
'vinvert' => { libdep => 'glib' },
'vpropagate' => { libdep => 'gtk' },
'warp' => { libdep => 'gtk', ui => 1 },
'waves' => { libdep => 'gtk', libsupp => 'megawidget' },
'whirlpinch' => { libdep => 'gtk' },
'wind' => { libdep => 'gtk' },

View File

@ -1,5 +1,7 @@
/* Sparkle --- image filter plug-in for The Gimp image manipulation program
* Copyright (C) 1996 by John Beale; ported to Gimp by Michael J. Hammel
* Copyright (C) 1996 by John Beale; ported to Gimp by Michael J. Hammel;
* It has been optimized a little, bugfixed and modified by Martin Weber
* for additional functionality.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,28 +18,35 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* You can contact Michael at mjhammel@csn.net
* You can contact Martin at martin.weber@usa.net
* Note: set tabstops to 3 to make this more readable.
*/
/*
* Sparkle - simulate pixel bloom and diffraction effects
* Sparkle 1.26 - simulate pixel bloom and diffraction effects
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "gtk/gtk.h"
#include "libgimp/gimp.h"
#define SCALE_WIDTH 125
#define TILE_CACHE_SIZE 16
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif /* M_PI */
#define SCALE_WIDTH 175
#define MAX_CHANNELS 4
#define PSV 2 /* point spread value */
#define EPSILON 0.001
#define SQR(a) ((a) * (a))
#define NATURAL 0
#define FOREGROUND 1
#define BACKGROUND 2
typedef struct
{
gdouble lum_threshold;
@ -45,6 +54,14 @@ typedef struct
gdouble spike_len;
gdouble spike_pts;
gdouble spike_angle;
gdouble density;
gdouble opacity;
gdouble random_hue;
gdouble random_saturation;
gint preserve_luminosity;
gint invers;
gint border;
gint colortype;
} SparkleVals;
typedef struct
@ -54,15 +71,16 @@ typedef struct
/* Declare local functions.
*/
static void query (void);
static void run (char *name,
int nparams,
GParam *param,
int *nreturn_vals,
GParam **return_vals);
static void sparkle_toggle_update (GtkWidget *widget,
gpointer data);
static gint sparkle_dialog (void);
static gint compute_luminosity (guchar * pixel,
gint gray,
gint has_alpha);
@ -70,7 +88,6 @@ static gint compute_lum_threshold (GDrawable * drawable,
gdouble percentile);
static void sparkle (GDrawable * drawable,
gint threshold);
static void fspike (GPixelRgn * dest_rgn,
gint gray,
gint x1,
@ -79,6 +96,8 @@ static void fspike (GPixelRgn * dest_rgn,
gint y2,
gdouble xr,
gdouble yr,
gint tile_width,
gint tile_height,
gdouble inten,
gdouble length,
gdouble angle);
@ -90,10 +109,13 @@ static GTile* rpnt (GDrawable * drawable,
gint y2,
gdouble xr,
gdouble yr,
gint tile_width,
gint tile_height,
gint * row,
gint * col,
gint bytes,
gdouble * inten);
gdouble inten,
guchar color[MAX_CHANNELS]);
static void rgb_to_hsl (gdouble r,
gdouble g,
gdouble b,
@ -106,13 +128,15 @@ static void hsl_to_rgb (gdouble h,
gdouble * r,
gdouble * g,
gdouble * b);
static void sparkle_close_callback(GtkWidget *widget,
gpointer data);
static void sparkle_ok_callback (GtkWidget *widget,
gpointer data);
static void sparkle_scale_update (GtkAdjustment *adjustment,
double *scale_val);
static void set_tooltip (GtkTooltips *tooltips,
GtkWidget *widget,
const char *desc);
GPlugInInfo PLUG_IN_INFO =
{
@ -127,8 +151,16 @@ static SparkleVals svals =
0.001, /* luminosity threshold */
0.5, /* flare intensity */
20.0, /* spike length */
6.0, /* spike points */
15.0 /* spike angle */
4.0, /* spike points */
15.0, /* spike angle */
1.0, /* spike density */
1.0, /* opacity */
0.0, /* random hue */
0.0, /* random saturation */
FALSE, /* preserve_luminosity */
FALSE, /* invers */
FALSE, /* border */
NATURAL /* colortype */
};
static SparkleInterface sint =
@ -151,9 +183,17 @@ query ()
{ PARAM_DRAWABLE, "drawable", "Input drawable" },
{ PARAM_FLOAT, "lum_threshold", "Luminosity threshold (0.0 - 1.0)" },
{ PARAM_FLOAT, "flare_inten", "Flare intensity (0.0 - 1.0)" },
{ PARAM_FLOAT, "spike_len", "Spike length (in pixels)" },
{ PARAM_INT32, "spike_len", "Spike length (in pixels)" },
{ PARAM_INT32, "spike_pts", "# of spike points" },
{ PARAM_FLOAT, "spike_angle", "Spike angle (0.0-360.0 degrees)" }
{ PARAM_INT32, "spike_angle", "Spike angle (0-360 degrees, -1: random)" },
{ PARAM_FLOAT, "density", "Spike density (0.0 - 1.0)" },
{ PARAM_FLOAT, "opacity", "Opacity (0.0 - 1.0)" },
{ PARAM_FLOAT, "random_hue", "Random hue (0.0 - 1.0)" },
{ PARAM_FLOAT, "random_saturation", "Random saturation (0.0 - 1.0)" },
{ PARAM_INT32, "preserve_luminosity", "Preserve luminosity (TRUE/FALSE)" },
{ PARAM_INT32, "invers", "Invers (TRUE/FALSE)" },
{ PARAM_INT32, "border", "Add border (TRUE/FALSE)" },
{ PARAM_INT32, "colortype", "Color of sparkles: { NATURAL (0), FOREGROUND (1), BACKGROUND (2) }" }
};
static GParamDef *return_vals = NULL;
static int nargs = sizeof (args) / sizeof (args[0]);
@ -161,10 +201,10 @@ query ()
gimp_install_procedure ("plug_in_sparkle",
"Simulates pixel bloom and diffraction effects",
"More here later",
"John Beale, & (ported to GIMP v0.54) Michael J. Hammel & (ported to GIMP v1.0) Spencer Kimball",
"No help yet",
"John Beale, & (ported to GIMP v0.54) Michael J. Hammel & ted to GIMP v1.0) Spencer Kimball",
"John Beale",
"1996",
"Version 1.26, December 1998",
"<Image>/Filters/Light Effects/Sparkle",
"RGB*, GRAY*",
PROC_PLUG_IN,
@ -183,7 +223,7 @@ run (char *name,
GDrawable *drawable;
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
gint threshold;
gint threshold, x1, y1, x2, y2;
run_mode = param[0].data.d_int32;
@ -206,15 +246,23 @@ run (char *name,
case RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
if (nparams != 8)
if (nparams != 16)
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS)
{
svals.lum_threshold = param[3].data.d_float;
svals.flare_inten = param[4].data.d_float;
svals.spike_len = param[5].data.d_float;
svals.spike_len = param[5].data.d_int32;
svals.spike_pts = param[6].data.d_int32;
svals.spike_angle = param[7].data.d_float;
svals.spike_angle = param[7].data.d_int32;
svals.density = param[8].data.d_float;
svals.opacity = param[9].data.d_float;
svals.random_hue = param[10].data.d_float;
svals.random_saturation = param[11].data.d_float;
svals.preserve_luminosity = (param[12].data.d_int32) ? TRUE : FALSE;
svals.invers = (param[13].data.d_int32) ? TRUE : FALSE;
svals.border = (param[14].data.d_int32) ? TRUE : FALSE;
svals.colortype = param[15].data.d_int32;
}
if (status == STATUS_SUCCESS &&
(svals.lum_threshold < 0.0 || svals.lum_threshold > 1.0))
@ -222,12 +270,31 @@ run (char *name,
if (status == STATUS_SUCCESS &&
(svals.flare_inten < 0.0 || svals.flare_inten > 1.0))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.spike_len < 0))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.spike_pts < 0))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.spike_angle < 0.0 || svals.spike_angle > 360.0))
(svals.spike_angle < -1 || svals.spike_angle > 360))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.density < 0.0 || svals.density > 1.0))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.opacity < 0.0 || svals.opacity > 1.0))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.random_hue < 0.0 || svals.random_hue > 1.0))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.random_saturation < 0.0 || svals.random_saturation > 1.0))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS &&
(svals.colortype < NATURAL || svals.colortype > BACKGROUND))
status = STATUS_CALLING_ERROR;
break;
case RUN_WITH_LAST_VALS:
@ -246,10 +313,18 @@ run (char *name,
if (gimp_drawable_color (drawable->id) || gimp_drawable_gray (drawable->id))
{
gimp_progress_init ("Sparkling...");
gimp_tile_cache_ntiles (TILE_CACHE_SIZE);
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
if (svals.border == FALSE)
/* compute the luminosity which exceeds the luminosity threshold */
threshold = compute_lum_threshold (drawable, svals.lum_threshold);
else
{
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
num_sparkles = 2 * (x2 - x1 + y2 - y1);
threshold = 255;
}
sparkle (drawable, threshold);
if (run_mode != RUN_NONINTERACTIVE)
@ -261,7 +336,7 @@ run (char *name,
}
else
{
/* gimp_message ("blur: cannot operate on indexed color images"); */
/* gimp_message ("sparkle: cannot operate on indexed color images"); */
status = STATUS_EXECUTION_ERROR;
}
@ -279,9 +354,16 @@ sparkle_dialog ()
GtkWidget *scale;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *toggle;
GtkObject *scale_data;
GSList *group = NULL;
gchar **argv;
gint argc;
gint use_natural = (svals.colortype == NATURAL);
gint use_foreground = (svals.colortype == FOREGROUND);
gint use_background = (svals.colortype == BACKGROUND);
GtkTooltips *tips;
GdkColor tips_fg, tips_bg;
argc = 1;
argv = g_new (gchar *, 1);
@ -290,6 +372,7 @@ sparkle_dialog ()
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());
dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dlg), "Sparkle");
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
@ -297,6 +380,19 @@ sparkle_dialog ()
(GtkSignalFunc) sparkle_close_callback,
NULL);
/* use black as foreground: */
tips = gtk_tooltips_new ();
tips_fg.red = 0;
tips_fg.green = 0;
tips_fg.blue = 0;
/* postit yellow (khaki) as background: */
gdk_color_alloc (gtk_widget_get_colormap (dlg), &tips_fg);
tips_bg.red = 61669;
tips_bg.green = 59113;
tips_bg.blue = 35979;
gdk_color_alloc (gtk_widget_get_colormap (dlg), &tips_bg);
gtk_tooltips_set_colors (tips,&tips_bg,&tips_fg);
/* Action area */
button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -306,6 +402,7 @@ sparkle_dialog ()
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
set_tooltip(tips,button,"Accept settings and apply filter on image");
button = gtk_button_new_with_label ("Cancel");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -314,19 +411,21 @@ sparkle_dialog ()
GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0);
gtk_widget_show (button);
set_tooltip(tips,button,"Reject any changes and close plug-in");
/* parameter settings */
frame = gtk_frame_new ("Parameter Settings");
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 10);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
table = gtk_table_new (5, 2, FALSE);
table = gtk_table_new (15, 2, FALSE);
gtk_container_border_width (GTK_CONTAINER (table), 10);
gtk_container_add (GTK_CONTAINER (frame), table);
label = gtk_label_new ("Luminosity Threshold");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 5, 0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.lum_threshold, 0.0, 0.1, 0.001, 0.001, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
@ -339,10 +438,12 @@ sparkle_dialog ()
&svals.lum_threshold);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Luminosity Threshold");
label = gtk_label_new ("Flare Intensity");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 5, 0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.flare_inten, 0.0, 1.0, 0.01, 0.01, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
@ -355,26 +456,29 @@ sparkle_dialog ()
&svals.flare_inten);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Flare Intensity");
label = gtk_label_new ("Spike Length");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, 0, 5, 0);
scale_data = gtk_adjustment_new (svals.spike_len, 1.0, 100.0, 1.0, 1.0, 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.spike_len, 1, 100, 1, 1, 0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
gtk_table_attach (GTK_TABLE (table), scale, 1, 2, 2, 3, GTK_FILL, 0, 0, 0);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
(GtkSignalFunc) sparkle_scale_update,
&svals.spike_len);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Spike Length");
label = gtk_label_new ("Spike Points");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, 0, 5, 0);
scale_data = gtk_adjustment_new (svals.spike_pts, 0.0, 16.0, 1.0, 1.0, 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.spike_pts, 0, 16, 1, 1, 0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
gtk_table_attach (GTK_TABLE (table), scale, 1, 2, 3, 4, GTK_FILL, 0, 0, 0);
@ -386,21 +490,180 @@ sparkle_dialog ()
&svals.spike_pts);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Number of Spike Points");
label = gtk_label_new ("Spike Angle");
label = gtk_label_new ("Spike Angle (-1: Random)");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_FILL, 0, 5, 0);
scale_data = gtk_adjustment_new (svals.spike_angle, 0.0, 360.0, 5.0, 5.0, 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.spike_angle, -1, 360, 5, 5, 0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
gtk_table_attach (GTK_TABLE (table), scale, 1, 2, 4, 5, GTK_FILL, 0, 0, 0);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
(GtkSignalFunc) sparkle_scale_update,
&svals.spike_angle);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Spike Angle (-1 means a Random Angle is choosen)");
label = gtk_label_new ("Spike Density");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.density, 0.0, 1.0, 0.01, 0.01, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
gtk_table_attach (GTK_TABLE (table), scale, 1, 2, 5, 6, GTK_FILL, 0, 0, 0);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
(GtkSignalFunc) sparkle_scale_update,
&svals.density);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Spike Density");
label = gtk_label_new ("Opacity");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.opacity, 0.0, 1.0, 0.01, 0.01, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
gtk_table_attach (GTK_TABLE (table), scale, 1, 2, 6, 7, GTK_FILL, 0, 0, 0);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
(GtkSignalFunc) sparkle_scale_update,
&svals.opacity);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Opacity of the Spikes");
label = gtk_label_new ("Random Hue");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 7, 8, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.random_hue, 0.0, 1.0, 0.01, 0.01, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
gtk_table_attach (GTK_TABLE (table), scale, 1, 2, 7, 8, GTK_FILL, 0, 0, 0);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
(GtkSignalFunc) sparkle_scale_update,
&svals.random_hue);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Value how much the Hue should be changed randomly");
label = gtk_label_new ("Random Saturation");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 8, 9, GTK_FILL, 0, 5, 5);
scale_data = gtk_adjustment_new (svals.random_saturation, 0.0, 1.0, 0.01, 0.01, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
gtk_widget_set_usize (scale, SCALE_WIDTH, 0);
gtk_table_attach (GTK_TABLE (table), scale, 1, 2, 8, 9, GTK_FILL, 0, 0, 0);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
(GtkSignalFunc) sparkle_scale_update,
&svals.random_saturation);
gtk_widget_show (label);
gtk_widget_show (scale);
set_tooltip(tips,scale,"Adjust the Value how much the Saturation should be changed randomly");
label = gtk_label_new ("Preserve Luminosity");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 9, 10, GTK_FILL, 0, 5, 5);
gtk_widget_show(label);
toggle = gtk_check_button_new ();
gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 9, 10, GTK_FILL, 0, 0, 0);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (toggle), svals.preserve_luminosity);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) sparkle_toggle_update,
&svals.preserve_luminosity);
gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Should the Luminosity be preserved?");
label = gtk_label_new ("Invers");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 10, 11, GTK_FILL, 0, 5, 5);
gtk_widget_show(label);
toggle = gtk_check_button_new ();
gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 10, 11, GTK_FILL, 0, 0, 0);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (toggle), svals.invers);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) sparkle_toggle_update,
&svals.invers);
gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Should an Inverse Effect be done?");
label = gtk_label_new ("Add Border");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 11, 12, GTK_FILL, 0, 5, 5);
gtk_widget_show(label);
toggle = gtk_check_button_new ();
gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 11, 12, GTK_FILL, 0, 0, 0);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (toggle), svals.border);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) sparkle_toggle_update,
&svals.border);
gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Draw a Border of Spikes around the Image");
/* colortype */
label = gtk_label_new ("Natural Color");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 12, 13, GTK_FILL, 0, 5, 5);
gtk_widget_show(label);
toggle = gtk_radio_button_new (group);
gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 12, 13, GTK_FILL, 0, 0, 0);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (toggle), use_natural);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) sparkle_toggle_update,
&use_natural);
gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use the Color of the Image");
label = gtk_label_new ("Foreground Color");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 13, 14, GTK_FILL, 0, 5, 5);
gtk_widget_show(label);
toggle = gtk_radio_button_new (group);
gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 13, 14, GTK_FILL, 0, 0, 0);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (toggle), use_foreground);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) sparkle_toggle_update,
&use_foreground);
gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use the Foreground Color");
label = gtk_label_new ("Background Color");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 14, 15, GTK_FILL, 0, 5, 5);
gtk_widget_show(label);
toggle = gtk_radio_button_new (group);
gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 14, 15, GTK_FILL, 0, 0, 0);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (toggle), use_background);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) sparkle_toggle_update,
&use_background);
gtk_widget_show (toggle);
set_tooltip(tips,toggle,"Use the Background Color");
gtk_widget_show (frame);
gtk_widget_show (table);
@ -409,7 +672,16 @@ sparkle_dialog ()
gtk_main ();
gdk_flush ();
/* determine colortype */
if (use_natural)
svals.colortype = NATURAL;
else if (use_foreground)
svals.colortype = FOREGROUND;
else if (use_background)
svals.colortype = BACKGROUND;
return sint.run;
}
static gint
@ -417,21 +689,35 @@ compute_luminosity (guchar *pixel,
gint gray,
gint has_alpha)
{
gint pixel0, pixel1, pixel2;
if (svals.invers == FALSE)
{
pixel0 = pixel[0];
pixel1 = pixel[1];
pixel2 = pixel[2];
}
else
{
pixel0 = 255 - pixel[0];
pixel1 = 255 - pixel[1];
pixel2 = 255 - pixel[2];
}
if (gray)
{
if (has_alpha)
return (pixel[0] * pixel[1]) / 255;
return (pixel0 * pixel1) / 255;
else
return pixel[0];
return (pixel0);
}
else
{
gint min, max;
min = MIN (pixel[0], pixel[1]);
min = MIN (min, pixel[2]);
max = MAX (pixel[0], pixel[1]);
max = MAX (max, pixel[2]);
min = MIN (pixel0, pixel1);
min = MIN (min, pixel2);
max = MAX (pixel0, pixel1);
max = MAX (max, pixel2);
if (has_alpha)
return ((min + max) * pixel[3]) / 510;
@ -499,7 +785,7 @@ sparkle (GDrawable *drawable,
{
GPixelRgn src_rgn, dest_rgn;
guchar *src, *dest;
gdouble nfrac, length, inten;
gdouble nfrac, length, inten, spike_angle;
gint cur_progress, max_progress;
gint x1, y1, x2, y2;
gint size, lum, x, y, b;
@ -507,11 +793,14 @@ sparkle (GDrawable *drawable,
gint has_alpha, alpha;
gpointer pr;
guchar *tmp1;
gint tile_width, tile_height;
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
gray = gimp_drawable_gray (drawable->id);
has_alpha = gimp_drawable_has_alpha (drawable->id);
alpha = (has_alpha) ? drawable->bpp - 1 : drawable->bpp;
tile_width = gimp_tile_width();
tile_height = gimp_tile_height();
/* initialize the progress dialog */
cur_progress = 0;
@ -552,41 +841,56 @@ sparkle (GDrawable *drawable,
gimp_pixel_rgn_init (&src_rgn, drawable, x1, y1, (x2 - x1), (y2 - y1), FALSE, FALSE);
gimp_pixel_rgn_init (&dest_rgn, drawable, x1, y1, (x2 - x1), (y2 - y1), TRUE, TRUE);
for (pr = gimp_pixel_rgns_register (1, &src_rgn); pr != NULL; pr = gimp_pixel_rgns_process (pr))
for (pr = gimp_pixel_rgns_register (2, &src_rgn, &dest_rgn); pr != NULL; pr = gimp_pixel_rgns_process (pr))
{
src = src_rgn.data;
for (y = 0; y < src_rgn.h; y++)
for (x = 0; x < src_rgn.w; x++)
{
if (svals.border)
{
if (x + src_rgn.x == 0 || y + src_rgn.y == 0
|| x + src_rgn.x == drawable->width - 1
|| y + src_rgn.y == drawable->height - 1)
lum = 255;
else
lum = 0;
}
else
lum = compute_luminosity (src, gray, has_alpha);
if (lum >= threshold)
{
nfrac = fabs ((gdouble) (lum + 1 - threshold) / (gdouble) (256 - threshold));
length = svals.spike_len * pow (nfrac, 0.8);
length = (gdouble) svals.spike_len * (gdouble) pow (nfrac, 0.8);
inten = svals.flare_inten * pow (nfrac, 1.0);
/* fspike im x,y intens rlength angle */
if (svals.spike_pts > 0)
{
/* major spikes */
if (svals.spike_angle == -1)
spike_angle = 360.0 * rand () / RAND_MAX;
else
spike_angle = svals.spike_angle;
if (rand() <= RAND_MAX * svals.density)
{
fspike (&dest_rgn, gray, x1, y1, x2, y2,
x + src_rgn.x, y + src_rgn.y,
inten, length, svals.spike_angle);
tile_width, tile_height,
inten, length, spike_angle);
/* minor spikes */
fspike (&dest_rgn, gray, x1, y1, x2, y2,
x + src_rgn.x, y + src_rgn.y,
tile_width, tile_height,
inten * 0.7, length * 0.7,
(svals.spike_angle + 180.0 / svals.spike_pts));
((gdouble) spike_angle + 180.0 / svals.spike_pts));
}
}
cur_progress ++;
if ((cur_progress % 5) == 0)
gimp_progress_update ((double) cur_progress / (double) max_progress);
}
src += src_rgn.bpp;
}
}
@ -608,27 +912,27 @@ fspike (GPixelRgn *dest_rgn,
gint y2,
gdouble xr,
gdouble yr,
gint tile_width,
gint tile_height,
gdouble inten,
gdouble length,
gdouble angle)
{
gdouble xrt, yrt, dx, dy;
gdouble rpos;
gdouble in[MAX_CHANNELS];
gdouble val[MAX_CHANNELS];
gdouble ho = 1.0, so = 1.0, vo = 1.0;
gdouble in;
gdouble theta, efac;
gdouble sfac;
gdouble *gd_tmp1, *gd_tmp2;
guchar *guc_tmp;
gdouble r, g, b;
gdouble h, s, l;
GTile *tile = NULL;
gint row, col;
gint i;
gint bytes;
gint x, y;
gint ok;
gint b;
guchar pixel[MAX_CHANNELS];
guchar color[MAX_CHANNELS];
theta = angle;
efac = 2.0; /* exponent on intensity falloff with radius */
@ -644,18 +948,41 @@ fspike (GPixelRgn *dest_rgn,
gimp_pixel_rgn_get_pixel (dest_rgn, pixel, x, y);
for (b = 0, gd_tmp1 = val, guc_tmp = pixel; b < bytes; b++)
*gd_tmp1++ = (gdouble) (gint)(*guc_tmp++) / 255.0;
/* increase saturation to full for color image */
if (! gray)
if (svals.colortype == FOREGROUND)
gimp_palette_get_foreground (&color[0], &color[1], &color[2]);
else if (svals.colortype == BACKGROUND)
gimp_palette_get_background (&color[0], &color[1], &color[2]);
else
{
rgb_to_hsl (val[0], val[1], val[2], &ho, &so, &vo);
hsl_to_rgb (ho, 1.0, vo, &val[0], &val[1], &val[2]);
color[0] = pixel[0];
color[1] = pixel[1];
color[2] = pixel[2];
}
if (svals.invers != FALSE)
{
color[0] = 255 - color[0];
color[1] = 255 - color[1];
color[2] = 255 - color[2];
}
if (svals.random_hue != 0.0 || svals.random_saturation != 0.0)
{
r = color[0] / 255.0;
g = color[1] / 255.0;
b = color[2] / 255.0;
rgb_to_hsl(r, g, b, &h, &s, &l);
h = h + svals.random_hue * ((gdouble) rand() / (gdouble) RAND_MAX - 0.5);
if (h >= 1.0) h -= 1.0;
else if (h < 0) h += 1.0;
s = s + svals.random_saturation * (2 * (gdouble) rand() / (gdouble) RAND_MAX - 1.0);
if (s > 1.0) s = 1.0;
hsl_to_rgb(h, s, l, &r, &g, &b);
color[0] = r * 255.0;
color[1] = g * 255.0;
color[2] = b * 255.0;
}
dx = 0.2 * cos (theta * G_PI / 180.0);
dy = 0.2 * sin (theta * G_PI / 180.0);
dx = 0.2 * cos (theta * M_PI / 180.0);
dy = 0.2 * sin (theta * M_PI / 180.0);
xrt = xr;
yrt = yr;
rpos = 0.2;
@ -664,20 +991,16 @@ fspike (GPixelRgn *dest_rgn,
{
sfac = exp (-pow (rpos / length, efac));
sfac = sfac * inten;
ok = FALSE;
for (b = 0, gd_tmp1 = in, gd_tmp2 = val; b < bytes;
b++, gd_tmp1++, gd_tmp2++)
{
*gd_tmp1 = 0.2 * (*gd_tmp2) * sfac;
if (*gd_tmp1 > 0.01)
ok = TRUE;
}
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt, yrt, &row, &col, bytes, in);
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt + 1, yrt, &row, &col, bytes, in);
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt + 1, yrt + 1, &row, &col, bytes, in);
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt, yrt + 1, &row, &col, bytes, in);
in = 0.2 * sfac;
if (in > 0.01)
ok = TRUE;
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt, yrt, tile_width, tile_height, &row, &col, bytes, in, color);
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt + 1, yrt, tile_width, tile_height, &row, &col, bytes, in, color);
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt + 1, yrt + 1, tile_width, tile_height, &row, &col, bytes, in, color);
tile = rpnt (dest_rgn->drawable, tile, x1, y1, x2, y2, xrt, yrt + 1, tile_width, tile_height, &row, &col, bytes, in, color);
xrt += dx;
yrt += dy;
@ -700,45 +1023,75 @@ rpnt (GDrawable *drawable,
gint y2,
gdouble xr,
gdouble yr,
gint tile_width,
gint tile_height,
gint *row,
gint *col,
gint bytes,
gdouble *inten)
gdouble inten,
guchar color[MAX_CHANNELS])
{
gint x, y, b;
gdouble dx, dy, rs, fac;
gdouble val;
gdouble dx, dy, rs, val;
guchar *pixel;
guchar *guc_tmp;
gdouble *gd_tmp;
gdouble new;
gint newcol, newrow;
gint newcoloff, newrowoff;
x = (int) (xr); /* integer coord. to upper left of real point */
y = (int) (yr);
if (x >= x1 && y >= y1 && x < x2 && y < y2)
{
if ((x >> 6 != *col) || (y >> 6 != *row))
newcol = x / tile_width;
newcoloff = x % tile_width;
newrow = y / tile_height;
newrowoff = y % tile_height;
if ((newcol != *col) || (newrow != *row))
{
*col = x >> 6;
*row = y >> 6;
*col = newcol;
*row = newrow;
if (tile)
gimp_tile_unref (tile, TRUE);
tile = gimp_drawable_get_tile (drawable, TRUE, *row, *col);
gimp_tile_ref (tile);
}
pixel = tile->data + tile->bpp * (tile->ewidth * (y % 64) + (x % 64));
pixel = tile->data + tile->bpp * (tile->ewidth * newrowoff + newcoloff);
dx = xr - x; dy = yr - y;
rs = dx * dx + dy * dy;
fac = exp (-rs / PSV);
val = inten * exp (-rs / PSV);
for (b = 0, guc_tmp = pixel, gd_tmp = inten; b < bytes;
b++, guc_tmp++, gd_tmp++)
for (b = 0; b < bytes; b++)
{
val = (*gd_tmp) * fac;
val += (gdouble) *guc_tmp / 255.0;
if (val > 1.0) val = 1.0;
*guc_tmp = (guchar) (val * 255.0);
if (svals.invers == FALSE)
new = pixel[b];
else
new = 255 - pixel[b];
if (svals.preserve_luminosity==TRUE)
{
if (new < color[b])
new *= (1.0 - val * svals.opacity);
else
{
new -= val * color[b] * svals.opacity;
if (new < 0.0)
new = 0.0;
}
}
new *= 1.0 - val * (1.0 - svals.opacity);
new += val * color[b];
if (new > 255) new = 255;
else new = new;
if (svals.invers != FALSE)
pixel[b] = 255 - new;
else
pixel[b] = new;
}
}
@ -869,3 +1222,22 @@ sparkle_scale_update (GtkAdjustment *adjustment,
{
*scale_val = adjustment->value;
}
static void
sparkle_toggle_update (GtkWidget *widget,
gpointer data)
{
int *toggle_val;
toggle_val = (int *) data;
if (GTK_TOGGLE_BUTTON (widget)->active)
*toggle_val = TRUE;
else
*toggle_val = FALSE;
}
static void
set_tooltip (GtkTooltips *tooltips, GtkWidget *widget, const char *desc)
{
if (desc && desc[0])
gtk_tooltips_set_tip (tooltips, widget, (char *) desc, NULL);
}

1922
plug-ins/common/warp.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@
(plug-in-noisify 1 img sparkle-layer FALSE 0.2 0.2 0.2 0.0)
(plug-in-c-astretch 1 img sparkle-layer)
(gimp-selection-none img)
(plug-in-sparkle 1 img sparkle-layer 0.03 0.45 (/ (min width height) 2) 6 15)
(plug-in-sparkle 1 img sparkle-layer 0.03 0.45 (/ (min width height) 2) 6 15 1.0 1.0 0.0 0.0 FALSE FALSE FALSE 0)
(gimp-levels sparkle-layer 1 0 255 0.2 0 255)
(gimp-levels sparkle-layer 2 0 255 0.7 0 255)
(gimp-selection-layer-alpha sparkle-layer)

View File

@ -45,7 +45,7 @@
(gimp-edit-fill layer-mask)
(gimp-selection-none img)
(plug-in-nova 1 img burst-layer (car burst-coords) (cdr burst-coords)
burst-color burstradius 100)
burst-color burstradius 100 0)
(gimp-selection-layer-alpha text-layer)
(gimp-palette-set-background '(0 0 0))

View File

@ -88,7 +88,7 @@
(gimp-palette-set-foreground '(255 255 255))
(gimp-blend text-layer FG-BG-RGB NORMAL BILINEAR 100 0 REPEAT-NONE FALSE 0 0 cx cy bx by)
(plug-in-nova 1 img glow-layer novax novay glow-color novaradius 100)
(plug-in-nova 1 img glow-layer novax novay glow-color novaradius 100 0)
(gimp-selection-all img)
(gimp-patterns-set-pattern "Stone")

View File

@ -38,7 +38,7 @@
(gimp-selection-border img edge-size)
(plug-in-noisify 1 img sparkle-layer FALSE hit-rate hit-rate hit-rate 0.0)
(gimp-selection-none img)
(plug-in-sparkle 1 img sparkle-layer 0.03 0.45 width 6 15)
(plug-in-sparkle 1 img sparkle-layer 0.03 0.45 width 6 15 1.0 1.0 0.0 0.0 FALSE FALSE FALSE 0)
(gimp-selection-load selection)
(gimp-selection-shrink img edge-size)
(gimp-levels sparkle-layer 0 0 255 1.2 0 255)