diff options
-rw-r--r-- | CHANGES.LOG | 3 | ||||
-rw-r--r-- | Makefile.in | 16 | ||||
-rw-r--r-- | configure.ac | 23 | ||||
-rw-r--r-- | include/xwindow-private.h | 52 | ||||
-rw-r--r-- | modules/Makefile.in | 2 | ||||
-rw-r--r-- | modules/pdp_capture.c | 1 |
6 files changed, 72 insertions, 25 deletions
diff --git a/CHANGES.LOG b/CHANGES.LOG index f878340..5c867c4 100644 --- a/CHANGES.LOG +++ b/CHANGES.LOG @@ -1,3 +1,6 @@ +0.12.22 ( codename Visual Junk ) + added pdp_dot : matrix printer effect + 0.12.21 ( codename Sa'ha Pidip ) fixed synchronisation in pdp_theonice~ diff --git a/Makefile.in b/Makefile.in index 567d3bf..8351e5a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -5,8 +5,6 @@ FFMPEG_SOURCE_DIR = @FFMPEG_SOURCE_DIR@ PDP_PIDIP_LIBS = @PDP_PIDIP_LIBS@ IMLIB_CFLAGS = @IMLIB_CFLAGS@ IMLIB_LIBS = @IMLIB_LIBS@ -MAGICK_CFLAGS = @MAGICK_CFLAGS@ -MAGICK_LIBS = @MAGICK_LIBS@ THEORA_LIBS = @THEORA_LIBS@ PDP_PIDIP_INCLUDES = @PDP_PIDIP_INCLUDES@ PDP_PIDIP_VERSION = @PDP_PIDIP_VERSION@ @@ -16,13 +14,13 @@ PDP_PIDIP_DISTRO = /mnt/c/ydegoyon.free.fr/pidip-$(PDP_PIDIP_VERSION) PDP_PIDIP_TARBALL = $(PDP_PIDIP_DISTRO).tar.gz -PDP_PIDIP_CFLAGS = $(MPEG4IP_CFLAGS) $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ +PDP_PIDIP_CFLAGS = $(MPEG4IP_CFLAGS) $(IMLIB_CFLAGS) \ -DPD -DX_DISPLAY_MISSING -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ -Wall -W -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch \ -DPDP_PIDIP_VERSION=\"$(PDP_PIDIP_VERSION)\" -g -PDP_PIDIP_CPPFLAGS = $(MPEG4IP_CFLAGS) $(MAGICK_CFLAGS) $(IMLIB_CFLAGS) \ +PDP_PIDIP_CPPFLAGS = $(MPEG4IP_CFLAGS) $(IMLIB_CFLAGS) \ -DPD -DX_DISPLAY_MISSING -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ -Wall -W -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch \ @@ -42,12 +40,12 @@ pdp_pidip_all: pidip.pd_darwin: pdp_pidip_all rm -f pidip.pd_darwin - g++ -bundle -undefined dynamic_lookup -headerpad_max_install_names -o pidip.pd_darwin modules/*.o system/*.o -L/sw/lib $(THEORA_LIBS) $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS) + g++ -bundle -undefined dynamic_lookup -headerpad_max_install_names -o pidip.pd_darwin modules/*.o system/*.o -L/sw/lib $(THEORA_LIBS) $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) strip -x pidip.pd_darwin pidip.pd_linux: pdp_pidip_all rm -f pidip.pd_linux - g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(THEORA_LIBS) $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) $(MAGICK_LIBS) + g++ -export_dynamic -shared -o pidip.pd_linux modules/*.o system/*.o $(THEORA_LIBS) $(PDP_PIDIP_LIBS) $(IMLIB_LIBS) strip --strip-unneeded pidip.pd_linux clean: @@ -69,10 +67,10 @@ distro: clean all pdp_colorgrid.o: pdp_colorgrid.c ./tk2c.bash < $*.tk > $*.tk2c - PWD=`pwd`; cc -DPWD=\"$(PWD)\" $(PDP_PIDIP_CFLAGS) $(PDP_PIDIP_INCLUDES) -o $*.o -c $*.c + PWD=`pwd`; cc -DPWD=\"$(PWD)\" $(PDP_PIDIP_INCLUDES) $(PDP_PIDIP_CFLAGS) -o $*.o -c $*.c .c.o: - gcc $(PDP_PIDIP_CFLAGS) $(PDP_PIDIP_INCLUDES) -o $*.o -c $*.c + gcc $(PDP_PIDIP_INCLUDES) $(PDP_PIDIP_CFLAGS) -o $*.o -c $*.c .cpp.o: - g++ $(PDP_PIDIP_CPPFLAGS) $(PDP_PIDIP_INCLUDES) -o $*.o -c $*.cpp + g++ $(PDP_PIDIP_INCLUDES) $(PDP_PIDIP_CPPFLAGS) -o $*.o -c $*.cpp diff --git a/configure.ac b/configure.ac index 00b5c78..a81d35a 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT AC_CANONICAL_HOST AC_CONFIG_HEADER(include/pidip_config.h) -PDP_PIDIP_VERSION="0.12.21" +PDP_PIDIP_VERSION="0.12.22" PD_DIR=/usr/local/pd PDP_DIR=/usr/local/pd/pdp FFMPEG_SOURCE_DIR=/SOURCES/ffmpeg @@ -18,6 +18,7 @@ MAGIC_CFLAGS= THEORA_LIBS= enable_ffmpeg=no enable_mpeg4ip=no +enable_lcapture=no # Check for DarwinPorts and/or Fink on Mac OS X/Darwin case "$host" in @@ -65,6 +66,12 @@ then fi fi +AC_ARG_WITH(enable-capture, [ --enable-capture capture optional object ( only works with Image Magick <= 6.0.7 )]) +if ! test -z "${enable_capture}" +then + enable_lcapture=yes +fi + AC_ARG_WITH(ffmpeg, [ --with-ffmpeg=PATH ffmpeg source tree]) if ! test -z "${with_ffmpeg}" then @@ -116,8 +123,7 @@ AC_PATH_GENERIC(imlib2, 1.0.0, AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path?) ) AC_CHECK_LIB(Magick, XWindowByProperty, - [ PDP_CAPTURE_OBJECT="$PDP_CAPTURE_OBJECT pdp_capture.o" - AC_DEFINE(HAVE_IMAGE_MAGICK, 1, image magick capture capability) + [ PDP_CAPTURE_OBJECT="$PDP_CAPTURE_OBJECT" MAGICK_LIBS="-L/usr/X11R6/lib -lMagick `Magick-config --libs` `Magick-config --ldflags`" MAGICK_CFLAGS="-I/usr/X11R6/include `Magick-config --cflags` " ], echo "Image Magick not found : not building pdp_capture", @@ -215,6 +221,15 @@ else exit -1 fi +if test $enable_lcapture == yes; +then + PDP_CAPTURE_OBJECT="pdp_capture.o" + AC_DEFINE(HAVE_IMAGE_MAGICK, 1, image magick capture capability) + PDP_PIDIP_LIBS="$MAGICK_LIBS $PDP_PIDIP_LIBS" + PDP_PIDIP_INCLUDES="$MAGICK_CFLAGS $PDP_PIDIP_INCLUDES" + echo "building pdp_capture." +fi + if test $enable_ffmpeg == yes; then echo -n "looking for ffmpeg sources (required) ... " @@ -252,8 +267,6 @@ then fi AC_SUBST(PDP_PIDIP_VERSION) -AC_SUBST(MAGICK_LIBS) -AC_SUBST(MAGICK_CFLAGS) AC_SUBST(IMLIB_LIBS) AC_SUBST(IMLIB_CFLAGS) AC_SUBST(THEORA_LIBS) diff --git a/include/xwindow-private.h b/include/xwindow-private.h index 228f694..f6e3d4b 100644 --- a/include/xwindow-private.h +++ b/include/xwindow-private.h @@ -1,11 +1,11 @@ /* - Copyright 1999-2005 ImageMagick Studio LLC, a non-profit organization + Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. You may not use this file except in compliance with the License. obtain a copy of the License at - http://www.imagemagick.org/www/Copyright.html + http://www.imagemagick.org/script/license.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,16 +13,16 @@ See the License for the specific language governing permissions and limitations under the License. - ImageMagick X11 window methods. + MagickCore X11 window methods. */ -#ifndef _MAGICK_XWINDOW_PRIVATE_H -#define _MAGICK_XWINDOW_PRIVATE_H +#ifndef _MAGICKCORE_XWINDOW_PRIVATE_H +#define _MAGICKCORE_XWINDOW_PRIVATE_H #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif -#if defined(HasX11) +#if defined(MAGICKCORE_X11_DELEGATE) #include <X11/Xos.h> #include <X11/Xlib.h> @@ -31,6 +31,8 @@ extern "C" { #include <X11/keysym.h> #include <X11/Xresource.h> #include <X11/Xutil.h> +#include "magick/exception.h" +#include "magick/geometry.h" #include "magick/quantize.h" #if defined(__cplusplus) || defined(c_plusplus) @@ -64,6 +66,25 @@ extern "C" { #define MaxNumberPens 11 #define MaxNumberFonts 11 #define MaxXWindows 12 +#undef index + +#define ThrowXWindowException(severity,tag,context) \ +{ \ + ExceptionInfo \ + exception; \ + \ + GetExceptionInfo(&exception); \ + (void) ThrowMagickException(&exception,GetMagickModule(),severity, \ + tag == (const char *) NULL ? "unknown" : tag,"`%s': %s",context, \ + strerror(errno)); \ + CatchException(&exception); \ + (void) DestroyExceptionInfo(&exception); \ +} +#define ThrowXWindowFatalException(severity,tag,context) \ +{ \ + ThrowXWindowException(severity,tag,context); \ + _exit(1); \ +} typedef enum { @@ -243,12 +264,15 @@ typedef struct _XResourceInfo colormap; unsigned int - border_width, + border_width; + + unsigned long delay; MagickBooleanType color_recovery, - confirm_exit; + confirm_exit, + confirm_edit; char *display_gamma; @@ -492,12 +516,11 @@ extern MagickExport int XError(Display *,XErrorEvent *); extern MagickExport MagickBooleanType - IsTrue(const char *), XAnnotateImage(Display *,const XPixelInfo *,XAnnotateInfo *,Image *), XDrawImage(Display *,const XPixelInfo *,XDrawInfo *,Image *), XGetWindowColor(Display *,XWindows *,char *), XMagickProgressMonitor(const char *,const MagickOffsetType, - const MagickSizeType,void *), + const MagickSizeType,void *), XMakeImage(Display *,const XResourceInfo *,XWindowInfo *,Image *,unsigned int, unsigned int), XQueryColorDatabase(const char *,XColor *), @@ -559,6 +582,15 @@ extern MagickExport XWindows *XInitializeWindows(Display *,XResourceInfo *), *XSetWindows(XWindows *); +static inline MagickRealType XPixelIntensity(const XColor *pixel) +{ + MagickRealType + intensity; + + intensity=0.299*pixel->red+0.587*pixel->green+0.114*pixel->blue; + return(intensity); +} + #endif #if defined(__cplusplus) || defined(c_plusplus) diff --git a/modules/Makefile.in b/modules/Makefile.in index db3083a..6be8198 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -20,7 +20,7 @@ OBJECTS = pdp_intrusion.o pdp_yqt.o pdp_simura.o pdp_underwatch.o \ pdp_disintegration.o pdp_distance.o pdp_theorin~.o \ pdp_theorout~.o pdp_cropper.o pdp_background.o \ pdp_mapper.o pdp_theonice~.o pdp_icedthe~.o\ - pdp_fdiff.o pdp_hue.o pdp_qtext.o \ + pdp_fdiff.o pdp_hue.o pdp_dot.o pdp_qtext.o \ @PDP_CAPTURE_OBJECT@ @PDP_STREAMING_OBJECTS@ # pdp_xcanvas.o pdp_aa.o all_modules: $(OBJECTS) diff --git a/modules/pdp_capture.c b/modules/pdp_capture.c index 4386c6c..279a9a7 100644 --- a/modules/pdp_capture.c +++ b/modules/pdp_capture.c @@ -39,6 +39,7 @@ // trick to handle Image Magick compatibility #if MagickLibVersion >= 0x618 #include "../include/xwindow-private.h" +#include "../include/quantum-private.h" #endif static char *pdp_capture_version = "pdp_capture: version 0.1, capture of screen written by Yves Degoyon (ydegoyon@free.fr)"; |