From 2a448802b7a8683cbfed601f2d6f7e4aaafca845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 13 Jul 2009 19:08:01 +0300 Subject: Add support for building with GraphicsMagick. --- HISTORY | 1 + Makefile | 9 ++++++++- README | 19 ++++++++++--------- README.de | 2 +- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/HISTORY b/HISTORY index 56cb96a..e65e3d1 100644 --- a/HISTORY +++ b/HISTORY @@ -91,6 +91,7 @@ ____-__-__: Version 1.3 renamed to something so they will be used instead of the original if it happens to be installed. (closes #36) - Compile internal image quantizing code only in Imlib2 builds. +- Add support for building with GraphicsMagick. 2009-06-01: Version 1.2 diff --git a/Makefile b/Makefile index b555043..3d2d7e7 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,9 @@ STRIP=strip # Text2Skin if you use Imlib2! (That's why I actually implemented ImageMagick) # TBD: is this still true? -# Define only one of these. +# Define only one of these, leave others commented out. HAVE_IMAGEMAGICK=1 +#HAVE_GRAPHICSMAGICK=1 #HAVE_IMLIB2=1 # not recommended @@ -82,6 +83,12 @@ ifdef HAVE_IMAGEMAGICK LIBS += $(shell pkg-config --libs ImageMagick++) endif +ifdef HAVE_GRAPHICSMAGICK + DEFINES += -DHAVE_IMAGEMAGICK # yep, really HAVE_IMAGEMAGICK + INCLUDES += $(shell pkg-config --cflags GraphicsMagick++) + LIBS += $(shell pkg-config --libs GraphicsMagick++) +endif + ifdef DEBUG CXXFLAGS += -g -fno-inline DEFINES += -DDEBUG diff --git a/README b/README index ed86e37..7562090 100644 --- a/README +++ b/README @@ -24,27 +24,28 @@ Prerequisites: -------------- For loading images in format other than simple XPM, you will need an image -library. You can choose between two supported libraries, ImageMagick or Imlib2, -from which the first one is the default. You can specify which library to use -(if any) in the first few lines of the Makefile. Here is an overview of the -advantages and drawbacks of each solution: +library. You can choose between three supported libraries, ImageMagick, +GraphicsMagick or Imlib2, of which the first one is the default. You can +specify which library to use (if any) in the first few lines of the Makefile. +Here is an overview of the advantages and drawbacks of each solution: No library - you can only load XPM files - XPMs don't support partial transparency / alpha channels -ImageMagick +ImageMagick and GraphicsMagick + you can load many different image types including animations Imlib2 + you can load many different image types - CRASHES WHEN USED TOGETHER WITH THE GRAPHTFT-PLUGIN! -Using both libraries at the same time doesn't make sense anyway. +Using more than one of the above at the same time doesn't make sense, just +choose one or none. -HINT: Although the manual of ImageMagick claims that the used library Magick++ -is part of the source distribution, some binary distributions may have to -install Magick++ separately. +HINT: Although the manuals of ImageMagick and GraphicsMagick claim that the +used library Magick++ is part of the source distribution, some binary +distributions may have to install Magick++ separately. The Makefile uses pkg-config by default to find out the necessary compiler, preprocessor and linker flags and libraries for the above, so you'll need it diff --git a/README.de b/README.de index 934695f..acf4e1a 100644 --- a/README.de +++ b/README.de @@ -36,7 +36,7 @@ Keine Bibliothek - Sie können nur XPM Dateien laden - XPMs haben weder Teiltransparenzen noch Alphakanäle -ImageMagick +ImageMagick oder GraphicsMagick + Sie können viele verschiedene Bildformate laden - ist aber etwas langsamer als Imlib2 -- cgit v1.2.3