[q-lang-cvs] q/modules/magick README-Magick,1.7,1.8 magick.c,1.40,1.41 magick.q,1.32,1.33
Brought to you by:
agraef
From: <ag...@us...> - 2004-01-06 01:03:15
|
Update of /cvsroot/q-lang/q/modules/magick In directory sc8-pr-cvs1:/tmp/cvs-serv733/modules/magick Modified Files: README-Magick magick.c magick.q Log Message: make magick module work with IM 4.4.7 Index: README-Magick =================================================================== RCS file: /cvsroot/q-lang/q/modules/magick/README-Magick,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** README-Magick 2 Jan 2004 07:38:12 -0000 1.7 --- README-Magick 6 Jan 2004 01:03:07 -0000 1.8 *************** *** 12,18 **** The module requires that you have ImageMagick installed, which should be ! readily available in most Linux distributions; ImageMagick installers for ! Windows are available from http://www.imagemagick.org/. At present a fairly ! recent ImageMagick version (>= 5.5) is required. Please see magick.q for a description of the functions provided by this --- 12,18 ---- The module requires that you have ImageMagick installed, which should be ! readily available in most Linux distributions; installers for Windows are ! available from http://www.imagemagick.org/. Versions >= 5.4.7 have been ! tested, older versions might require some work. Please see magick.q for a description of the functions provided by this *************** *** 25,29 **** Enjoy! :) ! Jan 2 2004 Albert Graef ag...@mu..., Dr....@t-... --- 25,29 ---- Enjoy! :) ! Jan 6 2004 Albert Graef ag...@mu..., Dr....@t-... Index: magick.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/magick/magick.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** magick.c 5 Jan 2004 05:28:35 -0000 1.40 --- magick.c 6 Jan 2004 01:03:07 -0000 1.41 *************** *** 67,70 **** --- 67,79 ---- #include <magick/api.h> + #if MagickLibVersion < 0x550 + #define ScaleQuantumToChar(quantum) Downscale(quantum) + #define PixelIntensityToQuantum(color) Intensity(color) + #define RLECompression RunlengthEncodedCompression + #define ScaleCharToQuantum(value) Upscale(value) + #define ScaleShortToQuantum(value) XDownscale(value) + #define ScaleQuantumToShort(quantum) XUpscale(quantum) + #endif + MODULE(magick) *************** *** 283,286 **** --- 292,296 ---- FUNCTION(magick,magick_limit,argc,argv) { + #if MagickLibVersion >= 0x550 char *res; unsigned long limit; *************** *** 301,304 **** --- 311,315 ---- return mkvoid; } else + #endif return __FAIL; } *************** *** 306,309 **** --- 317,321 ---- FUNCTION(magick,magick_limits,argc,argv) { + #if MagickLibVersion >= 0x550 if (argc == 0) { ListMagickResourceInfo(stdout, &exception); *************** *** 313,316 **** --- 325,329 ---- return mkvoid; } else + #endif return __FAIL; } *************** *** 318,321 **** --- 331,335 ---- FUNCTION(magick,magick_resources,argc,argv) { + #if MagickLibVersion >= 0x550 if (argc == 0) return mktuplel(4, mkuint(GetMagickResource(FileResource)), *************** *** 324,327 **** --- 338,342 ---- mkuint(GetMagickResource(DiskResource))); else + #endif return __FAIL; } *************** *** 1748,1751 **** --- 1763,1767 ---- FUNCTION(magick,thumbnail,argc,argv) { + #if MagickLibVersion >= 0x550 Image *img; int n; *************** *** 1763,1766 **** --- 1779,1783 ---- return mk_image(img); } else + #endif return __FAIL; } *************** *** 2154,2157 **** --- 2171,2175 ---- FUNCTION(magick,adaptive_threshold,argc,argv) { + #if MagickLibVersion >= 0x550 Image *img; unsigned long w, h; *************** *** 2171,2174 **** --- 2189,2193 ---- return mk_image(img); } else + #endif return __FAIL; } Index: magick.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/magick/magick.q,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** magick.q 31 Dec 2003 15:56:43 -0000 1.32 --- magick.q 6 Jan 2004 01:03:07 -0000 1.33 *************** *** 127,136 **** public extern magick_info; ! /* ImageMagick resource management. You can set a limit on the resource RES ! (which can be any of the resource types for ImageMagick's -limit option, ! see ImageMagick(1) for details; currently "memory", "map" and "disk" are ! supported) with the magick_limit function, use the magick_limits function ! to print the current limits on standard output, and retrieve the current ! resource usage figures with magick_resources. */ public extern magick_limit RES VAL, magick_limits, magick_resources; --- 127,136 ---- public extern magick_info; ! /* ImageMagick resource management (IM > 5.4 only). You can set a limit on the ! resource RES (which can be any of the resource types for ImageMagick's ! -limit option, see ImageMagick(1) for details; currently "memory", "map" ! and "disk" are supported) with the magick_limit function, use the ! magick_limits function to print the current limits on standard output, and ! retrieve the current resource usage figures with magick_resources. */ public extern magick_limit RES VAL, magick_limits, magick_resources; *************** *** 529,533 **** public extern magnify IMG, minify IMG; public extern resize IMG DIM FILTER BLUR, sample IMG DIM, scale IMG DIM; ! public extern thumbnail IMG DIM; public extern flipx IMG, flipy IMG, roll IMG P; --- 529,533 ---- public extern magnify IMG, minify IMG; public extern resize IMG DIM FILTER BLUR, sample IMG DIM, scale IMG DIM; ! public extern thumbnail IMG DIM; // IM > 5.4 only public extern flipx IMG, flipy IMG, roll IMG P; *************** *** 590,594 **** /* Effects. */ ! public extern adaptive_threshold IMG DIM OFFS; public extern add_noise IMG NOISE; public extern blur IMG RADIUS SIGMA; --- 590,594 ---- /* Effects. */ ! public extern adaptive_threshold IMG DIM OFFS; // IM > 5.4 only public extern add_noise IMG NOISE; public extern blur IMG RADIUS SIGMA; |