diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/NOTES b/NOTES index 87b1085..648a732 100644 --- a/NOTES +++ b/NOTES @@ -1,12 +1,29 @@ -Nothing really exciting in this document, just a few notes about cool -stuff already in the library and the accompanying examples. -Having fun with pipi -==================== +printf("%i,%i[%i] %g -> %i + %g\n", x, y, i, p, (int)d, e); -Convert a picture to black and white using the best available algorithm: - $ pipi source.png --dither dbs -o image.png +---- +perfs for pipi random:256x256 --wrap --median X: -Generate a brushed metal, tileable pattern: - $ pipi pipi:random512x512 --wrap --blur 15x0r15 -o image.png +X = 1 X = 2 X = 3 X = 4 X = 5 X = 6 +0.133 0.458 1.288 3.066 6.370 11.931 +0.127 0.435 1.289 3.062 6.355 11.944 +0.128 0.445 1.282 3.053 6.354 11.916 +0.120 0.432 1.264 3.089 6.362 11.938 +0.120 0.436 1.292 3.048 6.366 11.911 + +after switching to qsort: +X = 1 X = 2 X = 3 X = 4 X = 5 X = 6 X = 7 X = 8 +0.257 0.733 1.519 2.704 4.192 6.143 8.193 10.880 +0.241 0.731 1.541 2.709 4.179 6.172 8.194 10.889 +0.243 0.736 1.540 2.728 4.174 6.123 8.221 10.824 +0.241 0.725 1.530 2.706 4.161 6.135 8.288 10.791 +0.241 0.725 1.528 2.733 4.168 6.142 8.208 10.805 + +my qsort: +X = 1 X = 2 X = 3 X = 4 X = 5 X = 6 X = 7 X = 8 +0.161 0.438 0.974 1.856 3.155 5.041 7.637 11.191 +0.157 0.427 0.971 1.840 3.138 5.047 7.641 11.170 +0.156 0.438 0.972 1.845 3.146 5.040 7.650 11.165 +0.164 0.437 0.969 1.839 3.150 5.025 7.647 11.119 +0.164 0.450 0.968 1.834 3.152 5.043 7.651 11.097 diff --git a/README b/README new file mode 100644 index 0000000..87b1085 --- /dev/null +++ b/README @@ -0,0 +1,12 @@ +Nothing really exciting in this document, just a few notes about cool +stuff already in the library and the accompanying examples. + +Having fun with pipi +==================== + +Convert a picture to black and white using the best available algorithm: + $ pipi source.png --dither dbs -o image.png + +Generate a brushed metal, tileable pattern: + $ pipi pipi:random512x512 --wrap --blur 15x0r15 -o image.png + diff --git a/TODO b/TODO new file mode 100644 index 0000000..d182ee9 --- /dev/null +++ b/TODO @@ -0,0 +1,10 @@ + +The TODO list is on the web: + http://caca.zoy.org/wiki/libpipi/research/filters + http://caca.zoy.org/wiki/libpipi/research/gamut + http://caca.zoy.org/wiki/libpipi/research/warping + http://caca.zoy.org/wiki/libpipi/research/coolstuff + +See also the libpipi tickets: + http://caca.zoy.org/report/1 + diff --git a/ThePimp/.gitignore b/ThePimp/.gitignore index b5e68a1..f0fb3f1 100644 --- a/ThePimp/.gitignore +++ b/ThePimp/.gitignore @@ -3,3 +3,4 @@ *.exe pipi-sharp.dll pipi-sharp.dll.* +pimp diff --git a/ThePimp/Makefile.am b/ThePimp/Makefile.am index a6e37ea..f199bc4 100644 --- a/ThePimp/Makefile.am +++ b/ThePimp/Makefile.am @@ -1,5 +1,7 @@ # $Id: $ +pkglibdir = $(libdir)/ThePimp + pimp_sources = \ AssemblyInfo.cs \ Main.cs \ @@ -30,7 +32,8 @@ image_sources = \ images/about.svg if USE_CSHARP -bin_SCRIPTS = ThePimp.exe +pkglib_DATA = ThePimp.exe +bin_SCRIPTS = pimp endif if USE_GTKSHARP diff --git a/ThePimp/pimp.in b/ThePimp/pimp.in new file mode 100644 index 0000000..d1fda03 --- /dev/null +++ b/ThePimp/pimp.in @@ -0,0 +1,12 @@ +#!/bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +pimpdir=@libdir@/ThePimp + +case "$0" in + @bindir@/*) exec mono "${pimpdir}/ThePimp.exe" "$@" ;; + */*) exec mono "@abs_srcdir@/ThePimp.exe" "$@" ;; + *) exec mono "${pimpdir}/ThePimp.exe" "$@" ;; +esac + diff --git a/configure.ac b/configure.ac index bf88938..64a845b 100644 --- a/configure.ac +++ b/configure.ac @@ -176,7 +176,8 @@ AC_SUBST(MATH_LIBS) # Build pipi-sharp? AC_PATH_PROG(GMCS, gmcs, no) -AM_CONDITIONAL(USE_CSHARP, test "${GMCS}" != "no") +AC_PATH_PROG(GACUTIL, gacutil, no) +AM_CONDITIONAL(USE_CSHARP, test "${GMCS}" != "no" -a "${GACUTIL}" != "no") # Build The Pimp? ac_cv_my_have_gtksharp=yes @@ -202,6 +203,7 @@ AC_CONFIG_FILES([ pipi-sharp/pipi-sharp.pc pipi-sharp/pipi-sharp.dll.config ]) +AC_CONFIG_FILES([ThePimp/pimp], [chmod +x ThePimp/pimp]) AC_OUTPUT diff --git a/pipi-sharp/AssemblyInfo.cs b/pipi-sharp/AssemblyInfo.cs index dde3f10..9edc2a7 100644 --- a/pipi-sharp/AssemblyInfo.cs +++ b/pipi-sharp/AssemblyInfo.cs @@ -36,4 +36,4 @@ using System.Runtime.CompilerServices; // if desired. See the Mono documentation for more information about signing. [assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyFile("pipi-sharp.snk")] diff --git a/pipi-sharp/Makefile.am b/pipi-sharp/Makefile.am index 9386661..7329656 100644 --- a/pipi-sharp/Makefile.am +++ b/pipi-sharp/Makefile.am @@ -1,6 +1,11 @@ # $Id: $ -pipidir = $(libdir)/pipi-sharp +# We need to install the .config file ourselves because of a gacutil +# bug (https://bugzilla.novell.com/show_bug.cgi?id=363341) +monodir = $(libdir)/mono/pipi-sharp-0.0 +if USE_CSHARP +noinst_DATA = pipi-sharp.dll pipi-sharp.dll.config test.exe +endif pipi_sources = \ $(srcdir)/AssemblyInfo.cs \ @@ -10,13 +15,8 @@ pipi_sources = \ test_sources = \ $(srcdir)/test.cs -if USE_CSHARP -pipi_DATA = pipi-sharp.dll pipi-sharp.dll.config -noinst_DATA = test.exe -endif - EXTRA_DIST = $(pipi_sources) $(test_sources) \ - pipi-sharp.pc.in pipi-sharp.dll.config.in + pipi-sharp.snk pipi-sharp.pc.in pipi-sharp.dll.config.in pipi-sharp.dll: $(pipi_sources) $(GMCS) -debug -unsafe $(pipi_sources) -out:$@ -target:library @@ -25,6 +25,20 @@ test.exe: $(test_sources) pipi-sharp.dll $(GMCS) -debug $(test_sources) -out:$@ -lib:./ \ -r:./pipi-sharp.dll +if USE_CSHARP +install-data-local: + MONO_SHARED_DIR=$$HOME $(GACUTIL) -i pipi-sharp.dll \ + -package pipi-sharp-0.0 -f -root $(DESTDIR)$(libdir) + $(mkinstalldirs) $(DESTDIR)$(monodir) + sed -e 's@target="[^"]*/@target="@' < pipi-sharp.dll.config > $(DESTDIR)$(monodir)/pipi-sharp.dll.config + +uninstall-local: + MONO_SHARED_DIR=$$HOME $(GACUTIL) -u pipi-sharp.dll, Version=0.0 \ + -package pipi-sharp-0.0 || true + rm -f $(DESTDIR)$(monodir)/pipi-sharp.dll.config + rmdir $(DESTDIR)$(monodir) 2>/dev/null || true +endif + clean-local: rm -f *.exe *.dll *.mdb diff --git a/pipi-sharp/pipi-sharp.snk b/pipi-sharp/pipi-sharp.snk new file mode 100644 index 0000000..49a6067 Binary files /dev/null and b/pipi-sharp/pipi-sharp.snk differ