home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / patches / 46 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  42.9 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!udel!louie!eplrx7!eplrx7.es.dupont.com!cristy
  2. From: cristy@eplrx7.es.duPont.com (Cristy)
  3. Newsgroups: alt.sources.patches
  4. Subject: ImageMagick 2.1 - patch 05
  5. Summary: X11 image processing and display utilities
  6. Keywords: X11 image display image-processing JPEG TIFF GIF
  7. Message-ID: <cristy.722276394@eplrx7.es.dupont.com>
  8. Date: 20 Nov 92 16:19:54 GMT
  9. Organization: DuPont Engineering Physics Laboratory
  10. Lines: 1278
  11.  
  12. To apply this patch:
  13.  
  14. cd to the top of the source tree (to the directory containing the
  15. "ImageMagick" directory) and do:
  16.  
  17.       patch -p -s < ThisFile
  18.  
  19. Patch will work silently unless an error occurs.  If you want to watch
  20. patch do its thing, leave out the "-s" argument to patch.
  21.  
  22. Finally, to rebuild after applying this patch, cd to the "ImageMagick"
  23. directory and type:
  24.  
  25.       make
  26.  
  27. The entire distribution is available as contrib/ImageMagick.tar.Z on
  28. export.lcs.mit.edu.
  29.  
  30. Brief notes on what this patch fixes:
  31.  
  32. o Fixed ANSI warning on image composite code.
  33. o Panning uses a pixmap for faster panning speed.
  34. o Rotate.c now uses a table to force range limits.
  35. o Fixed strcasecmp to work under VMS.
  36. o range table in quantize.c is allocated from the heap instead of
  37.   the stack.
  38. o adjusted the sensitivity for automatic dithering.  Some JPEG images
  39.   were not being dithered.
  40.  
  41.  
  42. diff -c -r ImageMagick/Imakefile ImageMagick2.1.5/Imakefile
  43. *** ImageMagick/Imakefile    Sun May 31 13:04:19 1992
  44. --- ImageMagick2.1.5/Imakefile    Thu Nov 19 16:02:23 1992
  45. ***************
  46. *** 35,40 ****
  47. --- 35,41 ----
  48.   #TIFF_LIBRARIES= -Ltiff/libtiff -L../tiff/libtiff -ltiff
  49.   
  50.   DEFINES= $(JPEG) $(JPEG_INCLUDES) $(TIFF) $(TIFF_INCLUDES)
  51. + LOCALDIR = /usr/local/bin
  52.   SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
  53.   
  54.   MagickObjects= X.o image.o rotate.o quantize.o colors.o signature.o compress.o\
  55. ***************
  56. *** 74,80 ****
  57.   InstallMyManPage(miff,$(MANSOURCEPATH)5,5)
  58.   
  59.   #define IHaveSubdirs
  60. ! #define PassCDebugFlags 'DEFINES=$(DEFINES)' 'SYS_LIBRARIES=$(SYS_LIBRARIES)'
  61.   
  62.   SUBDIRS= utilities xtp
  63.   
  64. --- 75,82 ----
  65.   InstallMyManPage(miff,$(MANSOURCEPATH)5,5)
  66.   
  67.   #define IHaveSubdirs
  68. ! #define PassCDebugFlags 'DEFINES=$(DEFINES)' 'SYS_LIBRARIES=$(SYS_LIBRARIES)' \
  69. !   'LOCALDIR=$(LOCALDIR)'
  70.   
  71.   SUBDIRS= utilities xtp
  72.   
  73. diff -c -r ImageMagick/X.c ImageMagick2.1.5/X.c
  74. *** ImageMagick/X.c    Tue Nov 17 10:20:04 1992
  75. --- ImageMagick2.1.5/X.c    Tue Nov 17 16:22:17 1992
  76. ***************
  77. *** 2392,2408 ****
  78.       (char *) NULL,"0");
  79.     resource_info->number_colors=atoi(resource_value);
  80.     resource_value=XGetResource(resource_database,application_name,"colorspace",
  81. !     (char *) NULL,"RGB");
  82. !   if (strncasecmp("GRAY",resource_value,3) == 0)
  83.       resource_info->colorspace=GRAYColorspace;
  84.     else
  85. !     if (strncasecmp("YIQ",resource_value,3) == 0)
  86.         resource_info->colorspace=YIQColorspace;
  87.       else
  88. !       if (strncasecmp("YUV",resource_value,3) == 0)
  89.           resource_info->colorspace=YUVColorspace;
  90.         else
  91. !         if (strncasecmp("XYZ",resource_value,3) == 0)
  92.             resource_info->colorspace=XYZColorspace;
  93.           else
  94.             resource_info->colorspace=RGBColorspace;
  95. --- 2392,2408 ----
  96.       (char *) NULL,"0");
  97.     resource_info->number_colors=atoi(resource_value);
  98.     resource_value=XGetResource(resource_database,application_name,"colorspace",
  99. !     (char *) NULL,"rgb");
  100. !   if (strncasecmp("gray",resource_value,3) == 0)
  101.       resource_info->colorspace=GRAYColorspace;
  102.     else
  103. !     if (strncasecmp("yiq",resource_value,3) == 0)
  104.         resource_info->colorspace=YIQColorspace;
  105.       else
  106. !       if (strncasecmp("yuv",resource_value,3) == 0)
  107.           resource_info->colorspace=YUVColorspace;
  108.         else
  109. !         if (strncasecmp("xyz",resource_value,3) == 0)
  110.             resource_info->colorspace=XYZColorspace;
  111.           else
  112.             resource_info->colorspace=RGBColorspace;
  113. diff -c -r ImageMagick/alien.c ImageMagick2.1.5/alien.c
  114. *** ImageMagick/alien.c    Sat Nov 14 01:20:28 1992
  115. --- ImageMagick2.1.5/alien.c    Thu Nov 19 14:47:48 1992
  116. ***************
  117. *** 1891,1898 ****
  118.           x_resolution=XResolution;
  119.           y_resolution=YResolution;
  120.           if (alien_info->density != (char *) NULL)
  121. !           (void) XParseGeometry(alien_info->density,&x,&y,&x_resolution,
  122. !             &y_resolution);
  123.           (void) sprintf(clip_geometry,"%ux%u+%u-%u\0",
  124.             ((upper_x-lower_x)*x_resolution+(XResolution >> 1))/XResolution,
  125.             ((upper_y-lower_y)*y_resolution+(YResolution >> 1))/YResolution,
  126. --- 1891,1910 ----
  127.           x_resolution=XResolution;
  128.           y_resolution=YResolution;
  129.           if (alien_info->density != (char *) NULL)
  130. !           {
  131. !             int
  132. !               flags;
  133. !             /*
  134. !               User specified density.
  135. !             */
  136. !             flags=XParseGeometry(alien_info->density,&x,&y,&x_resolution,
  137. !               &y_resolution);
  138. !             if ((flags & WidthValue) == 0)
  139. !               x_resolution=XResolution;
  140. !             if ((flags & HeightValue) == 0)
  141. !               y_resolution=x_resolution;
  142. !           }
  143.           (void) sprintf(clip_geometry,"%ux%u+%u-%u\0",
  144.             ((upper_x-lower_x)*x_resolution+(XResolution >> 1))/XResolution,
  145.             ((upper_y-lower_y)*y_resolution+(YResolution >> 1))/YResolution,
  146. diff -c -r ImageMagick/animate.c ImageMagick2.1.5/animate.c
  147. *** ImageMagick/animate.c    Sat Nov 14 01:20:24 1992
  148. --- ImageMagick2.1.5/animate.c    Tue Nov 17 16:22:12 1992
  149. ***************
  150. *** 1683,1701 ****
  151.                     if (i == argc)
  152.                       Error("missing type on -colorspace",(char *) NULL);
  153.                     option=argv[i];
  154. !                   if (strncasecmp("GRAY",option,3) == 0)
  155.                       resource_info.colorspace=GRAYColorspace;
  156.                     else
  157. !                     if (strncasecmp("RGB",option,3) == 0)
  158.                         resource_info.colorspace=RGBColorspace;
  159.                       else
  160. !                       if (strncasecmp("YIQ",option,3) == 0)
  161.                           resource_info.colorspace=YIQColorspace;
  162.                         else
  163. !                         if (strncasecmp("YUV",option,3) == 0)
  164.                             resource_info.colorspace=YUVColorspace;
  165.                           else
  166. !                           if (strncasecmp("XYZ",option,3) == 0)
  167.                               resource_info.colorspace=XYZColorspace;
  168.                             else
  169.                               Error("invalid colorspace type on -colorspace",
  170. --- 1683,1701 ----
  171.                     if (i == argc)
  172.                       Error("missing type on -colorspace",(char *) NULL);
  173.                     option=argv[i];
  174. !                   if (strncasecmp("gray",option,3) == 0)
  175.                       resource_info.colorspace=GRAYColorspace;
  176.                     else
  177. !                     if (strncasecmp("rgb",option,3) == 0)
  178.                         resource_info.colorspace=RGBColorspace;
  179.                       else
  180. !                       if (strncasecmp("yiq",option,3) == 0)
  181.                           resource_info.colorspace=YIQColorspace;
  182.                         else
  183. !                         if (strncasecmp("yuv",option,3) == 0)
  184.                             resource_info.colorspace=YUVColorspace;
  185.                           else
  186. !                           if (strncasecmp("xyz",option,3) == 0)
  187.                               resource_info.colorspace=XYZColorspace;
  188.                             else
  189.                               Error("invalid colorspace type on -colorspace",
  190. diff -c -r ImageMagick/display.c ImageMagick2.1.5/display.c
  191. *** ImageMagick/display.c    Mon Nov 16 12:47:03 1992
  192. --- ImageMagick2.1.5/display.c    Fri Nov 20 10:42:54 1992
  193. ***************
  194. *** 3005,3010 ****
  195. --- 3005,3011 ----
  196.               XSetWindowBackgroundPixmap(display,pan_window.id,pan_window.pixmap);
  197.               XClearWindow(display,pan_window.id);
  198.               XDrawPanRectangle(display,&image_window,&pan_window);
  199. +             (void) XMakePixmap(display,&image_window);
  200.               *state|=PanIconMappedState;
  201.               break;
  202.             }
  203. ***************
  204. *** 5021,5039 ****
  205.                     if (i == argc)
  206.                       Error("missing type on -colorspace",(char *) NULL);
  207.                     option=argv[i];
  208. !                   if (strncasecmp("GRAY",option,3) == 0)
  209.                       resource_info.colorspace=GRAYColorspace;
  210.                     else
  211. !                     if (strncasecmp("RGB",option,3) == 0)
  212.                         resource_info.colorspace=RGBColorspace;
  213.                       else
  214. !                       if (strncasecmp("YIQ",option,3) == 0)
  215.                           resource_info.colorspace=YIQColorspace;
  216.                         else
  217. !                         if (strncasecmp("YUV",option,3) == 0)
  218.                             resource_info.colorspace=YUVColorspace;
  219.                           else
  220. !                           if (strncasecmp("XYZ",option,3) == 0)
  221.                               resource_info.colorspace=XYZColorspace;
  222.                             else
  223.                               Error("invalid colorspace type on -colorspace",
  224. --- 5022,5040 ----
  225.                     if (i == argc)
  226.                       Error("missing type on -colorspace",(char *) NULL);
  227.                     option=argv[i];
  228. !                   if (strncasecmp("gray",option,3) == 0)
  229.                       resource_info.colorspace=GRAYColorspace;
  230.                     else
  231. !                     if (strncasecmp("rgb",option,3) == 0)
  232.                         resource_info.colorspace=RGBColorspace;
  233.                       else
  234. !                       if (strncasecmp("yiq",option,3) == 0)
  235.                           resource_info.colorspace=YIQColorspace;
  236.                         else
  237. !                         if (strncasecmp("yuv",option,3) == 0)
  238.                             resource_info.colorspace=YUVColorspace;
  239.                           else
  240. !                           if (strncasecmp("xyz",option,3) == 0)
  241.                               resource_info.colorspace=XYZColorspace;
  242.                             else
  243.                               Error("invalid colorspace type on -colorspace",
  244. diff -c -r ImageMagick/display.h ImageMagick2.1.5/display.h
  245. *** ImageMagick/display.h    Fri Nov 13 13:27:13 1992
  246. --- ImageMagick2.1.5/display.h    Tue Nov 17 15:19:44 1992
  247. ***************
  248. *** 44,49 ****
  249. --- 44,51 ----
  250.     (void) fprintf(stderr,".\n");  \
  251.   }
  252.   #ifdef vms
  253. + #define strcasecmp  strcmp
  254. + #define strncasecmp  strncmp
  255.   #define pclose(file)  exit(1)
  256.   #define popen(command,mode)  exit(1)
  257.   #define unlink(file)  remove(file)
  258. diff -c -r ImageMagick/image.c ImageMagick2.1.5/image.c
  259. *** ImageMagick/image.c    Sat Nov 14 01:20:32 1992
  260. --- ImageMagick2.1.5/image.c    Fri Nov 20 09:59:56 1992
  261. ***************
  262. *** 833,875 ****
  263.                 }
  264.               else
  265.                 {
  266. !                 red=(p->red*MaxRGB+q->red*(MaxRGB-p->index))/MaxRGB;
  267. !                 green=(p->green*MaxRGB+q->green*(MaxRGB-p->index))/MaxRGB;
  268. !                 blue=(p->blue*MaxRGB+q->blue*(MaxRGB-p->index))/MaxRGB;
  269. !                 index=(p->index*MaxRGB+q->index*(MaxRGB-p->index))/MaxRGB;
  270.                 }
  271.             break;
  272.           }
  273.           case InCompositeOp:
  274.           {
  275. !           red=(p->red*q->index)/MaxRGB;
  276. !           green=(p->green*q->index)/MaxRGB;
  277. !           blue=(p->blue*q->index)/MaxRGB;
  278. !           index=(p->index*q->index)/MaxRGB;
  279.             break;
  280.           }
  281.           case OutCompositeOp:
  282.           {
  283. !           red=(p->red*(MaxRGB-q->index))/MaxRGB;
  284. !           green=(p->green*(MaxRGB-q->index))/MaxRGB;
  285. !           blue=(p->blue*(MaxRGB-q->index))/MaxRGB;
  286. !           index=(p->index*(MaxRGB-q->index))/MaxRGB;
  287.             break;
  288.           }
  289.           case AtopCompositeOp:
  290.           {
  291. !           red=(p->red*q->index+q->red*(MaxRGB-p->index))/MaxRGB;
  292. !           green=(p->green*q->index+q->green*(MaxRGB-p->index))/MaxRGB;
  293. !           blue=(p->blue*q->index+q->blue*(MaxRGB-p->index))/MaxRGB;
  294. !           index=(p->index*q->index+q->index*(MaxRGB-p->index))/MaxRGB;
  295.             break;
  296.           }
  297.           case XorCompositeOp:
  298.           {
  299. !           red=(p->red*(MaxRGB-q->index)+q->red*(MaxRGB-p->index))/MaxRGB;
  300. !           green=(p->green*(MaxRGB-q->index)+q->green*(MaxRGB-p->index))/MaxRGB;
  301. !           blue=(p->blue*(MaxRGB-q->index)+q->blue*(MaxRGB-p->index))/MaxRGB;
  302. !           index=(p->index*(MaxRGB-q->index)+q->index*(MaxRGB-p->index))/MaxRGB;
  303.             break;
  304.           }
  305.           case PlusCompositeOp:
  306. --- 833,878 ----
  307.                 }
  308.               else
  309.                 {
  310. !                 red=(p->red*MaxRGB+q->red*(MaxRGB-p->index))/(int) MaxRGB;
  311. !                 green=(p->green*MaxRGB+q->green*(MaxRGB-p->index))/(int) MaxRGB;
  312. !                 blue=(p->blue*MaxRGB+q->blue*(MaxRGB-p->index))/(int) MaxRGB;
  313. !                 index=(p->index*MaxRGB+q->index*(MaxRGB-p->index))/(int) MaxRGB;
  314.                 }
  315.             break;
  316.           }
  317.           case InCompositeOp:
  318.           {
  319. !           red=(p->red*q->index)/(int) MaxRGB;
  320. !           green=(p->green*q->index)/(int) MaxRGB;
  321. !           blue=(p->blue*q->index)/(int) MaxRGB;
  322. !           index=(p->index*q->index)/(int) MaxRGB;
  323.             break;
  324.           }
  325.           case OutCompositeOp:
  326.           {
  327. !           red=(p->red*(MaxRGB-q->index))/(int) MaxRGB;
  328. !           green=(p->green*(MaxRGB-q->index))/(int) MaxRGB;
  329. !           blue=(p->blue*(MaxRGB-q->index))/(int) MaxRGB;
  330. !           index=(p->index*(MaxRGB-q->index))/(int) MaxRGB;
  331.             break;
  332.           }
  333.           case AtopCompositeOp:
  334.           {
  335. !           red=(p->red*q->index+q->red*(MaxRGB-p->index))/(int) MaxRGB;
  336. !           green=(p->green*q->index+q->green*(MaxRGB-p->index))/(int) MaxRGB;
  337. !           blue=(p->blue*q->index+q->blue*(MaxRGB-p->index))/(int) MaxRGB;
  338. !           index=(p->index*q->index+q->index*(MaxRGB-p->index))/(int) MaxRGB;
  339.             break;
  340.           }
  341.           case XorCompositeOp:
  342.           {
  343. !           red=(p->red*(MaxRGB-q->index)+q->red*(MaxRGB-p->index))/(int) MaxRGB;
  344. !           green=(p->green*(MaxRGB-q->index)+q->green*(MaxRGB-p->index))/
  345. !             (int) MaxRGB;
  346. !           blue=(p->blue*(MaxRGB-q->index)+q->blue*(MaxRGB-p->index))/
  347. !             (int) MaxRGB;
  348. !           index=(p->index*(MaxRGB-q->index)+q->index*(MaxRGB-p->index))/
  349. !             (int) MaxRGB;
  350.             break;
  351.           }
  352.           case PlusCompositeOp:
  353. Common subdirectories: ImageMagick/images and ImageMagick2.1.5/images
  354. diff -c -r ImageMagick/montage.c ImageMagick2.1.5/montage.c
  355. *** ImageMagick/montage.c    Sat Nov 14 01:20:22 1992
  356. --- ImageMagick2.1.5/montage.c    Tue Nov 17 16:22:14 1992
  357. ***************
  358. *** 886,904 ****
  359.                     if (i == argc)
  360.                       Error("missing type on -colorspace",(char *) NULL);
  361.                     option=argv[i];
  362. !                   if (strncasecmp("GRAY",option,3) == 0)
  363.                       resource_info.colorspace=GRAYColorspace;
  364.                     else
  365. !                     if (strncasecmp("RGB",option,3) == 0)
  366.                         resource_info.colorspace=RGBColorspace;
  367.                       else
  368. !                       if (strncasecmp("YIQ",option,3) == 0)
  369.                           resource_info.colorspace=YIQColorspace;
  370.                         else
  371. !                         if (strncasecmp("YUV",option,3) == 0)
  372.                             resource_info.colorspace=YUVColorspace;
  373.                           else
  374. !                           if (strncasecmp("XYZ",option,3) == 0)
  375.                               resource_info.colorspace=XYZColorspace;
  376.                             else
  377.                               Error("invalid colorspace type on -colorspace",
  378. --- 886,904 ----
  379.                     if (i == argc)
  380.                       Error("missing type on -colorspace",(char *) NULL);
  381.                     option=argv[i];
  382. !                   if (strncasecmp("gray",option,3) == 0)
  383.                       resource_info.colorspace=GRAYColorspace;
  384.                     else
  385. !                     if (strncasecmp("rgb",option,3) == 0)
  386.                         resource_info.colorspace=RGBColorspace;
  387.                       else
  388. !                       if (strncasecmp("yiq",option,3) == 0)
  389.                           resource_info.colorspace=YIQColorspace;
  390.                         else
  391. !                         if (strncasecmp("yuv",option,3) == 0)
  392.                             resource_info.colorspace=YUVColorspace;
  393.                           else
  394. !                           if (strncasecmp("xyz",option,3) == 0)
  395.                               resource_info.colorspace=XYZColorspace;
  396.                             else
  397.                               Error("invalid colorspace type on -colorspace",
  398. diff -c -r ImageMagick/quantize.c ImageMagick2.1.5/quantize.c
  399. *** ImageMagick/quantize.c    Wed Nov 11 14:12:13 1992
  400. --- ImageMagick2.1.5/quantize.c    Fri Nov 20 10:00:50 1992
  401. ***************
  402. *** 790,796 ****
  403.   
  404.     unsigned char
  405.       *range_limit,
  406. !     range_table[3*(MaxRGB+1)];
  407.   
  408.     unsigned int
  409.       i,
  410. --- 790,796 ----
  411.   
  412.     unsigned char
  413.       *range_limit,
  414. !     *range_table;
  415.   
  416.     unsigned int
  417.       i,
  418. ***************
  419. *** 812,820 ****
  420.       Allocate the cache & scanline buffers to keep track of quantization error.
  421.     */
  422.     cache=(int *) malloc((1 << 18)*sizeof(int));
  423.     scanline=(ScaledColorPacket *)
  424.       malloc(2*(image->columns+2)*sizeof(ScaledColorPacket));
  425. !   if ((cache == (int *) NULL) || (scanline == (ScaledColorPacket *) NULL))
  426.       {
  427.         Warning("unable to dither image","memory allocation failed");
  428.         return(True);
  429. --- 812,822 ----
  430.       Allocate the cache & scanline buffers to keep track of quantization error.
  431.     */
  432.     cache=(int *) malloc((1 << 18)*sizeof(int));
  433. +   range_table=(unsigned char *) malloc(3*(MaxRGB+1)*sizeof(unsigned char));
  434.     scanline=(ScaledColorPacket *)
  435.       malloc(2*(image->columns+2)*sizeof(ScaledColorPacket));
  436. !   if ((cache == (int *) NULL) || (range_table == (unsigned char *) NULL) ||
  437. !       (scanline == (ScaledColorPacket *) NULL))
  438.       {
  439.         Warning("unable to dither image","memory allocation failed");
  440.         return(True);
  441. ***************
  442. *** 962,967 ****
  443. --- 964,970 ----
  444.       Free up memory.
  445.     */
  446.     (void) free((void *) scanline);
  447. +   (void) free((void *) range_table);
  448.     (void) free((void *) cache);
  449.     (void) free((void *) image->pixels);
  450.     image->packets=dithered_image->packets;
  451. ***************
  452. *** 1581,1587 ****
  453.       RGBTransformImage(image,colorspace);
  454.     Classification(image);
  455.     if (!optimal)
  456. !     dither|=cube.colors > (1 << (cube.depth+2));
  457.     Reduction(number_colors);
  458.     Assignment(image,dither,optimal);
  459.     if (colorspace != RGBColorspace)
  460. --- 1584,1590 ----
  461.       RGBTransformImage(image,colorspace);
  462.     Classification(image);
  463.     if (!optimal)
  464. !     dither|=cube.colors > (1 << (cube.depth-1));
  465.     Reduction(number_colors);
  466.     Assignment(image,dither,optimal);
  467.     if (colorspace != RGBColorspace)
  468. ***************
  469. *** 1693,1699 ****
  470.       Classification(images[i]);
  471.     }
  472.     if (!optimal)
  473. !     dither|=cube.colors > (1 << (cube.depth+2));
  474.     Reduction(number_colors);
  475.     for (i=0; i < number_images; i++)
  476.     {
  477. --- 1696,1702 ----
  478.       Classification(images[i]);
  479.     }
  480.     if (!optimal)
  481. !     dither|=cube.colors > (1 << (cube.depth-1));
  482.     Reduction(number_colors);
  483.     for (i=0; i < number_images; i++)
  484.     {
  485. diff -c -r ImageMagick/rotate.c ImageMagick2.1.5/rotate.c
  486. *** ImageMagick/rotate.c    Mon Nov  9 14:48:31 1992
  487. --- ImageMagick2.1.5/rotate.c    Fri Nov 20 10:00:49 1992
  488. ***************
  489. *** 107,113 ****
  490.   %
  491.   */
  492.   static void ColumnShear(source_image,source_columns,column,y,length,
  493. !   displacement,background)
  494.   ColorPacket
  495.     *source_image;
  496.   
  497. --- 107,113 ----
  498.   %
  499.   */
  500.   static void ColumnShear(source_image,source_columns,column,y,length,
  501. !   displacement,background,range_limit)
  502.   ColorPacket
  503.     *source_image;
  504.   
  505. ***************
  506. *** 124,146 ****
  507.   
  508.   ColorPacket
  509.     background;
  510.   {
  511.     ColorPacket
  512.       last_pixel;
  513.   
  514. -   double
  515. -     fractional_step;
  516.     enum {UP,DOWN}
  517.       direction;
  518.   
  519. !   long int
  520.       blue,
  521.       green,
  522. -     int_fractional_step,
  523.       red,
  524.       step;
  525.   
  526.     register ColorPacket
  527.       *p,
  528.       *q;
  529. --- 124,148 ----
  530.   
  531.   ColorPacket
  532.     background;
  533. + register unsigned char
  534. +   *range_limit;
  535.   {
  536.     ColorPacket
  537.       last_pixel;
  538.   
  539.     enum {UP,DOWN}
  540.       direction;
  541.   
  542. !   int
  543.       blue,
  544.       green,
  545.       red,
  546.       step;
  547.   
  548. +   long int
  549. +     fractional_step;
  550.     register ColorPacket
  551.       *p,
  552.       *q;
  553. ***************
  554. *** 159,166 ****
  555.           direction=UP;
  556.         }
  557.     step=(int) floor(displacement);
  558. !   fractional_step=displacement-(double) step;
  559. !   if (fractional_step == 0.0)
  560.       {
  561.         /*
  562.           No fractional displacement-- just copy the pixels.
  563. --- 161,168 ----
  564.           direction=UP;
  565.         }
  566.     step=(int) floor(displacement);
  567. !   fractional_step=UpShifted(displacement-(double) step);
  568. !   if (fractional_step == 0)
  569.       {
  570.         /*
  571.           No fractional displacement-- just copy the pixels.
  572. ***************
  573. *** 214,220 ****
  574.       Fractional displacment.
  575.     */
  576.     step++;
  577. -   int_fractional_step=UpShifted(fractional_step);
  578.     last_pixel=background;
  579.     switch (direction)
  580.     {
  581. --- 216,221 ----
  582. ***************
  583. *** 224,290 ****
  584.         q=p-step*source_columns;
  585.         for (i=0; i < length; i++)
  586.         {
  587. !         red=(long) DownShift(last_pixel.red*
  588. !           (UpShift(1)-int_fractional_step)+p->red*int_fractional_step);
  589. !         if (red > MaxRGB)
  590. !           q->red=MaxRGB;
  591. !         else
  592. !           if (red < 0)
  593. !             q->red=0;
  594. !           else
  595. !             q->red=(unsigned char) red;
  596. !         green=(long) DownShift(last_pixel.green*
  597. !           (UpShift(1)-int_fractional_step)+p->green*int_fractional_step);
  598. !         if (green > MaxRGB)
  599. !           q->green=MaxRGB;
  600. !         else
  601. !           if (green < 0)
  602. !             q->green=0;
  603. !           else
  604. !             q->green=(unsigned char) green;
  605. !         blue=(long) DownShift(last_pixel.blue*
  606. !           (UpShift(1)-int_fractional_step)+p->blue*int_fractional_step);
  607. !         if (blue > MaxRGB)
  608. !           q->blue=MaxRGB;
  609. !         else
  610. !           if (blue < 0)
  611. !             q->blue=0;
  612. !           else
  613. !             q->blue=(unsigned char) blue;
  614.           last_pixel=(*p);
  615. -         q+=source_columns;
  616.           p+=source_columns;
  617.         }
  618.         /*
  619.           Set old column to background color.
  620.         */
  621. !       red=(long) DownShift(last_pixel.red*
  622. !         (UpShift(1)-int_fractional_step)+background.red*int_fractional_step);
  623. !       if (red > MaxRGB)
  624. !         q->red=MaxRGB;
  625. !       else
  626. !         if (red < 0)
  627. !           q->red=0;
  628. !         else
  629. !           q->red=(unsigned char) red;
  630. !       green=(long) DownShift(last_pixel.green*
  631. !         (UpShift(1)-int_fractional_step)+background.green*int_fractional_step);
  632. !       if (green > MaxRGB)
  633. !         q->green=MaxRGB;
  634. !       else
  635. !         if (green < 0)
  636. !           q->green=0;
  637. !         else
  638. !           q->green=(unsigned char) green;
  639. !       blue=(long) DownShift(last_pixel.blue*
  640. !         (UpShift(1)-int_fractional_step)+background.blue*int_fractional_step);
  641. !       if (blue > MaxRGB)
  642. !         q->blue=MaxRGB;
  643. !       else
  644. !         if (blue < 0)
  645. !           q->blue=0;
  646. !         else
  647. !           q->blue=(unsigned char) blue;
  648.         q+=source_columns;
  649.         for (i=0; i < step-1; i++)
  650.         {
  651. --- 225,255 ----
  652.         q=p-step*source_columns;
  653.         for (i=0; i < length; i++)
  654.         {
  655. !         red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+p->red*
  656. !           fractional_step);
  657. !         green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+p->green*
  658. !           fractional_step);
  659. !         blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+p->blue*
  660. !           fractional_step);
  661.           last_pixel=(*p);
  662.           p+=source_columns;
  663. +         q->red=range_limit[red];
  664. +         q->green=range_limit[green];
  665. +         q->blue=range_limit[blue];
  666. +         q+=source_columns;
  667.         }
  668.         /*
  669.           Set old column to background color.
  670.         */
  671. !       red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+
  672. !         background.red*fractional_step);
  673. !       green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+
  674. !         background.green*fractional_step);
  675. !       blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+
  676. !         background.blue*fractional_step);
  677. !       q->red=range_limit[red];
  678. !       q->green=range_limit[green];
  679. !       q->blue=range_limit[blue];
  680.         q+=source_columns;
  681.         for (i=0; i < step-1; i++)
  682.         {
  683. ***************
  684. *** 299,366 ****
  685.         q=p+step*source_columns;
  686.         for (i=0; i < length; i++)
  687.         {
  688. -         q-=source_columns;
  689.           p-=source_columns;
  690. !         red=(long) DownShift(last_pixel.red*
  691. !           (UpShift(1)-int_fractional_step)+p->red*int_fractional_step);
  692. !         if (red > MaxRGB)
  693. !           q->red=MaxRGB;
  694. !         else
  695. !           if (red < 0)
  696. !             q->red=0;
  697. !           else
  698. !             q->red=(unsigned char) red;
  699. !         green=(long) DownShift(last_pixel.green*
  700. !           (UpShift(1)-int_fractional_step)+p->green*int_fractional_step);
  701. !         if (green > MaxRGB)
  702. !           q->green=MaxRGB;
  703. !         else
  704. !           if (green < 0)
  705. !             q->green=0;
  706. !           else
  707. !             q->green=(unsigned char) green;
  708. !         blue=(long) DownShift(last_pixel.blue*
  709. !           (UpShift(1)-int_fractional_step)+p->blue*int_fractional_step);
  710. !         if (blue > MaxRGB)
  711. !           q->blue=MaxRGB;
  712. !         else
  713. !           if (blue < 0)
  714. !             q->blue=0;
  715. !           else
  716. !             q->blue=(unsigned char) blue;
  717.           last_pixel=(*p);
  718.         }
  719.         /*
  720.           Set old column to background color.
  721.         */
  722.         q-=source_columns;
  723. !       red=(long) DownShift(last_pixel.red*
  724. !         (UpShift(1)-int_fractional_step)+background.red*int_fractional_step);
  725. !       if (red > MaxRGB)
  726. !         q->red=MaxRGB;
  727. !       else
  728. !         if (red < 0)
  729. !           q->red=0;
  730. !         else
  731. !           q->red=(unsigned char) red;
  732. !       green=(long) DownShift(last_pixel.green*
  733. !         (UpShift(1)-int_fractional_step)+background.green*int_fractional_step);
  734. !       if (green > MaxRGB)
  735. !         q->green=MaxRGB;
  736. !       else
  737. !         if (green < 0)
  738. !           q->green=0;
  739. !         else
  740. !           q->green=(unsigned char) green;
  741. !       blue=(long) DownShift(last_pixel.blue*
  742. !         (UpShift(1)-int_fractional_step)+background.blue*int_fractional_step);
  743. !       if (blue > MaxRGB)
  744. !         q->blue=MaxRGB;
  745. !       else
  746. !         if (blue < 0)
  747. !           q->blue=0;
  748. !         else
  749. !           q->blue=(unsigned char) blue;
  750.         for (i=0; i < step-1; i++)
  751.         {
  752.           q-=source_columns;
  753. --- 264,295 ----
  754.         q=p+step*source_columns;
  755.         for (i=0; i < length; i++)
  756.         {
  757.           p-=source_columns;
  758. !         red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+p->red*
  759. !           fractional_step);
  760. !         green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+p->green*
  761. !           fractional_step);
  762. !         blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+p->blue*
  763. !           fractional_step);
  764.           last_pixel=(*p);
  765. +         q-=source_columns;
  766. +         q->red=range_limit[red];
  767. +         q->green=range_limit[green];
  768. +         q->blue=range_limit[blue];
  769.         }
  770.         /*
  771.           Set old column to background color.
  772.         */
  773. +       red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+
  774. +         background.red*fractional_step);
  775. +       green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+
  776. +         background.green*fractional_step);
  777. +       blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+
  778. +         background.blue*fractional_step);
  779.         q-=source_columns;
  780. !       q->red=range_limit[red];
  781. !       q->green=range_limit[green];
  782. !       q->blue=range_limit[blue];
  783.         for (i=0; i < step-1; i++)
  784.         {
  785.           q-=source_columns;
  786. ***************
  787. *** 601,607 ****
  788.   %
  789.   */
  790.   static void RowShear(source_image,source_columns,row,x,length,displacement,
  791. !   background)
  792.   ColorPacket
  793.     *source_image;
  794.   
  795. --- 530,536 ----
  796.   %
  797.   */
  798.   static void RowShear(source_image,source_columns,row,x,length,displacement,
  799. !   background,range_limit)
  800.   ColorPacket
  801.     *source_image;
  802.   
  803. ***************
  804. *** 616,638 ****
  805.   
  806.   ColorPacket
  807.     background;
  808.   {
  809.     ColorPacket
  810.       last_pixel;
  811.   
  812. -   double
  813. -     fractional_step;
  814.     enum {LEFT,RIGHT}
  815.       direction;
  816.   
  817. !   long int
  818.       blue,
  819.       green,
  820. -     int_fractional_step,
  821.       red,
  822.       step;
  823.   
  824.     register ColorPacket
  825.       *p,
  826.       *q;
  827. --- 545,569 ----
  828.   
  829.   ColorPacket
  830.     background;
  831. + register unsigned char
  832. +   *range_limit;
  833.   {
  834.     ColorPacket
  835.       last_pixel;
  836.   
  837.     enum {LEFT,RIGHT}
  838.       direction;
  839.   
  840. !   int
  841.       blue,
  842.       green,
  843.       red,
  844.       step;
  845.   
  846. +   long int
  847. +     fractional_step;
  848.     register ColorPacket
  849.       *p,
  850.       *q;
  851. ***************
  852. *** 651,658 ****
  853.           direction=LEFT;
  854.         }
  855.     step=(int) floor(displacement);
  856. !   fractional_step=displacement-(double)step;
  857. !   if (fractional_step == 0.0)
  858.       {
  859.         /*
  860.           No fractional displacement-- just copy.
  861. --- 582,589 ----
  862.           direction=LEFT;
  863.         }
  864.     step=(int) floor(displacement);
  865. !   fractional_step=UpShifted(displacement-(double) step);
  866. !   if (fractional_step == 0)
  867.       {
  868.         /*
  869.           No fractional displacement-- just copy.
  870. ***************
  871. *** 710,716 ****
  872.       Fractional displacement.
  873.     */
  874.     step++;
  875. -   int_fractional_step=UpShifted(fractional_step);
  876.     last_pixel=background;
  877.     switch (direction)
  878.     {
  879. --- 641,646 ----
  880. ***************
  881. *** 720,786 ****
  882.         q=p-step;
  883.         for (i=0; i < length; i++)
  884.         {
  885. !         red=(long) DownShift(last_pixel.red*
  886. !           (UpShift(1)-int_fractional_step)+p->red*int_fractional_step);
  887. !         if (red > MaxRGB)
  888. !           q->red=MaxRGB;
  889. !         else
  890. !           if (red < 0)
  891. !             q->red=0;
  892. !           else
  893. !             q->red=(unsigned char) red;
  894. !         green=(long) DownShift(last_pixel.green*
  895. !           (UpShift(1)-int_fractional_step)+p->green*int_fractional_step);
  896. !         if (green > MaxRGB)
  897. !           q->green=MaxRGB;
  898. !         else
  899. !           if (green < 0)
  900. !             q->green=0;
  901. !           else
  902. !             q->green=(unsigned char) green;
  903. !         blue=(long) DownShift(last_pixel.blue*
  904. !           (UpShift(1)-int_fractional_step)+p->blue*int_fractional_step);
  905. !         if (blue > MaxRGB)
  906. !           q->blue=MaxRGB;
  907. !         else
  908. !           if (blue < 0)
  909. !             q->blue=0;
  910. !           else
  911. !             q->blue=(unsigned char) blue;
  912.           last_pixel=(*p);
  913.           p++;
  914.           q++;
  915.         }
  916.         /*
  917.           Set old row to background color.
  918.         */
  919. !       red=(long) DownShift(last_pixel.red*
  920. !         (UpShift(1)-int_fractional_step)+background.red*int_fractional_step);
  921. !       if (red > MaxRGB)
  922. !         q->red=MaxRGB;
  923. !       else
  924. !         if (red < 0)
  925. !           q->red=0;
  926. !         else
  927. !           q->red=(unsigned char) red;
  928. !       green=(long) DownShift(last_pixel.green*
  929. !         (UpShift(1)-int_fractional_step)+background.green*int_fractional_step);
  930. !       if (green > MaxRGB)
  931. !         q->green=MaxRGB;
  932. !       else
  933. !         if (green < 0)
  934. !           q->green=0;
  935. !         else
  936. !           q->green=(unsigned ) green;
  937. !       blue=(long) DownShift(last_pixel.blue*
  938. !         (UpShift(1)-int_fractional_step)+background.blue*int_fractional_step);
  939. !       if (blue > MaxRGB)
  940. !         q->blue=MaxRGB;
  941. !       else
  942. !         if (blue < 0)
  943. !           q->blue=0;
  944. !         else
  945. !           q->blue=(unsigned char) blue;
  946.         q++;
  947.         for (i=0; i < step-1; i++)
  948.         {
  949. --- 650,680 ----
  950.         q=p-step;
  951.         for (i=0; i < length; i++)
  952.         {
  953. !         red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+p->red*
  954. !           fractional_step);
  955. !         green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+p->green*
  956. !           fractional_step);
  957. !         blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+p->blue*
  958. !           fractional_step);
  959.           last_pixel=(*p);
  960.           p++;
  961. +         q->red=range_limit[red];
  962. +         q->green=range_limit[green];
  963. +         q->blue=range_limit[blue];
  964.           q++;
  965.         }
  966.         /*
  967.           Set old row to background color.
  968.         */
  969. !       red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+
  970. !         background.red*fractional_step);
  971. !       green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+
  972. !         background.green*fractional_step);
  973. !       blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+
  974. !         background.blue*fractional_step);
  975. !       q->red=range_limit[red];
  976. !       q->green=range_limit[green];
  977. !       q->blue=range_limit[blue];
  978.         q++;
  979.         for (i=0; i < step-1; i++)
  980.         {
  981. ***************
  982. *** 796,862 ****
  983.         for (i=0; i < length; i++)
  984.         {
  985.           p--;
  986. !         q--;
  987. !         red=(long) DownShift(last_pixel.red*
  988. !           (UpShift(1)-int_fractional_step)+p->red*int_fractional_step);
  989. !         if (red > MaxRGB)
  990. !           q->red=MaxRGB;
  991. !         else
  992. !           if (red < 0)
  993. !             q->red=0;
  994. !           else
  995. !             q->red=(unsigned char) red;
  996. !         green=(long) DownShift(last_pixel.green*
  997. !           (UpShift(1)-int_fractional_step)+p->green*int_fractional_step);
  998. !         if (green > MaxRGB)
  999. !           q->green=MaxRGB;
  1000. !         else
  1001. !           if (green < 0)
  1002. !             q->green=0;
  1003. !           else
  1004. !             q->green=(unsigned char) green;
  1005. !         blue=(long) DownShift(last_pixel.blue*
  1006. !           (UpShift(1)-int_fractional_step)+p->blue*int_fractional_step);
  1007. !         if (blue > MaxRGB)
  1008. !           blue=MaxRGB;
  1009. !         else
  1010. !           if (blue < 0)
  1011. !             blue=0;
  1012. !           else
  1013. !             q->blue=(unsigned char) blue;
  1014.           last_pixel=(*p);
  1015.         }
  1016.         /*
  1017.           Set old row to background color.
  1018.         */
  1019.         q--;
  1020. !       red=(long) DownShift(last_pixel.red*
  1021. !         (UpShift(1)-int_fractional_step)+background.red*int_fractional_step);
  1022. !       if (red > MaxRGB)
  1023. !         red=MaxRGB;
  1024. !       else
  1025. !         if (red < 0)
  1026. !           red=0;
  1027. !         else
  1028. !           q->red=(unsigned char) red;
  1029. !       green=(long) DownShift(last_pixel.green*
  1030. !         (UpShift(1)-int_fractional_step)+background.green*int_fractional_step);
  1031. !       if (green > MaxRGB)
  1032. !         green=MaxRGB;
  1033. !       else
  1034. !         if (green < 0)
  1035. !           green=0;
  1036. !         else
  1037. !           q->green=(unsigned char) green;
  1038. !       blue=(long) DownShift(last_pixel.blue*
  1039. !         (UpShift(1)-int_fractional_step)+background.blue*int_fractional_step);
  1040. !       if (blue > MaxRGB)
  1041. !         blue=MaxRGB;
  1042. !       else
  1043. !         if (blue < 0)
  1044. !           blue=0;
  1045. !         else
  1046. !           q->blue=(unsigned char) blue;
  1047.         for (i=0; i < step-1; i++)
  1048.         {
  1049.           q--;
  1050. --- 690,720 ----
  1051.         for (i=0; i < length; i++)
  1052.         {
  1053.           p--;
  1054. !         red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+p->red*
  1055. !           fractional_step);
  1056. !         green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+p->green*
  1057. !           fractional_step);
  1058. !         blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+p->blue*
  1059. !           fractional_step);
  1060.           last_pixel=(*p);
  1061. +         q--;
  1062. +         q->red=range_limit[red];
  1063. +         q->green=range_limit[green];
  1064. +         q->blue=range_limit[blue];
  1065.         }
  1066.         /*
  1067.           Set old row to background color.
  1068.         */
  1069. +       red=DownShift(last_pixel.red*(UpShift(1)-fractional_step)+
  1070. +         background.red*fractional_step);
  1071. +       green=DownShift(last_pixel.green*(UpShift(1)-fractional_step)+
  1072. +         background.green*fractional_step);
  1073. +       blue=DownShift(last_pixel.blue*(UpShift(1)-fractional_step)+
  1074. +         background.blue*fractional_step);
  1075.         q--;
  1076. !       q->red=range_limit[red];
  1077. !       q->green=range_limit[green];
  1078. !       q->blue=range_limit[blue];
  1079.         for (i=0; i < step-1; i++)
  1080.         {
  1081.           q--;
  1082. ***************
  1083. *** 916,922 ****
  1084.   int
  1085.     clip;
  1086.   {
  1087. ! #define DegreesToRadians(x) ((x)/180.0*3.14159265359)
  1088.   
  1089.     ColorPacket
  1090.       background,
  1091. --- 774,780 ----
  1092.   int
  1093.     clip;
  1094.   {
  1095. ! #define DegreesToRadians(x) ((x)*3.14159265358979323846/180.0)
  1096.   
  1097.     ColorPacket
  1098.       background,
  1099. ***************
  1100. *** 1041,1046 ****
  1101. --- 899,908 ----
  1102.         Point
  1103.           corners[4];
  1104.   
  1105. +       unsigned char
  1106. +         *range_limit,
  1107. +         *range_table;
  1108.         unsigned int
  1109.           column,
  1110.           row;
  1111. ***************
  1112. *** 1067,1072 ****
  1113. --- 929,951 ----
  1114.           rotated_pixels+number_columns,number_columns,x_offset,y_offset,
  1115.           rotations);
  1116.         /*
  1117. +         Initialize range table.
  1118. +       */
  1119. +       range_table=(unsigned char *) malloc(3*(MaxRGB+1)*sizeof(unsigned char));
  1120. +       if (range_table == (unsigned char *) NULL)
  1121. +         {
  1122. +           DestroyImage(rotated_image);
  1123. +           Warning("unable to rotate image","memory allocation failed");
  1124. +           return((Image *) NULL);
  1125. +         }
  1126. +       for (i=0; i <= MaxRGB; i++)
  1127. +       {
  1128. +         range_table[i]=0;
  1129. +         range_table[i+(MaxRGB+1)]=(unsigned char) i;
  1130. +         range_table[i+(MaxRGB+1)*2]=MaxRGB;
  1131. +       }
  1132. +       range_limit=range_table+(MaxRGB+1);
  1133. +       /*
  1134.           Perform a fractional rotation.  First, shear the image rows.
  1135.         */
  1136.         row=(number_rows-rotated_image->rows)/2;
  1137. ***************
  1138. *** 1074,1080 ****
  1139.         {
  1140.           RowShear(rotated_pixels+number_columns,number_columns,row,x_offset,
  1141.             rotated_image->columns,x_shear*
  1142. !           (((double) i)-(rotated_image->rows-1)/2.0),background);
  1143.           row++;
  1144.         }
  1145.         /*
  1146. --- 953,959 ----
  1147.         {
  1148.           RowShear(rotated_pixels+number_columns,number_columns,row,x_offset,
  1149.             rotated_image->columns,x_shear*
  1150. !           (((double) i)-(rotated_image->rows-1)/2.0),background,range_limit);
  1151.           row++;
  1152.         }
  1153.         /*
  1154. ***************
  1155. *** 1085,1091 ****
  1156.         {
  1157.           ColumnShear(rotated_pixels+number_columns,number_columns,column,
  1158.             y_offset,rotated_image->rows,y_shear*(((double) i)-(y_width-1)/2.0),
  1159. !           background);
  1160.           column++;
  1161.         }
  1162.         /*
  1163. --- 964,970 ----
  1164.         {
  1165.           ColumnShear(rotated_pixels+number_columns,number_columns,column,
  1166.             y_offset,rotated_image->rows,y_shear*(((double) i)-(y_width-1)/2.0),
  1167. !           background,range_limit);
  1168.           column++;
  1169.         }
  1170.         /*
  1171. ***************
  1172. *** 1094,1100 ****
  1173.         for (i=0; i < number_rows; i++)
  1174.           RowShear(rotated_pixels+number_columns,number_columns,(unsigned int) i,
  1175.             (number_columns-y_width)/2,y_width,x_shear*
  1176. !           (((double) i)-(number_rows-1)/2.0),background);
  1177.         /*
  1178.           Calculate the rotated image size.
  1179.         */
  1180. --- 973,980 ----
  1181.         for (i=0; i < number_rows; i++)
  1182.           RowShear(rotated_pixels+number_columns,number_columns,(unsigned int) i,
  1183.             (number_columns-y_width)/2,y_width,x_shear*
  1184. !           (((double) i)-(number_rows-1)/2.0),background,range_limit);
  1185. !       (void) free((void *) range_table);
  1186.         /*
  1187.           Calculate the rotated image size.
  1188.         */
  1189. Common subdirectories: ImageMagick/scenes and ImageMagick2.1.5/scenes
  1190. Common subdirectories: ImageMagick/utilities and ImageMagick2.1.5/utilities
  1191. Common subdirectories: ImageMagick/xtp and ImageMagick2.1.5/xtp
  1192. diff -c -r ImageMagick/utilities/convert.c ImageMagick2.1.5/utilities/convert.c
  1193. *** ImageMagick/utilities/convert.c    Mon Nov 16 17:57:34 1992
  1194. --- ImageMagick2.1.5/utilities/convert.c    Tue Nov 17 16:22:19 1992
  1195. ***************
  1196. *** 295,313 ****
  1197.                     if (i == argc)
  1198.                       Error("missing type on -colorspace",(char *) NULL);
  1199.                     option=argv[i];
  1200. !                   if (strncasecmp("GRAY",option,3) == 0)
  1201.                       colorspace=GRAYColorspace;
  1202.                     else
  1203. !                     if (strncasecmp("RGB",option,3) == 0)
  1204.                         colorspace=RGBColorspace;
  1205.                       else
  1206. !                       if (strncasecmp("YIQ",option,3) == 0)
  1207.                           colorspace=YIQColorspace;
  1208.                         else
  1209. !                         if (strncasecmp("YUV",option,3) == 0)
  1210.                             colorspace=YUVColorspace;
  1211.                           else
  1212. !                           if (strncasecmp("XYZ",option,3) == 0)
  1213.                               colorspace=XYZColorspace;
  1214.                             else
  1215.                               Error("invalid colorspace type on -colorspace",
  1216. --- 295,313 ----
  1217.                     if (i == argc)
  1218.                       Error("missing type on -colorspace",(char *) NULL);
  1219.                     option=argv[i];
  1220. !                   if (strncasecmp("gray",option,3) == 0)
  1221.                       colorspace=GRAYColorspace;
  1222.                     else
  1223. !                     if (strncasecmp("rgb",option,3) == 0)
  1224.                         colorspace=RGBColorspace;
  1225.                       else
  1226. !                       if (strncasecmp("yiq",option,3) == 0)
  1227.                           colorspace=YIQColorspace;
  1228.                         else
  1229. !                         if (strncasecmp("yuv",option,3) == 0)
  1230.                             colorspace=YUVColorspace;
  1231.                           else
  1232. !                           if (strncasecmp("xyz",option,3) == 0)
  1233.                               colorspace=XYZColorspace;
  1234.                             else
  1235.                               Error("invalid colorspace type on -colorspace",
  1236. diff -c -r ImageMagick/utilities/mogrify.c ImageMagick2.1.5/utilities/mogrify.c
  1237. *** ImageMagick/utilities/mogrify.c    Sat Nov 14 01:20:33 1992
  1238. --- ImageMagick2.1.5/utilities/mogrify.c    Tue Nov 17 16:22:21 1992
  1239. ***************
  1240. *** 338,356 ****
  1241.                     if (i == argc)
  1242.                       Error("missing type on -colorspace",(char *) NULL);
  1243.                     option=argv[i];
  1244. !                   if (strncasecmp("GRAY",option,3) == 0)
  1245.                       colorspace=GRAYColorspace;
  1246.                     else
  1247. !                     if (strncasecmp("RGB",option,3) == 0)
  1248.                         colorspace=RGBColorspace;
  1249.                       else
  1250. !                       if (strncasecmp("YIQ",option,3) == 0)
  1251.                           colorspace=YIQColorspace;
  1252.                         else
  1253. !                         if (strncasecmp("YUV",option,3) == 0)
  1254.                             colorspace=YUVColorspace;
  1255.                           else
  1256. !                           if (strncasecmp("XYZ",option,3) == 0)
  1257.                               colorspace=XYZColorspace;
  1258.                             else
  1259.                               Error("invalid colorspace type on -colorspace",
  1260. --- 338,356 ----
  1261.                     if (i == argc)
  1262.                       Error("missing type on -colorspace",(char *) NULL);
  1263.                     option=argv[i];
  1264. !                   if (strncasecmp("gray",option,3) == 0)
  1265.                       colorspace=GRAYColorspace;
  1266.                     else
  1267. !                     if (strncasecmp("rgb",option,3) == 0)
  1268.                         colorspace=RGBColorspace;
  1269.                       else
  1270. !                       if (strncasecmp("yiq",option,3) == 0)
  1271.                           colorspace=YIQColorspace;
  1272.                         else
  1273. !                         if (strncasecmp("yuv",option,3) == 0)
  1274.                             colorspace=YUVColorspace;
  1275.                           else
  1276. !                           if (strncasecmp("xyz",option,3) == 0)
  1277.                               colorspace=XYZColorspace;
  1278.                             else
  1279.                               Error("invalid colorspace type on -colorspace",
  1280. -- 
  1281. cristy@dupont.com
  1282.