home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / patches / 44 < prev    next >
Encoding:
Text File  |  1992-11-17  |  27.2 KB  |  953 lines

  1. Newsgroups: alt.sources.patches
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!udel!louie!eplrx7!eplrx7.es.dupont.com!cristy
  3. From: cristy@eplrx7.es.duPont.com (Cristy)
  4. Subject: ImageMagick 2.1 - patch 02 (REPOST)
  5. Message-ID: <cristy.722025905@eplrx7.es.dupont.com>
  6. Summary: X11 image processing and display utilities
  7. Keywords: X11 image display image-processing JPEG TIFF GIF
  8. Organization: DuPont Engineering Physics Laboratory
  9. Date: Tue, 17 Nov 1992 18:45:05 GMT
  10. Lines: 941
  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 Added unistd.h to display.h for strict ANSI compilers.
  33. o Changed long to time_t for calls to C time routine.
  34. o Multi-part GIF's can now be displayed or animated.
  35. o Fixed segmentation fault when reading multi-part images with
  36.   animate, montage, or mogrify.
  37. o Multi-part MIFF images have the correct file name now.
  38.  
  39. diff -c -r ImageMagick/XtoPS.c ImageMagick2.1.2/XtoPS.c
  40. *** ImageMagick/XtoPS.c    Wed Nov 11 14:12:11 1992
  41. --- ImageMagick2.1.2/XtoPS.c    Sat Nov 14 01:52:58 1992
  42. ***************
  43. *** 219,225 ****
  44.       i,
  45.       x;
  46.   
  47. !   long
  48.       start_time;
  49.   
  50.     unsigned int
  51. --- 219,225 ----
  52.       i,
  53.       x;
  54.   
  55. !   time_t
  56.       start_time;
  57.   
  58.     unsigned int
  59. ***************
  60. *** 442,448 ****
  61.     */
  62.     if (delay > 0)
  63.       (void) sleep(delay);
  64. !   start_time=time((long *) 0);
  65.     image=ReadXImage(target_window,server_name,frame,screen,borders);
  66.     if (image == (Image *) NULL)
  67.       exit(1);
  68. --- 442,448 ----
  69.     */
  70.     if (delay > 0)
  71.       (void) sleep(delay);
  72. !   start_time=time((time_t *) 0);
  73.     image=ReadXImage(target_window,server_name,frame,screen,borders);
  74.     if (image == (Image *) NULL)
  75.       exit(1);
  76. ***************
  77. *** 481,487 ****
  78.         else
  79.           (void) fprintf(stderr," PseudoClass ");
  80.         (void) fprintf(stderr,"%uc %s %ds\n",image->colors,image->magick,
  81. !         time((long *) 0)-start_time+1);
  82.       }
  83.     DestroyImage(image);
  84.     XCloseDisplay(display);
  85. --- 481,487 ----
  86.         else
  87.           (void) fprintf(stderr," PseudoClass ");
  88.         (void) fprintf(stderr,"%uc %s %ds\n",image->colors,image->magick,
  89. !         time((time_t *) 0)-start_time+1);
  90.       }
  91.     DestroyImage(image);
  92.     XCloseDisplay(display);
  93. diff -c -r ImageMagick/alien.c ImageMagick2.1.2/alien.c
  94. *** ImageMagick/alien.c    Thu Nov 12 16:19:56 1992
  95. --- ImageMagick2.1.2/alien.c    Sat Nov 14 01:51:40 1992
  96. ***************
  97. *** 541,547 ****
  98.   
  99.     unsigned int
  100.       image_count,
  101. -     image_number,
  102.       interlace,
  103.       local_colormap;
  104.   
  105. --- 541,546 ----
  106. ***************
  107. *** 583,589 ****
  108.         DestroyImage(image);
  109.         return((Image *) NULL);
  110.       }
  111. -   image->class=PseudoClass;
  112.     image->colors=1 << ((header[4] & 0x07)+1);
  113.     if (BitSet(header[4],0x80))
  114.       {
  115. --- 582,587 ----
  116. ***************
  117. *** 593,598 ****
  118. --- 591,597 ----
  119.         /*
  120.           Read global colormap.
  121.         */
  122. +       image->class=PseudoClass;
  123.         colormap=(unsigned char *) malloc(3*image->colors*sizeof(unsigned char));
  124.         image->colormap=(ColorPacket *) malloc(image->colors*sizeof(ColorPacket));
  125.         if ((colormap == (unsigned char *) NULL) ||
  126. ***************
  127. *** 613,619 ****
  128.         (void) free((void *) colormap);
  129.       }
  130.     image_count=0;
  131. -   image_number=0;
  132.     while (1)
  133.     {
  134.       status=ReadData((char *) &c,1,1,image->file);
  135. --- 612,617 ----
  136. ***************
  137. *** 620,637 ****
  138.       if (status == False)
  139.         break;
  140.       if (c == ';')
  141. !       {
  142. !         /*
  143. !           GIF terminator.
  144. !         */
  145. !         if (image_count < image_number)
  146. !           {
  147. !             Warning("unable to read image data",(char *) NULL);
  148. !             DestroyImage(image);
  149. !             return((Image *) NULL);
  150. !           }
  151. !         break;
  152. !       }
  153.       if (c == '!')
  154.         {
  155.           /*
  156. --- 618,624 ----
  157.       if (status == False)
  158.         break;
  159.       if (c == ';')
  160. !       break;  /* terminator */
  161.       if (c == '!')
  162.         {
  163.           /*
  164. ***************
  165. *** 676,681 ****
  166. --- 663,687 ----
  167.       /*
  168.         Read image attributes.
  169.       */
  170. +     if (image_count > 0)
  171. +       {
  172. +         /*
  173. +           Allocate image structure.
  174. +         */
  175. +         CompressColormap(image);
  176. +         image->next=AllocateImage("GIF");
  177. +         if (image->next == (Image *) NULL)
  178. +           {
  179. +             DestroyImages(image);
  180. +             return((Image *) NULL);
  181. +           }
  182. +         image->next->file=image->file;
  183. +         (void) sprintf(image->next->filename,"%s.%u\0",alien_info->filename,
  184. +           image->scene+1);
  185. +         image->next->scene=image->scene+1;
  186. +         image->next->last=image;
  187. +         image=image->next;
  188. +       }
  189.       image_count++;
  190.       status=ReadData((char *) header,1,9,image->file);
  191.       if (status == False)
  192. ***************
  193. *** 710,715 ****
  194. --- 716,722 ----
  195.           /*
  196.             Read local colormap.
  197.           */
  198. +         image->class=PseudoClass;
  199.           image->colors=1 << ((header[8] & 0x07)+1);
  200.           colormap=(unsigned char *)
  201.             malloc(3*image->colors*sizeof(unsigned char));
  202. ***************
  203. *** 784,793 ****
  204.           }
  205.           DestroyImage(interlaced_image);
  206.         }
  207. -     if (image_count == image_number)
  208. -       break;
  209.     }
  210.     CompressColormap(image);
  211.     CloseImage(image);
  212.     return(image);
  213.   }
  214. --- 791,800 ----
  215.           }
  216.           DestroyImage(interlaced_image);
  217.         }
  218.     }
  219.     CompressColormap(image);
  220. +   while (image->last != (Image *) NULL)
  221. +     image=image->last;
  222.     CloseImage(image);
  223.     return(image);
  224.   }
  225. diff -c -r ImageMagick/animate.c ImageMagick2.1.2/animate.c
  226. *** ImageMagick/animate.c    Thu Nov 12 13:35:10 1992
  227. --- ImageMagick2.1.2/animate.c    Sat Nov 14 01:51:40 1992
  228. ***************
  229. *** 1475,1480 ****
  230. --- 1475,1481 ----
  231.   
  232.     unsigned int
  233.       image_number,
  234. +     maximum_images,
  235.       reflect,
  236.       verbose;
  237.   
  238. ***************
  239. *** 1503,1509 ****
  240.     scale_geometry=(char *) NULL;
  241.     server_name=(char *) NULL;
  242.     verbose=False;
  243. !   images=(Image **) malloc(argc*sizeof(Image *));
  244.     if (images == (Image **) NULL)
  245.       Error("unable to animate images","memory allocation failed");
  246.     /*
  247. --- 1504,1511 ----
  248.     scale_geometry=(char *) NULL;
  249.     server_name=(char *) NULL;
  250.     verbose=False;
  251. !   maximum_images=2048;
  252. !   images=(Image **) malloc(maximum_images*sizeof(Image *));
  253.     if (images == (Image **) NULL)
  254.       Error("unable to animate images","memory allocation failed");
  255.     /*
  256. ***************
  257. *** 1973,1981 ****
  258.         {
  259.           Image
  260.             *image,
  261. !           info_image;
  262.   
  263. !         long
  264.             start_time;
  265.   
  266.           unsigned long
  267. --- 1975,1984 ----
  268.         {
  269.           Image
  270.             *image,
  271. !           info_image,
  272. !           *next_image;
  273.   
  274. !         time_t
  275.             start_time;
  276.   
  277.           unsigned long
  278. ***************
  279. *** 1984,1998 ****
  280.           /*
  281.             Option is a file name: begin by reading image from specified file.
  282.           */
  283. !         start_time=time((long *) 0);
  284.           (void) strcpy(alien_info.filename,option);
  285.           image=ReadAlienImage(&alien_info);
  286.           if (image == (Image *) NULL)
  287. !           continue;
  288.           do
  289.           {
  290. -           if (image->scene == 0)
  291. -             image->scene=image_number;
  292.             info_image=(*image);
  293.             /*
  294.               Transform image as defined by the clip, image and scale geometries.
  295. --- 1987,2002 ----
  296.           /*
  297.             Option is a file name: begin by reading image from specified file.
  298.           */
  299. !         start_time=time((time_t *) 0);
  300.           (void) strcpy(alien_info.filename,option);
  301.           image=ReadAlienImage(&alien_info);
  302.           if (image == (Image *) NULL)
  303. !           if (*option == '-')
  304. !             break;
  305. !           else
  306. !             continue;
  307.           do
  308.           {
  309.             info_image=(*image);
  310.             /*
  311.               Transform image as defined by the clip, image and scale geometries.
  312. ***************
  313. *** 2057,2063 ****
  314.                 */
  315.                 (void) fprintf(stderr,"[%u] %s",
  316.                   image->scene == 0 ? image_number : image->scene,
  317. !                 image->filename);
  318.                 (void) fprintf(stderr," %ux%u",info_image.columns,
  319.                   info_image.rows);
  320.                 if ((info_image.columns != image->columns) ||
  321. --- 2061,2067 ----
  322.                 */
  323.                 (void) fprintf(stderr,"[%u] %s",
  324.                   image->scene == 0 ? image_number : image->scene,
  325. !                 info_image.filename);
  326.                 (void) fprintf(stderr," %ux%u",info_image.columns,
  327.                   info_image.rows);
  328.                 if ((info_image.columns != image->columns) ||
  329. ***************
  330. *** 2088,2095 ****
  331.                       normalized_mean_error,normalized_maximum_error);
  332.                   }
  333.                 (void) fprintf(stderr," %s %lds\n",image->magick,
  334. !                 time((long *) 0)-start_time+1);
  335. !               (void) fprintf(stderr,"                                      \r");
  336.               }
  337.             /*
  338.               Pack image data to conserve memory (memory <=> speed).
  339. --- 2092,2098 ----
  340.                       normalized_mean_error,normalized_maximum_error);
  341.                   }
  342.                 (void) fprintf(stderr," %s %lds\n",image->magick,
  343. !                 time((time_t *) 0)-start_time+1);
  344.               }
  345.             /*
  346.               Pack image data to conserve memory (memory <=> speed).
  347. ***************
  348. *** 2098,2110 ****
  349.             (void) PackImage(image);
  350.             (void) free((void *) image->pixels);
  351.             image->pixels=(RunlengthPacket *) NULL;
  352.             images[image_number++]=image;
  353. !           image=image->next;
  354. !         } while (image != (Image *) NULL);
  355.         }
  356. !     }
  357. !   if (verbose)
  358. !     (void) fprintf(stderr,"\n");
  359.     if (image_number == 0)
  360.       Error("missing an image file name",(char *) NULL);
  361.     XAnimateImage(display,&resource_info,argv,argc,images,image_number);
  362. --- 2101,2124 ----
  363.             (void) PackImage(image);
  364.             (void) free((void *) image->pixels);
  365.             image->pixels=(RunlengthPacket *) NULL;
  366. +           if (image_number == maximum_images)
  367. +             {
  368. +               /*
  369. +                 Increase size of images array.
  370. +               */
  371. +               maximum_images<<=1;
  372. +               images=(Image **)
  373. +                 realloc((void *) images,maximum_images*sizeof(Image *));
  374. +               if (images == (Image **) NULL)
  375. +                 Error("unable to animate images","memory allocation failed");
  376. +             }
  377.             images[image_number++]=image;
  378. !           next_image=image->next;
  379. !           if (next_image != (Image *) NULL)
  380. !             image=next_image;
  381. !         } while (next_image != (Image *) NULL);
  382.         }
  383. !   }
  384.     if (image_number == 0)
  385.       Error("missing an image file name",(char *) NULL);
  386.     XAnimateImage(display,&resource_info,argv,argc,images,image_number);
  387. diff -c -r ImageMagick/display.c ImageMagick2.1.2/display.c
  388. *** ImageMagick/display.c    Thu Nov 12 13:35:03 1992
  389. --- ImageMagick2.1.2/display.c    Sat Nov 14 01:53:34 1992
  390. ***************
  391. *** 2636,2642 ****
  392.     if (resource_info->delay == 0)
  393.       timeout=(~0);
  394.     else
  395. !     timeout=time((long *) 0)+resource_info->delay;
  396.     do
  397.     {
  398.       /*
  399. --- 2636,2642 ----
  400.     if (resource_info->delay == 0)
  401.       timeout=(~0);
  402.     else
  403. !     timeout=(unsigned long) time((time_t *) 0)+resource_info->delay;
  404.     do
  405.     {
  406.       /*
  407. ***************
  408. *** 2884,2890 ****
  409.               if (resource_info->delay == 0)
  410.                 timeout=(~0);
  411.               else
  412. !               timeout=time((long *) 0)+resource_info->delay;
  413.               break;
  414.             }
  415.           if (event.xexpose.window == magnify_window.id)
  416. --- 2884,2890 ----
  417.               if (resource_info->delay == 0)
  418.                 timeout=(~0);
  419.               else
  420. !               timeout=(unsigned long) time((time_t *) 0)+resource_info->delay;
  421.               break;
  422.             }
  423.           if (event.xexpose.window == magnify_window.id)
  424. ***************
  425. *** 3171,3177 ****
  426.         *state&=(~UpdateConfigurationState);
  427.       }
  428.     }
  429. !   while ((timeout > time((long *) 0)) && !(*state & ExitState));
  430.     if (*state & PanIconMappedState)
  431.       XWithdrawWindow(display,pan_window.id,pan_window.screen);
  432.     if (*state & MagnifyMappedState)
  433. --- 3171,3177 ----
  434.         *state&=(~UpdateConfigurationState);
  435.       }
  436.     }
  437. !   while ((timeout > time((time_t *) 0)) && !(*state & ExitState));
  438.     if (*state & PanIconMappedState)
  439.       XWithdrawWindow(display,pan_window.id,pan_window.screen);
  440.     if (*state & MagnifyMappedState)
  441. ***************
  442. *** 5455,5461 ****
  443.             info_image,
  444.             *next_image;
  445.   
  446. !         long
  447.             start_time;
  448.   
  449.           unsigned long
  450. --- 5455,5461 ----
  451.             info_image,
  452.             *next_image;
  453.   
  454. !         time_t
  455.             start_time;
  456.   
  457.           unsigned long
  458. ***************
  459. *** 5464,5470 ****
  460.           /*
  461.             Option is a file name: begin by reading image from specified file.
  462.           */
  463. !         start_time=time((long *) 0);
  464.           (void) strcpy(alien_info.filename,option);
  465.           image=ReadAlienImage(&alien_info);
  466.           if (image == (Image *) NULL)
  467. --- 5464,5470 ----
  468.           /*
  469.             Option is a file name: begin by reading image from specified file.
  470.           */
  471. !         start_time=time((time_t *) 0);
  472.           (void) strcpy(alien_info.filename,option);
  473.           image=ReadAlienImage(&alien_info);
  474.           if (image == (Image *) NULL)
  475. ***************
  476. *** 5640,5646 ****
  477.                       normalized_mean_error,normalized_maximum_error);
  478.                   }
  479.                 (void) fprintf(stderr," %s %lds\n",image->magick,
  480. !                 time((long *) 0)-start_time+1);
  481.               }
  482.             /*
  483.               Proceed to next/previous image.
  484. --- 5640,5646 ----
  485.                       normalized_mean_error,normalized_maximum_error);
  486.                   }
  487.                 (void) fprintf(stderr," %s %lds\n",image->magick,
  488. !                 time((time_t *) 0)-start_time+1);
  489.               }
  490.             /*
  491.               Proceed to next/previous image.
  492. diff -c -r ImageMagick/display.h ImageMagick2.1.2/display.h
  493. *** ImageMagick/display.h    Mon Nov  9 14:48:50 1992
  494. --- ImageMagick2.1.2/display.h    Sat Nov 14 01:51:50 1992
  495. ***************
  496. *** 6,11 ****
  497. --- 6,12 ----
  498.   #include <math.h>
  499.   #if __STDC__ || defined(sgi) || defined(AIXV3)
  500.   #include <stdlib.h>
  501. + #include <unistd.h>
  502.   #else
  503.   #ifndef vms
  504.   #include <malloc.h>
  505. diff -c -r ImageMagick/image.c ImageMagick2.1.2/image.c
  506. *** ImageMagick/image.c    Wed Nov 11 14:12:17 1992
  507. --- ImageMagick2.1.2/image.c    Sat Nov 14 01:51:39 1992
  508. ***************
  509. *** 3356,3362 ****
  510.               return((Image *) NULL);
  511.             }
  512.           image->next->file=image->file;
  513. !         (void) strcpy(image->next->filename,image->filename);
  514.           image->next->last=image;
  515.           image=image->next;
  516.         }
  517. --- 3356,3363 ----
  518.               return((Image *) NULL);
  519.             }
  520.           image->next->file=image->file;
  521. !         (void) sprintf(image->next->filename,"%s.%u\0",filename,image->scene+1);
  522. !         image->next->scene=image->scene+1;
  523.           image->next->last=image;
  524.           image=image->next;
  525.         }
  526. Common subdirectories: ImageMagick/images and ImageMagick2.1.2/images
  527. diff -c -r ImageMagick/import.c ImageMagick2.1.2/import.c
  528. *** ImageMagick/import.c    Wed Nov 11 14:12:12 1992
  529. --- ImageMagick2.1.2/import.c    Sat Nov 14 01:53:04 1992
  530. ***************
  531. *** 226,232 ****
  532.       i,
  533.       x;
  534.   
  535. !   long
  536.       start_time;
  537.   
  538.     unsigned int
  539. --- 226,232 ----
  540.       i,
  541.       x;
  542.   
  543. !   time_t
  544.       start_time;
  545.   
  546.     unsigned int
  547. ***************
  548. *** 447,453 ****
  549.     */
  550.     if (delay > 0)
  551.       (void) sleep(delay);
  552. !   start_time=time((long *) 0);
  553.     image=ReadXImage(target_window,server_name,frame,screen,borders);
  554.     if (image == (Image *) NULL)
  555.       exit(1);
  556. --- 447,453 ----
  557.     */
  558.     if (delay > 0)
  559.       (void) sleep(delay);
  560. !   start_time=time((time_t *) 0);
  561.     image=ReadXImage(target_window,server_name,frame,screen,borders);
  562.     if (image == (Image *) NULL)
  563.       exit(1);
  564. ***************
  565. *** 472,478 ****
  566.         else
  567.           (void) fprintf(stderr," PseudoClass ");
  568.         (void) fprintf(stderr,"%dc %s %ds\n",image->colors,image->magick,
  569. !         time((long *) 0)-start_time+1);
  570.       }
  571.     DestroyImage(image);
  572.     XCloseDisplay(display);
  573. --- 472,478 ----
  574.         else
  575.           (void) fprintf(stderr," PseudoClass ");
  576.         (void) fprintf(stderr,"%dc %s %ds\n",image->colors,image->magick,
  577. !         time((time_t *) 0)-start_time+1);
  578.       }
  579.     DestroyImage(image);
  580.     XCloseDisplay(display);
  581. diff -c -r ImageMagick/montage.c ImageMagick2.1.2/montage.c
  582. *** ImageMagick/montage.c    Thu Nov 12 13:35:11 1992
  583. --- ImageMagick2.1.2/montage.c    Sat Nov 14 01:51:40 1992
  584. ***************
  585. *** 649,655 ****
  586.       i,
  587.       x;
  588.   
  589. !   long
  590.       start_time;
  591.   
  592.     unsigned int
  593. --- 649,655 ----
  594.       i,
  595.       x;
  596.   
  597. !   time_t
  598.       start_time;
  599.   
  600.     unsigned int
  601. ***************
  602. *** 657,662 ****
  603. --- 657,663 ----
  604.       compression,
  605.       display_image,
  606.       image_number,
  607. +     maximum_images,
  608.       tiles_per_row,
  609.       verbose;
  610.   
  611. ***************
  612. *** 694,700 ****
  613.     server_name=(char *) NULL;
  614.     tiles_per_row=0;
  615.     verbose=False;
  616. !   images=(Image **) malloc(argc*sizeof(Image *));
  617.     if (images == (Image **) NULL)
  618.       Error("unable to montage images","memory allocation failed");
  619.     /*
  620. --- 695,702 ----
  621.     server_name=(char *) NULL;
  622.     tiles_per_row=0;
  623.     verbose=False;
  624. !   maximum_images=2048;
  625. !   images=(Image **) malloc(maximum_images*sizeof(Image *));
  626.     if (images == (Image **) NULL)
  627.       Error("unable to montage images","memory allocation failed");
  628.     /*
  629. ***************
  630. *** 1112,1118 ****
  631.           /*
  632.             Option is a file name: begin by reading image from specified file.
  633.           */
  634. !         start_time=time((long *) 0);
  635.           (void) strcpy(alien_info.filename,option);
  636.           image=ReadAlienImage(&alien_info);
  637.           if (image == (Image *) NULL)
  638. --- 1114,1120 ----
  639.           /*
  640.             Option is a file name: begin by reading image from specified file.
  641.           */
  642. !         start_time=time((time_t *) 0);
  643.           (void) strcpy(alien_info.filename,option);
  644.           image=ReadAlienImage(&alien_info);
  645.           if (image == (Image *) NULL)
  646. ***************
  647. *** 1196,1201 ****
  648. --- 1198,1214 ----
  649.             (void) PackImage(image);
  650.             (void) free((void *) image->pixels);
  651.             image->pixels=(RunlengthPacket *) NULL;
  652. +           if (image_number == maximum_images)
  653. +             {
  654. +               /*
  655. +                 Increase size of images array.
  656. +               */
  657. +               maximum_images<<=1;
  658. +               images=(Image **)
  659. +                 realloc((void *) images,maximum_images*sizeof(Image *));
  660. +               if (images == (Image **) NULL)
  661. +                 Error("unable to montage images","memory allocation failed");
  662. +             }
  663.             images[image_number++]=image;
  664.             image=image->next;
  665.           } while (image != (Image *) NULL);
  666. ***************
  667. *** 1234,1240 ****
  668.         else
  669.           (void) fprintf(stderr," PseudoClass ");
  670.         (void) fprintf(stderr,"%uc %s %lds\n",montage_image->colors,
  671. !         montage_image->magick,time((long *) 0)-start_time+1);
  672.       }
  673.     DestroyImage(montage_image);
  674.     (void) free((void *) images);
  675. --- 1247,1253 ----
  676.         else
  677.           (void) fprintf(stderr," PseudoClass ");
  678.         (void) fprintf(stderr,"%uc %s %lds\n",montage_image->colors,
  679. !         montage_image->magick,time((time_t *) 0)-start_time+1);
  680.       }
  681.     DestroyImage(montage_image);
  682.     (void) free((void *) images);
  683. Common subdirectories: ImageMagick/scenes and ImageMagick2.1.2/scenes
  684. Common subdirectories: ImageMagick/utilities and ImageMagick2.1.2/utilities
  685. Common subdirectories: ImageMagick/xtp and ImageMagick2.1.2/xtp
  686. diff -c -r ImageMagick/utilities/MIFFtoSTEREO.c ImageMagick2.1.2/utilities/MIFFtoSTEREO.c
  687. *** ImageMagick/utilities/MIFFtoSTEREO.c    Thu Nov 12 13:35:12 1992
  688. --- ImageMagick2.1.2/utilities/MIFFtoSTEREO.c    Sat Nov 14 01:52:04 1992
  689. ***************
  690. *** 174,186 ****
  691.     int
  692.       status;
  693.   
  694. !   long
  695.       start_time;
  696.   
  697.     application_name=argv[0];
  698.     if (argc < 4)
  699.       Usage((char *) NULL);
  700. !   start_time=time((long *) 0);
  701.     left_image=ReadImage(argv[1]);
  702.     if (left_image == (Image *) NULL)
  703.       exit(1);
  704. --- 174,186 ----
  705.     int
  706.       status;
  707.   
  708. !   time_t
  709.       start_time;
  710.   
  711.     application_name=argv[0];
  712.     if (argc < 4)
  713.       Usage((char *) NULL);
  714. !   start_time=time((time_t *) 0);
  715.     left_image=ReadImage(argv[1]);
  716.     if (left_image == (Image *) NULL)
  717.       exit(1);
  718. ***************
  719. *** 201,206 ****
  720.     else
  721.       (void) fprintf(stderr," PseudoClass ");
  722.     (void) fprintf(stderr,"%dc %s %ds\n",stereo_image->colors,
  723. !     stereo_image->magick,time((long *) 0)-start_time+1);
  724.     return(!status);
  725.   }
  726. --- 201,206 ----
  727.     else
  728.       (void) fprintf(stderr," PseudoClass ");
  729.     (void) fprintf(stderr,"%dc %s %ds\n",stereo_image->colors,
  730. !     stereo_image->magick,time((time_t *) 0)-start_time+1);
  731.     return(!status);
  732.   }
  733. diff -c -r ImageMagick/utilities/convert.c ImageMagick2.1.2/utilities/convert.c
  734. *** ImageMagick/utilities/convert.c    Thu Nov 12 13:35:13 1992
  735. --- ImageMagick2.1.2/utilities/convert.c    Sat Nov 14 01:52:04 1992
  736. ***************
  737. *** 75,80 ****
  738. --- 75,81 ----
  739.   #include "display.h"
  740.   #include "image.h"
  741.   #include "alien.h"
  742. + #include "X.h"
  743.   
  744.   /*
  745.     Global declarations.
  746. ***************
  747. *** 220,226 ****
  748.       status,
  749.       x;
  750.   
  751. !   long
  752.       start_time;
  753.   
  754.     unsigned int
  755. --- 221,227 ----
  756.       status,
  757.       x;
  758.   
  759. !   time_t
  760.       start_time;
  761.   
  762.     unsigned int
  763. ***************
  764. *** 446,452 ****
  765.     }
  766.     if (filename == (char *) NULL)
  767.       Error("missing an image file name",(char *) NULL);
  768. !   start_time=time((long *) 0);
  769.     (void) strcpy(alien_info.filename,filename);
  770.     image=ReadAlienImage(&alien_info);
  771.     if (image == (Image *) NULL)
  772. --- 447,453 ----
  773.     }
  774.     if (filename == (char *) NULL)
  775.       Error("missing an image file name",(char *) NULL);
  776. !   start_time=time((time_t *) 0);
  777.     (void) strcpy(alien_info.filename,filename);
  778.     image=ReadAlienImage(&alien_info);
  779.     if (image == (Image *) NULL)
  780. ***************
  781. *** 512,518 ****
  782.                 normalized_mean_error,normalized_maximum_error);
  783.             }
  784.           (void) fprintf(stderr," %s %lds\n",image->magick,
  785. !           time((long *) 0)-start_time+1);
  786.         }
  787.       next_image=image->next;
  788.       DestroyImage(image);
  789. --- 513,519 ----
  790.                 normalized_mean_error,normalized_maximum_error);
  791.             }
  792.           (void) fprintf(stderr," %s %lds\n",image->magick,
  793. !           time((time_t *) 0)-start_time+1);
  794.         }
  795.       next_image=image->next;
  796.       DestroyImage(image);
  797. diff -c -r ImageMagick/utilities/mogrify.c ImageMagick2.1.2/utilities/mogrify.c
  798. *** ImageMagick/utilities/mogrify.c    Thu Nov 12 13:35:14 1992
  799. --- ImageMagick2.1.2/utilities/mogrify.c    Sat Nov 14 01:52:04 1992
  800. ***************
  801. *** 88,93 ****
  802. --- 88,94 ----
  803.   #include "display.h"
  804.   #include "image.h"
  805.   #include "alien.h"
  806. + #include "X.h"
  807.   
  808.   /*
  809.     Global declarations.
  810. ***************
  811. *** 250,255 ****
  812. --- 251,257 ----
  813.       enhance,
  814.       image_number,
  815.       inverse,
  816. +     maximum_images,
  817.       monochrome,
  818.       noise,
  819.       normalize,
  820. ***************
  821. *** 287,295 ****
  822.     scene=0;
  823.     tree_depth=0;
  824.     verbose=False;
  825. !   images=(Image **) malloc(argc*sizeof(Image *));
  826.     if (images == (Image **) NULL)
  827. !     Error("unable to animate images","memory allocation failed");
  828.     /*
  829.       Parse command line.
  830.     */
  831. --- 289,298 ----
  832.     scene=0;
  833.     tree_depth=0;
  834.     verbose=False;
  835. !   maximum_images=2048;
  836. !   images=(Image **) malloc(maximum_images*sizeof(Image *));
  837.     if (images == (Image **) NULL)
  838. !     Error("unable to mogrify images","memory allocation failed");
  839.     /*
  840.       Parse command line.
  841.     */
  842. ***************
  843. *** 555,564 ****
  844.         {
  845.           Image
  846.             *image,
  847. !           *next_image,
  848. !           info_image;
  849.   
  850. !         long
  851.             start_time;
  852.   
  853.           unsigned long
  854. --- 558,567 ----
  855.         {
  856.           Image
  857.             *image,
  858. !           info_image,
  859. !           *next_image;
  860.   
  861. !         time_t
  862.             start_time;
  863.   
  864.           unsigned long
  865. ***************
  866. *** 567,573 ****
  867.           /*
  868.             Option is a file name: begin by reading image from specified file.
  869.           */
  870. !         start_time=time((long *) 0);
  871.           (void) strcpy(alien_info.filename,option);
  872.           image=ReadAlienImage(&alien_info);
  873.           if (image == (Image *) NULL)
  874. --- 570,576 ----
  875.           /*
  876.             Option is a file name: begin by reading image from specified file.
  877.           */
  878. !         start_time=time((time_t *) 0);
  879.           (void) strcpy(alien_info.filename,option);
  880.           image=ReadAlienImage(&alien_info);
  881.           if (image == (Image *) NULL)
  882. ***************
  883. *** 706,712 ****
  884.                       normalized_mean_error,normalized_maximum_error);
  885.                   }
  886.                 (void) fprintf(stderr," %s %lds\n",image->magick,
  887. !                 time((long *) 0)-start_time+1);
  888.               }
  889.             if (compression != UnknownCompression)
  890.               image->compression=compression;
  891. --- 709,715 ----
  892.                       normalized_mean_error,normalized_maximum_error);
  893.                   }
  894.                 (void) fprintf(stderr," %s %lds\n",image->magick,
  895. !                 time((time_t *) 0)-start_time+1);
  896.               }
  897.             if (compression != UnknownCompression)
  898.               image->compression=compression;
  899. ***************
  900. *** 714,719 ****
  901. --- 717,733 ----
  902.               image->compression=info_image.compression;
  903.             if (number_colors == 0)
  904.               (void) WriteAlienImage(image);
  905. +           if (image_number == maximum_images)
  906. +             {
  907. +               /*
  908. +                 Increase size of images array.
  909. +               */
  910. +               maximum_images<<=1;
  911. +               images=(Image **)
  912. +                 realloc((void *) images,maximum_images*sizeof(Image *));
  913. +               if (images == (Image **) NULL)
  914. +                 Error("unable to mogrify images","memory allocation failed");
  915. +             }
  916.             images[image_number++]=image;
  917.             next_image=image->next;
  918.             if (next_image != (Image *) NULL)
  919. ***************
  920. *** 727,742 ****
  921.       Error("missing an image file name",(char *) NULL);
  922.     if (number_colors > 0)
  923.       {
  924. -       unsigned int
  925. -         number_images;
  926.         /*
  927.           Global colormap option;  reduce colors then write image.
  928.         */
  929. !       number_images=image_number;
  930. !       QuantizeImages(images,number_images,number_colors,tree_depth,dither,
  931.           colorspace,True);
  932. !       for (image_number=0; image_number < number_images; image_number++)
  933.         {
  934.           (void) WriteAlienImage(images[image_number]);
  935.           DestroyImage(images[image_number]);
  936. --- 741,753 ----
  937.       Error("missing an image file name",(char *) NULL);
  938.     if (number_colors > 0)
  939.       {
  940.         /*
  941.           Global colormap option;  reduce colors then write image.
  942.         */
  943. !       maximum_images=image_number;
  944. !       QuantizeImages(images,maximum_images,number_colors,tree_depth,dither,
  945.           colorspace,True);
  946. !       for (image_number=0; image_number < maximum_images; image_number++)
  947.         {
  948.           (void) WriteAlienImage(images[image_number]);
  949.           DestroyImage(images[image_number]);
  950. -- 
  951. cristy@dupont.com
  952.