home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sources / bugs / 314 < prev    next >
Encoding:
Text File  |  1992-12-22  |  45.2 KB  |  1,437 lines

  1. Newsgroups: comp.sources.bugs
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!udel!louie!eplrx7!eplrx7.es.dupont.com!cristy
  3. From: cristy@eplrx7.es.duPont.com (Cristy)
  4. Subject: ImageMagick 2.2 - patch #1, Part 03/3
  5. Message-ID: <cristy.724966590@eplrx7.es.dupont.com>
  6. Summary: X11 image processing and display utilities
  7. Keywords: UNIX VMS X11 SGI DEC Cray Sun Vax
  8. Organization: DuPont Engineering Physics Laboratory
  9. Date: Mon, 21 Dec 1992 19:36:30 GMT
  10. Lines: 1425
  11.  
  12. Submitted-by: cristy@dupont.com
  13. Archive-name: ImageMagick/patch0103
  14.  
  15. #!/bin/sh
  16. # this is magick.03 (part 3 of ImageMagick/patch01)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file fix-01 continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 3; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test ! -f _shar_wnt_.tmp; then
  33.     echo 'x - still skipping fix-01'
  34. else
  35. echo 'x - continuing file fix-01'
  36. sed 's/^X//' << 'SHAR_EOF' >> 'fix-01' &&
  37. !           return((Image *) NULL);
  38. !         }
  39. !       rotated_image->columns=image->rows;
  40. !       rotated_image->rows=image->columns;
  41. X      }
  42. X    else
  43. X      {
  44. !       y_width=image->columns+
  45. !         (int) ceil(fabs(x_shear)*(double) (image->rows-1));
  46. !       number_columns=image->columns+2*
  47. !         (int) ceil(fabs(x_shear)*(double) (image->rows-1));
  48. !       number_rows=image->rows+
  49. !         (int) ceil(fabs(y_shear)*(double) (y_width-1));
  50. !       rotated_image=CopyImage(image,number_columns,number_rows,False);
  51. !       if (rotated_image == (Image *) NULL)
  52. !         {
  53. !           Warning("unable to rotate image","memory allocation failed");
  54. !           return((Image *) NULL);
  55. !         }
  56. !       rotated_image->columns=image->columns;
  57. !       rotated_image->rows=image->rows;
  58. X      }
  59. X    /*
  60. !     Initialize rotated image attributes.
  61. X    */
  62. !   rotated_pixels=(ColorPacket *)
  63. !     malloc(number_columns*(number_rows+2)*sizeof(ColorPacket));
  64. !   if (rotated_pixels == (ColorPacket *) NULL)
  65. X      {
  66. X        Warning("unable to rotate image","memory allocation failed");
  67. X        return((Image *) NULL);
  68. X      }
  69. !   if ((x_shear == 0.0) || (y_shear == 0.0))
  70. !     {
  71. !       /*
  72. !         No shearing required; do integral rotation.
  73. !       */
  74. !       x_offset=0;
  75. !       y_offset=0;
  76. !       IntegralRotation(image,rotated_image->columns,rotated_image->rows,
  77. !         rotated_pixels+number_columns,number_columns,x_offset,y_offset,
  78. !         rotations);
  79. !     }
  80. !   else
  81. !     {
  82. !       typedef struct Point
  83. !       {
  84. !         double
  85. !           x,
  86. !           y;
  87. !       } Point;
  88. X  
  89. !       double
  90. !         x_max,
  91. !         x_min,
  92. !         y_max,
  93. !         y_min;
  94. X  
  95. !       Point
  96. !         corners[4];
  97. X  
  98. !       unsigned char
  99. !         *range_limit,
  100. !         *range_table;
  101. X  
  102. !       unsigned int
  103. !         column,
  104. !         row;
  105. X  
  106. !       /*
  107. !         Initialize rotated image buffer to background color.
  108. !       */
  109. !       rotated_image->class=DirectClass;
  110. !       background.red=image->pixels[0].red;
  111. !       background.green=image->pixels[0].green;
  112. !       background.blue=image->pixels[0].blue;
  113. !       p=rotated_pixels;
  114. !       for (i=0; i < (number_columns*(number_rows+2)); i++)
  115. !       {
  116. !         *p=background;
  117. !         p++;
  118. !       }
  119. !       /*
  120. !         Perform an initial integral 90 degree rotation.
  121. !       */
  122. !       x_offset=(number_columns-rotated_image->columns)/2;
  123. !       y_offset=(number_rows-rotated_image->rows)/2;
  124. !       IntegralRotation(image,rotated_image->columns,rotated_image->rows,
  125. !         rotated_pixels+number_columns,number_columns,x_offset,y_offset,
  126. !         rotations);
  127. !       /*
  128. !         Initialize range table.
  129. !       */
  130. !       range_table=(unsigned char *) malloc(3*(MaxRGB+1)*sizeof(unsigned char));
  131. !       if (range_table == (unsigned char *) NULL)
  132. !         {
  133. !           DestroyImage(rotated_image);
  134. !           Warning("unable to rotate image","memory allocation failed");
  135. !           return((Image *) NULL);
  136. !         }
  137. !       for (i=0; i <= MaxRGB; i++)
  138. !       {
  139. !         range_table[i]=0;
  140. !         range_table[i+(MaxRGB+1)]=(unsigned char) i;
  141. !         range_table[i+(MaxRGB+1)*2]=MaxRGB;
  142. !       }
  143. !       range_limit=range_table+(MaxRGB+1);
  144. !       /*
  145. !         Perform a fractional rotation.  First, shear the image rows.
  146. !       */
  147. !       row=(number_rows-rotated_image->rows)/2;
  148. !       for (i=0; i < rotated_image->rows; i++)
  149. !       {
  150. !         RowShear(rotated_pixels+number_columns,number_columns,row,x_offset,
  151. !           rotated_image->columns,x_shear*
  152. !           (((double) i)-(rotated_image->rows-1)/2.0),background,range_limit);
  153. !         row++;
  154. !       }
  155. !       /*
  156. !         Shear the image columns.
  157. !       */
  158. !       column=(number_columns-y_width)/2;
  159. !       for (i=0; i < y_width; i++)
  160. !       {
  161. !         ColumnShear(rotated_pixels+number_columns,number_columns,column,
  162. !           y_offset,rotated_image->rows,y_shear*(((double) i)-(y_width-1)/2.0),
  163. !           background,range_limit);
  164. !         column++;
  165. !       }
  166. !       /*
  167. !         Shear the image rows again.
  168. !       */
  169. !       for (i=0; i < number_rows; i++)
  170. !         RowShear(rotated_pixels+number_columns,number_columns,(unsigned int) i,
  171. !           (number_columns-y_width)/2,y_width,x_shear*
  172. !           (((double) i)-(number_rows-1)/2.0),background,range_limit);
  173. !       (void) free((char *) range_table);
  174. !       /*
  175. !         Calculate the rotated image size.
  176. !       */
  177. !       corners[0].x=(-((int) rotated_image->columns)/2.0);
  178. !       corners[0].y=(-((int) rotated_image->rows)/2.0);
  179. !       corners[1].x=((int) rotated_image->columns)/2.0;
  180. !       corners[1].y=(-((int) rotated_image->rows)/2.0);
  181. !       corners[2].x=(-((int) rotated_image->columns)/2.0);
  182. !       corners[2].y=((int) rotated_image->rows)/2.0;
  183. !       corners[3].x=((int) rotated_image->columns)/2.0;
  184. !       corners[3].y=((int) rotated_image->rows)/2.0;
  185. !       for (i=0; i < 4; i++)
  186. !       {
  187. !         corners[i].x+=x_shear*corners[i].y;
  188. !         corners[i].y+=y_shear*corners[i].x;
  189. !         corners[i].x+=x_shear*corners[i].y;
  190. !         corners[i].x+=(number_columns-1)/2.0;
  191. !         corners[i].y+=(number_rows-1)/2.0;
  192. !       }
  193. !       x_min=corners[0].x;
  194. !       y_min=corners[0].y;
  195. !       x_max=corners[0].x;
  196. !       y_max=corners[0].y;
  197. !       for (i=1; i < 4; i++)
  198. !       {
  199. !         if (x_min > corners[i].x)
  200. !           x_min=corners[i].x;
  201. !         if (y_min > corners[i].y)
  202. !           y_min=corners[i].y;
  203. !         if (x_max < corners[i].x)
  204. !           x_max=corners[i].x;
  205. !         if (y_max < corners[i].y)
  206. !           y_max=corners[i].y;
  207. !       }
  208. !       x_min=floor((double) x_min);
  209. !       x_max=ceil((double) x_max);
  210. !       y_min=floor((double) y_min);
  211. !       y_max=ceil((double) y_max);
  212. !       if (!clip)
  213. !         {
  214. !           /*
  215. !             Rotated image is not clipped.
  216. !           */
  217. !           rotated_image->columns=(unsigned int) (x_max-x_min);
  218. !           rotated_image->rows=(unsigned int) (y_max-y_min);
  219. !         }
  220. !       x_offset=(int) x_min+((int) (x_max-x_min)-rotated_image->columns)/2;
  221. !       y_offset=(int) y_min+((int) (y_max-y_min)-rotated_image->rows)/2;
  222. !     }
  223. X    /*
  224. !     Convert the rectangular array of pixels to runlength packets.
  225. X    */
  226. !   rotated_image->packets=rotated_image->columns*rotated_image->rows;
  227. !   q=rotated_image->pixels;
  228. !   for (y=0; y < rotated_image->rows; y++)
  229. !   {
  230. !     p=rotated_pixels+number_columns+(y+y_offset)*number_columns+x_offset;
  231. !     for (x=0; x < rotated_image->columns; x++)
  232. X      {
  233. !       q->red=p->red;
  234. !       q->green=p->green;
  235. !       q->blue=p->blue;
  236. !       q->index=p->index;
  237. !       q->length=0;
  238. !       q++;
  239. !       p++;
  240. X      }
  241. X    }
  242. !   (void) free((char *) rotated_pixels);
  243. !   return(rotated_image);
  244. X  }
  245. --- 989,1214 ----
  246. X    */
  247. X    x_shear=(-tan(DegreesToRadians(degrees)/2.0));
  248. X    y_shear=sin(DegreesToRadians(degrees));
  249. +   integral_image=IntegralRotateImage(image,rotations);
  250. +   if ((x_shear == 0.0) || (y_shear == 0.0))
  251. +     return(integral_image);
  252. +   /*
  253. +     Initialize range table.
  254. +   */
  255. +   range_table=(unsigned char *) malloc(3*(MaxRGB+1)*sizeof(unsigned char));
  256. +   if (range_table == (unsigned char *) NULL)
  257. +     {
  258. +       DestroyImage(integral_image);
  259. +       Warning("unable to rotate image","memory allocation failed");
  260. +       return((Image *) NULL);
  261. +     }
  262. +   for (i=0; i <= MaxRGB; i++)
  263. +   {
  264. +     range_table[i]=0;
  265. +     range_table[i+(MaxRGB+1)]=(unsigned char) i;
  266. +     range_table[i+(MaxRGB+1)*2]=MaxRGB;
  267. +   }
  268. +   range_limit=range_table+(MaxRGB+1);
  269. +   /*
  270. +     Compute image size.
  271. +   */
  272. X    if ((rotations == 1) || (rotations == 3))
  273. X      {
  274. !       y_width=image->rows+(int) ceil(fabs(x_shear)*(double) (image->columns-1));
  275. !       x_offset=(image->rows+2*
  276. !         (int) ceil(fabs(x_shear)*(double) (image->columns-1))-image->rows)/2;
  277. !       y_offset=(image->columns+
  278. !         (int) ceil(fabs(y_shear)*(double) (y_width-1))-image->columns)/2;
  279. !       width=image->rows;
  280. !       height=image->columns;
  281. X      }
  282. X    else
  283. X      {
  284. !       y_width=image->columns+(int) ceil(fabs(x_shear)*(double) (image->rows-1));
  285. !       x_offset=(image->columns+2*
  286. !         (int) ceil(fabs(x_shear)*(double) (image->rows-1))-image->columns)/2;
  287. !       y_offset=(image->rows+
  288. !         (int) ceil(fabs(y_shear)*(double) (y_width-1))-image->rows)/2;
  289. !       width=image->columns;
  290. !       height=image->rows;
  291. X      }
  292. X    /*
  293. !     Surround image with border of background color.
  294. X    */
  295. !   background.red=image->pixels[0].red;
  296. !   background.green=image->pixels[0].green;
  297. !   background.blue=image->pixels[0].blue;
  298. !   rotated_image=BorderImage(integral_image,x_offset,y_offset+1,background);
  299. !   DestroyImage(integral_image);
  300. !   if (rotated_image == (Image *) NULL)
  301. X      {
  302. X        Warning("unable to rotate image","memory allocation failed");
  303. X        return((Image *) NULL);
  304. X      }
  305. !   rotated_image->class=DirectClass;
  306. !   /*
  307. !     Perform a fractional rotation.  First, shear the image rows.
  308. !   */
  309. !   XShearImage(rotated_image,x_shear,width,height,x_offset,
  310. !     (int) (rotated_image->rows-height-2)/2+1,background,range_limit);
  311. !   /*
  312. !     Shear the image columns.
  313. !   */
  314. !   YShearImage(rotated_image,y_shear,y_width,height,
  315. !     (int) (rotated_image->columns-y_width)/2,y_offset+1,background,range_limit);
  316. !   /*
  317. !     Shear the image rows again.
  318. !   */
  319. !   XShearImage(rotated_image,x_shear,y_width,rotated_image->rows-2,
  320. !     (int) (rotated_image->columns-y_width)/2,1,background,range_limit);
  321. !   (void) free((char *) range_table);
  322. !   clipped_image=ClipShearImage(rotated_image,x_shear,y_shear,width,height,clip);
  323. !   DestroyImage(rotated_image);
  324. !   return(clipped_image);
  325. ! }
  326. ! /*
  327. ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  328. ! %                                                                             %
  329. ! %                                                                             %
  330. ! %                                                                             %
  331. ! %   S h e a r I m a g e                                                       %
  332. ! %                                                                             %
  333. ! %                                                                             %
  334. ! %                                                                             %
  335. ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  336. ! %
  337. ! %  Function ShearImage creates a new image that is a sheared copy of an
  338. ! %  existing one.  Shearing slides one edge of an image along the X or Y
  339. ! %  axis, creating a parallelogram.  An X direction shear slides an edge
  340. ! %  along the X axis, while a Y direction shear slides an edge along the Y
  341. ! %  axis.  The amount of the shear is controlled by a shear angle.  For X
  342. ! %  direction shears, x_shear is measured relative to the Y axis, and
  343. ! %  similarly, for Y direction shears y_shear is measured relative to the
  344. ! %  X axis.  Empty triangles left over from shearing the image are filled
  345. ! %  with the color defined by the pixel at location (0,0).  ShearImage
  346. ! %  allocates the memory necessary for the new Image structure and returns
  347. ! %  a pointer to the new image.
  348. ! %
  349. ! %  Function ShearImage is based on the paper "A Fast Algorithm for General
  350. ! %  Raster Rotatation" by Alan W. Paeth.  
  351. ! %
  352. ! %  The format of the ShearImage routine is:
  353. ! %
  354. ! %      ShearImage(image,x_shear,y_shear,clip)
  355. ! %
  356. ! %  A description of each parameter follows.
  357. ! %
  358. ! %    o status: Function ShearImage returns a pointer to the image after
  359. ! %      rotating.  A null image is returned if there is a memory shortage.
  360. ! %
  361. ! %    o image: The address of a structure of type Image;  returned from
  362. ! %      ReadImage.
  363. ! %
  364. ! %    o x_shear, y_shear: Specifies the number of degrees to shear the image.
  365. ! %
  366. ! %    o clip: A value other than zero clips the corners of the rotated
  367. ! %      image and retains the original image size.
  368. ! %
  369. ! %
  370. ! */
  371. ! Image *ShearImage(image,x_shear,y_shear,clip)
  372. ! Image
  373. !   *image;
  374. X  
  375. ! double
  376. !   x_shear,
  377. !   y_shear;
  378. X  
  379. ! unsigned int
  380. !   clip;
  381. ! {
  382. !   ColorPacket
  383. !     background;
  384. X  
  385. !   Image
  386. !     *clipped_image,
  387. !     *sheared_image;
  388. X  
  389. !   int
  390. !     x_offset,
  391. !     y_offset;
  392. X  
  393. !   register int
  394. !     i;
  395. !   unsigned char
  396. !     *range_limit,
  397. !     *range_table;
  398. !   unsigned int
  399. !     y_width;
  400. X    /*
  401. !     Adjust rotation angle.
  402. X    */
  403. !   while (x_shear < -45.0)
  404. !     x_shear+=360.0;
  405. !   while (x_shear > 45.0)
  406. !     x_shear-=90.0;
  407. !   while (y_shear < -45.0)
  408. !     y_shear+=360.0;
  409. !   while (y_shear > 45.0)
  410. !     y_shear-=90.0;
  411. !   x_shear=tan(DegreesToRadians(x_shear)/2.0);
  412. !   y_shear=(-sin(DegreesToRadians(y_shear)));
  413. !   /*
  414. !     Initialize range table.
  415. !   */
  416. !   range_table=(unsigned char *) malloc(3*(MaxRGB+1)*sizeof(unsigned char));
  417. !   if (range_table == (unsigned char *) NULL)
  418. X      {
  419. !       Warning("unable to rotate image","memory allocation failed");
  420. !       return((Image *) NULL);
  421. X      }
  422. +   for (i=0; i <= MaxRGB; i++)
  423. +   {
  424. +     range_table[i]=0;
  425. +     range_table[i+(MaxRGB+1)]=(unsigned char) i;
  426. +     range_table[i+(MaxRGB+1)*2]=MaxRGB;
  427. X    }
  428. !   range_limit=range_table+(MaxRGB+1);
  429. !   /*
  430. !     Compute image size.
  431. !   */
  432. !   y_width=image->columns+(int) ceil(fabs(x_shear)*(double) (image->rows-1));
  433. !   x_offset=(image->columns+2*
  434. !     (int) ceil(fabs(x_shear)*(double) (image->rows-1))-image->columns)/2;
  435. !   y_offset=(image->rows+
  436. !     (int) ceil(fabs(y_shear)*(double) (y_width-1))-image->rows)/2;
  437. !   /*
  438. !     Surround image with border of background color.
  439. !   */
  440. !   background.red=image->pixels[0].red;
  441. !   background.green=image->pixels[0].green;
  442. !   background.blue=image->pixels[0].blue;
  443. !   sheared_image=BorderImage(image,x_offset,y_offset+1,background);
  444. !   if (sheared_image == (Image *) NULL)
  445. !     {
  446. !       Warning("unable to rotate image","memory allocation failed");
  447. !       return((Image *) NULL);
  448. !     }
  449. !   sheared_image->class=DirectClass;
  450. !   /*
  451. !     Shear the image rows.
  452. !   */
  453. !   if (x_shear != 0.0)
  454. !     XShearImage(sheared_image,x_shear,image->columns,image->rows,x_offset,
  455. !       (int) (sheared_image->rows-image->rows)/2+1,background,range_limit);
  456. !   /*
  457. !     Shear the image columns.
  458. !   */
  459. !   if (y_shear != 0.0)
  460. !     YShearImage(sheared_image,y_shear,y_width,image->rows,(int)
  461. !       (sheared_image->columns-y_width)/2,y_offset+1,background,range_limit);
  462. !   (void) free((char *) range_table);
  463. !   clipped_image=ClipShearImage(sheared_image,x_shear,y_shear,image->columns,
  464. !     image->rows,clip);
  465. !   DestroyImage(sheared_image);
  466. !   return(clipped_image);
  467. X  }
  468. Common subdirectories: ImageMagick/scenes and ImageMagick2.2.1/scenes
  469. diff -r -c ImageMagick/signature.c ImageMagick2.2.1/signature.c
  470. *** ImageMagick/signature.c    Mon Dec  7 09:22:50 1992
  471. --- ImageMagick2.2.1/signature.c    Fri Dec 18 17:07:28 1992
  472. ***************
  473. *** 73,79 ****
  474. X    External declarations.
  475. X  */
  476. X  extern char
  477. !   *application_name;
  478. X  
  479. X  /*
  480. X    Forward declarations.
  481. --- 73,79 ----
  482. X    External declarations.
  483. X  */
  484. X  extern char
  485. !   *client_name;
  486. X  
  487. X  /*
  488. X    Forward declarations.
  489. Common subdirectories: ImageMagick/utilities and ImageMagick2.2.1/utilities
  490. Common subdirectories: ImageMagick/xtp and ImageMagick2.2.1/xtp
  491. diff -r -c ImageMagick/utilities/Imakefile ImageMagick2.2.1/utilities/Imakefile
  492. *** ImageMagick/utilities/Imakefile    Wed Nov 25 14:22:33 1992
  493. --- ImageMagick2.2.1/utilities/Imakefile    Fri Dec 18 17:47:54 1992
  494. ***************
  495. *** 27,33 ****
  496. X  
  497. X  EXTRA_INCLUDES= -I..
  498. X  
  499. ! MagickObjects= ../X.o ../image.o ../rotate.o ../quantize.o ../colors.o \
  500. X    ../signature.o ../compress.o ../alien.o ../PreRvIcccm.o
  501. X  
  502. X  CONVERTObjects= convert.o $(MagickObjects)
  503. --- 27,33 ----
  504. X  
  505. X  EXTRA_INCLUDES= -I..
  506. X  
  507. ! MagickObjects= ../X.o ../image.o ../shear.o ../quantize.o ../colors.o \
  508. X    ../signature.o ../compress.o ../alien.o ../PreRvIcccm.o
  509. X  
  510. X  CONVERTObjects= convert.o $(MagickObjects)
  511. diff -r -c ImageMagick/utilities/MIFFtoSTEREO.c ImageMagick2.2.1/utilities/MIFFtoSTEREO.c
  512. *** ImageMagick/utilities/MIFFtoSTEREO.c    Mon Dec  7 09:24:56 1992
  513. --- ImageMagick2.2.1/utilities/MIFFtoSTEREO.c    Fri Dec 18 17:08:24 1992
  514. ***************
  515. *** 68,74 ****
  516. X    Global declarations.
  517. X  */
  518. X  char
  519. !   *application_name;
  520. X  
  521. X  /*
  522. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  523. --- 68,74 ----
  524. X    Global declarations.
  525. X  */
  526. X  char
  527. !   *client_name;
  528. X  
  529. X  /*
  530. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  531. ***************
  532. *** 101,107 ****
  533. X    *message,
  534. X    *qualifier;
  535. X  {
  536. !   (void) fprintf(stderr,"%s: %s",application_name,message);
  537. X    if (qualifier != (char *) NULL)
  538. X      (void) fprintf(stderr," (%s)",qualifier);
  539. X    (void) fprintf(stderr,".\n");
  540. --- 101,107 ----
  541. X    *message,
  542. X    *qualifier;
  543. X  {
  544. !   (void) fprintf(stderr,"%s: %s",client_name,message);
  545. X    if (qualifier != (char *) NULL)
  546. X      (void) fprintf(stderr," (%s)",qualifier);
  547. X    (void) fprintf(stderr,".\n");
  548. ***************
  549. *** 138,144 ****
  550. X      (void) fprintf(stderr,"Can't continue, %s\n\n",message);
  551. X    (void) fprintf(stderr,
  552. X      "Usage: %s left_image.miff right_image.miff stereo_image.miff\n\n",
  553. !     application_name);
  554. X    (void) fprintf(stderr,"Specify 'left_image.miff' or 'right_image.miff' ");
  555. X    (void) fprintf(stderr,"as '-' for standard input.\n");
  556. X    (void) fprintf(stderr,
  557. --- 138,144 ----
  558. X      (void) fprintf(stderr,"Can't continue, %s\n\n",message);
  559. X    (void) fprintf(stderr,
  560. X      "Usage: %s left_image.miff right_image.miff stereo_image.miff\n\n",
  561. !     client_name);
  562. X    (void) fprintf(stderr,"Specify 'left_image.miff' or 'right_image.miff' ");
  563. X    (void) fprintf(stderr,"as '-' for standard input.\n");
  564. X    (void) fprintf(stderr,
  565. ***************
  566. *** 177,183 ****
  567. X    time_t
  568. X      start_time;
  569. X  
  570. !   application_name=argv[0];
  571. X    if (argc < 4)
  572. X      Usage((char *) NULL);
  573. X    start_time=time((time_t *) 0);
  574. --- 177,183 ----
  575. X    time_t
  576. X      start_time;
  577. X  
  578. !   client_name=argv[0];
  579. X    if (argc < 4)
  580. X      Usage((char *) NULL);
  581. X    start_time=time((time_t *) 0);
  582. diff -r -c ImageMagick/utilities/Make.com ImageMagick2.2.1/utilities/Make.com
  583. *** ImageMagick/utilities/Make.com    Wed Jun 24 10:40:27 1992
  584. --- ImageMagick2.2.1/utilities/Make.com    Fri Dec 18 17:08:14 1992
  585. ***************
  586. *** 11,17 ****
  587. X  $write sys$output "Making Mogrify..."
  588. X  $call Make mogrify
  589. X  $
  590. ! $link'link_options' mogrify,[-]X,[-]image,[-]rotate,[-]quantize,[-]colors, -
  591. X    [-]signature,[-]compress,[-]alien,[-]PreRvIcccm,sys$input:/opt
  592. X  sys$share:decw$xlibshr.exe/share
  593. X  $
  594. --- 11,17 ----
  595. X  $write sys$output "Making Mogrify..."
  596. X  $call Make mogrify
  597. X  $
  598. ! $link'link_options' mogrify,[-]X,[-]image,[-]shear,[-]quantize,[-]colors, -
  599. X    [-]signature,[-]compress,[-]alien,[-]PreRvIcccm,sys$input:/opt
  600. X  sys$share:decw$xlibshr.exe/share
  601. X  $
  602. ***************
  603. *** 23,29 ****
  604. X  $write sys$output "Making Convert..."
  605. X  $call Make convert
  606. X  $
  607. ! $link'link_options' convert,[-]X,[-]image,[-]rotate,[-]quantize,[-]colors, -
  608. X    [-]signature,[-]compress,[-]alien,[-]PreRvIcccm,sys$input:/opt
  609. X  sys$share:decw$xlibshr.exe/share
  610. X  $
  611. --- 23,29 ----
  612. X  $write sys$output "Making Convert..."
  613. X  $call Make convert
  614. X  $
  615. ! $link'link_options' convert,[-]X,[-]image,[-]shear,[-]quantize,[-]colors, -
  616. X    [-]signature,[-]compress,[-]alien,[-]PreRvIcccm,sys$input:/opt
  617. X  sys$share:decw$xlibshr.exe/share
  618. X  $
  619. ***************
  620. *** 35,41 ****
  621. X  $write sys$output "Making MIFFtoSTEREO..."
  622. X  $call Make MIFFtoSTEREO
  623. X  $
  624. ! $link'link_options' MIFFtoSTEREO,[-]X,[-]image,[-]rotate,[-]quantize, -
  625. X    [-]colors,[-]signature,[-]compress,[-]alien,[-]PreRvIcccm,sys$input:/opt
  626. X  sys$share:decw$xlibshr.exe/share
  627. X  $
  628. --- 35,41 ----
  629. X  $write sys$output "Making MIFFtoSTEREO..."
  630. X  $call Make MIFFtoSTEREO
  631. X  $
  632. ! $link'link_options' MIFFtoSTEREO,[-]X,[-]image,[-]shear,[-]quantize, -
  633. X    [-]colors,[-]signature,[-]compress,[-]alien,[-]PreRvIcccm,sys$input:/opt
  634. X  sys$share:decw$xlibshr.exe/share
  635. X  $
  636. diff -r -c ImageMagick/utilities/Makefile ImageMagick2.2.1/utilities/Makefile
  637. *** ImageMagick/utilities/Makefile    Fri Sep 11 12:04:48 1992
  638. --- ImageMagick2.2.1/utilities/Makefile    Fri Dec 18 17:08:13 1992
  639. ***************
  640. *** 45,51 ****
  641. X  DEFINES= -I.. $(JPEG) $(JPEG_INCLUDES) $(TIFF) $(TIFF_INCLUDES)
  642. X  SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
  643. X  
  644. ! MagickObjects= ../X.o ../image.o ../rotate.o ../quantize.o ../colors.o \
  645. X    ../signature.o ../compress.o ../alien.o ../PreRvIcccm.o
  646. X  
  647. X  ConvertObjects= convert.o $(MagickObjects)
  648. --- 45,51 ----
  649. X  DEFINES= -I.. $(JPEG) $(JPEG_INCLUDES) $(TIFF) $(TIFF_INCLUDES)
  650. X  SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
  651. X  
  652. ! MagickObjects= ../X.o ../image.o ../shear.o ../quantize.o ../colors.o \
  653. X    ../signature.o ../compress.o ../alien.o ../PreRvIcccm.o
  654. X  
  655. X  ConvertObjects= convert.o $(MagickObjects)
  656. diff -r -c ImageMagick/utilities/convert.c ImageMagick2.2.1/utilities/convert.c
  657. *** ImageMagick/utilities/convert.c    Tue Dec  8 11:16:29 1992
  658. --- ImageMagick2.2.1/utilities/convert.c    Fri Dec 18 17:08:24 1992
  659. ***************
  660. *** 81,87 ****
  661. X    Global declarations.
  662. X  */
  663. X  char
  664. !   *application_name;
  665. X  
  666. X  /*
  667. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  668. --- 81,87 ----
  669. X    Global declarations.
  670. X  */
  671. X  char
  672. !   *client_name;
  673. X  
  674. X  /*
  675. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  676. ***************
  677. *** 114,120 ****
  678. X    *message,
  679. X    *qualifier;
  680. X  {
  681. !   (void) fprintf(stderr,"%s: %s",application_name,message);
  682. X    if (qualifier != (char *) NULL)
  683. X      (void) fprintf(stderr," (%s)",qualifier);
  684. X    (void) fprintf(stderr,".\n");
  685. --- 114,120 ----
  686. X    *message,
  687. X    *qualifier;
  688. X  {
  689. !   (void) fprintf(stderr,"%s: %s",client_name,message);
  690. X    if (qualifier != (char *) NULL)
  691. X      (void) fprintf(stderr," (%s)",qualifier);
  692. X    (void) fprintf(stderr,".\n");
  693. ***************
  694. *** 163,169 ****
  695. X        (char *) NULL
  696. X      };
  697. X    (void) fprintf(stderr,"Usage: %s [options ...] input_file output_file\n",
  698. !     application_name);
  699. X    (void) fprintf(stderr,"\nWhere options include:\n");
  700. X    for (p=options; *p != (char *) NULL; p++)
  701. X      (void) fprintf(stderr,"  %s\n",*p);
  702. --- 163,169 ----
  703. X        (char *) NULL
  704. X      };
  705. X    (void) fprintf(stderr,"Usage: %s [options ...] input_file output_file\n",
  706. !     client_name);
  707. X    (void) fprintf(stderr,"\nWhere options include:\n");
  708. X    for (p=options; *p != (char *) NULL; p++)
  709. X      (void) fprintf(stderr,"  %s\n",*p);
  710. ***************
  711. *** 239,245 ****
  712. X    /*
  713. X      Initialize program variables.
  714. X    */
  715. !   application_name=argv[0];
  716. X    if (argc < 3)
  717. X      Usage();
  718. X    /*
  719. --- 239,245 ----
  720. X    /*
  721. X      Initialize program variables.
  722. X    */
  723. !   client_name=argv[0];
  724. X    if (argc < 3)
  725. X      Usage();
  726. X    /*
  727. ***************
  728. *** 470,476 ****
  729. X            Initialize image error attributes.
  730. X          */
  731. X          if (image->class == DirectClass)
  732. !           image->colors=NumberColors(image);
  733. X          total_colors=image->colors;
  734. X        }
  735. X      if (colorspace == GRAYColorspace)
  736. --- 470,476 ----
  737. X            Initialize image error attributes.
  738. X          */
  739. X          if (image->class == DirectClass)
  740. !           image->colors=NumberColors(image,(FILE *) NULL);
  741. X          total_colors=image->colors;
  742. X        }
  743. X      if (colorspace == GRAYColorspace)
  744. diff -r -c ImageMagick/utilities/convert.man ImageMagick2.2.1/utilities/convert.man
  745. *** ImageMagick/utilities/convert.man    Mon Dec  7 09:26:06 1992
  746. --- ImageMagick2.2.1/utilities/convert.man    Sat Dec 19 23:47:16 1992
  747. ***************
  748. *** 41,46 ****
  749. --- 41,48 ----
  750. X  .B GRAY
  751. X  Raw gray bytes.
  752. X  .TP 6
  753. + .B HISTOGRAM
  754. + .TP 6
  755. X  .B JPEG
  756. X  .TP 6
  757. X  .B MIFF
  758. ***************
  759. *** 80,86 ****
  760. X  select image from X server screen; read only.
  761. X  .TP 6
  762. X  .B XC
  763. ! constant image of X server background color.
  764. X  .TP 6
  765. X  .B XBM
  766. X  X11 bitmap.
  767. --- 82,88 ----
  768. X  select image from X server screen; read only.
  769. X  .TP 6
  770. X  .B XC
  771. ! constant image of X server border color.
  772. X  .TP 6
  773. X  .B XBM
  774. X  X11 bitmap.
  775. diff -r -c ImageMagick/utilities/mogrify.c ImageMagick2.2.1/utilities/mogrify.c
  776. *** ImageMagick/utilities/mogrify.c    Tue Dec  8 11:16:14 1992
  777. --- ImageMagick2.2.1/utilities/mogrify.c    Sat Dec 19 02:32:01 1992
  778. ***************
  779. *** 50,55 ****
  780. --- 50,56 ----
  781. X  %  Usage: mogrify [options ...] file [ [options ...] file ...]
  782. X  %
  783. X  %  Where options include:
  784. + %    -border geometry    surround image with a border of color
  785. X  %    -clip geometry      preferred size and location of the clipped image
  786. X  %    -colormap filename  transform image colors to match this set of colors
  787. X  %    -colors value       preferred number of colors in the image
  788. ***************
  789. *** 65,73 ****
  790. --- 66,76 ----
  791. X  %    -noise              reduce noise with a noise peak elimination filter
  792. X  %    -normalize          tranform image to span the full range of colors
  793. X  %    -reflect            reverse image scanlines
  794. + %    -roll geometry       roll an image vertically or horizontally
  795. X  %    -rotate degrees     apply Paeth rotation to the image
  796. X  %    -scale geometry     preferred size factors of the image
  797. X  %    -scene value        image scene number
  798. + %    -shear geomatry     slide one edge of the image along the X or Y axis
  799. X  %    -treedepth value    depth of the color classification tree
  800. X  %    -verbose            print detailed information about the image
  801. X  %
  802. ***************
  803. *** 95,101 ****
  804. X    Global declarations.
  805. X  */
  806. X  char
  807. !   *application_name;
  808. X  
  809. X  /*
  810. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  811. --- 98,104 ----
  812. X    Global declarations.
  813. X  */
  814. X  char
  815. !   *client_name;
  816. X  
  817. X  /*
  818. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  819. ***************
  820. *** 128,134 ****
  821. X    *message,
  822. X    *qualifier;
  823. X  {
  824. !   (void) fprintf(stderr,"%s: %s",application_name,message);
  825. X    if (qualifier != (char *) NULL)
  826. X      (void) fprintf(stderr," (%s)",qualifier);
  827. X    (void) fprintf(stderr,".\n");
  828. --- 131,137 ----
  829. X    *message,
  830. X    *qualifier;
  831. X  {
  832. !   (void) fprintf(stderr,"%s: %s",client_name,message);
  833. X    if (qualifier != (char *) NULL)
  834. X      (void) fprintf(stderr," (%s)",qualifier);
  835. X    (void) fprintf(stderr,".\n");
  836. ***************
  837. *** 162,167 ****
  838. --- 165,171 ----
  839. X    static char
  840. X      *options[]=
  841. X      {
  842. +       "-border geometry    surround image with a border of color",
  843. X        "-clip geometry      preferred size and location of the clipped image",
  844. X        "-colormap filename  transform image colors to match this set of colors",
  845. X        "-colors value       preferred number of colors in the image",
  846. ***************
  847. *** 177,192 ****
  848. X        "-noise              reduce noise with a noise peak elimination filter",
  849. X        "-normalize          tranform image to span the full range of colors",
  850. X        "-reflect            reflect the image scanlines",
  851. X        "-rotate degrees     apply Paeth rotation to the image",
  852. X        "-scale geometry     preferred size factors of the image",
  853. X        "-scene number       image scene number",
  854. X        "-treedepth value    depth of the color classification tree",
  855. X        "-verbose            print detailed information about the image",
  856. X        (char *) NULL
  857. X      };
  858. X    (void) fprintf(stderr,
  859. !     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",
  860. !     application_name);
  861. X    (void) fprintf(stderr,"\nWhere options include: \n");
  862. X    for (p=options; *p != (char *) NULL; p++)
  863. X      (void) fprintf(stderr,"  %s\n",*p);
  864. --- 181,197 ----
  865. X        "-noise              reduce noise with a noise peak elimination filter",
  866. X        "-normalize          tranform image to span the full range of colors",
  867. X        "-reflect            reflect the image scanlines",
  868. +       "-roll geometry      roll an image vertically or horizontally",
  869. X        "-rotate degrees     apply Paeth rotation to the image",
  870. X        "-scale geometry     preferred size factors of the image",
  871. X        "-scene number       image scene number",
  872. +       "-shear geomatry     slide one edge of the image along the X or Y axis",
  873. X        "-treedepth value    depth of the color classification tree",
  874. X        "-verbose            print detailed information about the image",
  875. X        (char *) NULL
  876. X      };
  877. X    (void) fprintf(stderr,
  878. !     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",client_name);
  879. X    (void) fprintf(stderr,"\nWhere options include: \n");
  880. X    for (p=options; *p != (char *) NULL; p++)
  881. X      (void) fprintf(stderr,"  %s\n",*p);
  882. ***************
  883. *** 230,240 ****
  884. X      alien_info;
  885. X  
  886. X    char
  887. X      *clip_geometry,
  888. X      *colormap_filename,
  889. X      *image_geometry,
  890. X      *option,
  891. !     *scale_geometry;
  892. X  
  893. X    double
  894. X      gamma;
  895. --- 235,248 ----
  896. X      alien_info;
  897. X  
  898. X    char
  899. +     *border_geometry,
  900. X      *clip_geometry,
  901. X      *colormap_filename,
  902. X      *image_geometry,
  903. X      *option,
  904. !     *roll_geometry,
  905. !     *scale_geometry,
  906. !     *shear_geometry;
  907. X  
  908. X    double
  909. X      gamma;
  910. ***************
  911. *** 244,257 ****
  912. X  
  913. X    int
  914. X      degrees,
  915. X      i,
  916. !     x;
  917. X    unsigned int
  918. X      colorspace,
  919. X      compression,
  920. X      dither,
  921. X      enhance,
  922. X      image_number,
  923. X      inverse,
  924. X      maximum_images,
  925. --- 252,268 ----
  926. X  
  927. X    int
  928. X      degrees,
  929. +     flags,
  930. X      i,
  931. !     x,
  932. !     y;
  933. !          
  934. X    unsigned int
  935. X      colorspace,
  936. X      compression,
  937. X      dither,
  938. X      enhance,
  939. +     height,
  940. X      image_number,
  941. X      inverse,
  942. X      maximum_images,
  943. ***************
  944. *** 262,273 ****
  945. X      reflect,
  946. X      scene,
  947. X      tree_depth,
  948. !     verbose;
  949. X  
  950. X    /*
  951. X      Display usage profile if there are no command line arguments.
  952. X    */
  953. !   application_name=(*argv);
  954. X    if (argc < 2)
  955. X      Usage();
  956. X    /*
  957. --- 273,285 ----
  958. X      reflect,
  959. X      scene,
  960. X      tree_depth,
  961. !     verbose,
  962. !     width;
  963. X  
  964. X    /*
  965. X      Display usage profile if there are no command line arguments.
  966. X    */
  967. !   client_name=(*argv);
  968. X    if (argc < 2)
  969. X      Usage();
  970. X    /*
  971. ***************
  972. *** 274,279 ****
  973. --- 286,292 ----
  974. X      Set defaults.
  975. X    */
  976. X    GetAlienInfo(&alien_info);
  977. +   border_geometry=(char *) NULL;
  978. X    clip_geometry=(char *) NULL;
  979. X    colormap_filename=(char *) NULL;
  980. X    colorspace=RGBColorspace;
  981. ***************
  982. *** 289,295 ****
  983. --- 302,310 ----
  984. X    normalize=False;
  985. X    number_colors=0;
  986. X    reflect=False;
  987. +   roll_geometry=(char *) NULL;
  988. X    scale_geometry=(char *) NULL;
  989. +   shear_geometry=(char *) NULL;
  990. X    scene=0;
  991. X    tree_depth=0;
  992. X    verbose=False;
  993. ***************
  994. *** 307,312 ****
  995. --- 322,344 ----
  996. X      if (((int) strlen(option) > 1) && ((*option == '-') || (*option == '+')))
  997. X        switch (*(option+1))
  998. X        {
  999. +         case 'b':
  1000. +         {
  1001. +           if (strncmp("border",option+1,2) == 0)
  1002. +             {
  1003. +               border_geometry=(char *) NULL;
  1004. +               if (*option == '-')
  1005. +                 {
  1006. +                   i++;
  1007. +                   if (i == argc)
  1008. +                     Error("missing geometry on -border",(char *) NULL);
  1009. +                   border_geometry=argv[i];
  1010. +                 }
  1011. +               break;
  1012. +             }
  1013. +           Error("unrecognized option",option);
  1014. +           break;
  1015. +         }
  1016. X          case 'c':
  1017. X          {
  1018. X            if (strncmp("clip",option+1,2) == 0)
  1019. ***************
  1020. *** 463,469 ****
  1021. X          }
  1022. X          case 'h':
  1023. X          {
  1024. !           Usage();
  1025. X            break;
  1026. X          }
  1027. X          case 'i':
  1028. --- 495,506 ----
  1029. X          }
  1030. X          case 'h':
  1031. X          {
  1032. !           if (strncmp("help",option+1,2) == 0)
  1033. !             {
  1034. !               Usage();
  1035. !               break;
  1036. !             }
  1037. !           Error("unrecognized option",option);
  1038. X            break;
  1039. X          }
  1040. X          case 'i':
  1041. ***************
  1042. *** 498,503 ****
  1043. --- 535,552 ----
  1044. X                reflect=(*option == '-');
  1045. X                break;
  1046. X              }
  1047. +           if (strncmp("roll",option+1,3) == 0)
  1048. +             {
  1049. +               roll_geometry=(char *) NULL;
  1050. +               if (*option == '-')
  1051. +                 {
  1052. +                   i++;
  1053. +                   if (i == argc)
  1054. +                     Error("missing geometry on -roll",(char *) NULL);
  1055. +                   roll_geometry=argv[i];
  1056. +                 }
  1057. +               break;
  1058. +             }
  1059. X            if (strncmp("rotate",option+1,3) == 0)
  1060. X              {
  1061. X                degrees=0;
  1062. ***************
  1063. *** 539,544 ****
  1064. --- 588,605 ----
  1065. X                  }
  1066. X                break;
  1067. X              }
  1068. +           if (strncmp("shear",option+1,2) == 0)
  1069. +             {
  1070. +               shear_geometry=(char *) NULL;
  1071. +               if (*option == '-')
  1072. +                 {
  1073. +                   i++;
  1074. +                   if ((i == argc) || !sscanf(argv[i],"%f",(float *) &x))
  1075. +                     Error("missing shear geometry on -shear",(char *) NULL);
  1076. +                   shear_geometry=argv[i];
  1077. +                 }
  1078. +               break;
  1079. +             }
  1080. X            Error("unrecognized option",option);
  1081. X            break;
  1082. X          }
  1083. ***************
  1084. *** 614,619 ****
  1085. --- 675,750 ----
  1086. X                    image=reflected_image;
  1087. X                  }
  1088. X              }
  1089. +           if (roll_geometry != (char *) NULL)
  1090. +             {
  1091. +               Image
  1092. +                 *rolled_image;
  1093. +               /*
  1094. +                 Roll image.
  1095. +               */
  1096. +               x=0;
  1097. +               y=0;
  1098. +               flags=XParseGeometry(roll_geometry,&x,&y,&width,&height);
  1099. +               rolled_image=RollImage(image,x,y);
  1100. +               if (rolled_image != (Image *) NULL)
  1101. +                 {
  1102. +                   DestroyImage(image);
  1103. +                   image=rolled_image;
  1104. +                 }
  1105. +             }
  1106. +           if (border_geometry != (char *) NULL)
  1107. +             {
  1108. +               Image
  1109. +                 *bordered_image;
  1110. +               /*
  1111. +                 Surround image with a border of solid.
  1112. +               */
  1113. +               bordered_image=ReadXCImage("border",(char *) NULL,"1x1");
  1114. +               if (bordered_image != (Image *) NULL)
  1115. +                 {
  1116. +                   ColorPacket
  1117. +                     border_color;
  1118. +                   border_color.red=bordered_image->pixels->red;
  1119. +                   border_color.green=bordered_image->pixels->green;
  1120. +                   border_color.blue=bordered_image->pixels->blue;
  1121. +                   DestroyImage(bordered_image);
  1122. +                   width=0;
  1123. +                   height=0;
  1124. +                   flags=XParseGeometry(border_geometry,&x,&y,&width,&height);
  1125. +                   bordered_image=BorderImage(image,width,height,border_color);
  1126. +                   if (bordered_image != (Image *) NULL)
  1127. +                     {
  1128. +                       DestroyImage(image);
  1129. +                       bordered_image->class=DirectClass;
  1130. +                       image=bordered_image;
  1131. +                     }
  1132. +                 }
  1133. +             }
  1134. +           if (shear_geometry != (char *) NULL)
  1135. +             {
  1136. +               float
  1137. +                 x_shear,
  1138. +                 y_shear;
  1139. +               Image
  1140. +                 *sheared_image;
  1141. +               /*
  1142. +                 Shear image.
  1143. +               */
  1144. +               x_shear=0.0;
  1145. +               y_shear=0.0;
  1146. +               (void) sscanf(shear_geometry,"%fx%f",&x_shear,&y_shear);
  1147. +               sheared_image=ShearImage(image,x_shear,y_shear,False);
  1148. +               if (sheared_image != (Image *) NULL)
  1149. +                 {
  1150. +                   DestroyImage(image);
  1151. +                   image=sheared_image;
  1152. +                 }
  1153. +             }
  1154. X            if ((degrees % 360) != 0)
  1155. X              {
  1156. X                Image
  1157. ***************
  1158. *** 671,677 ****
  1159. X                  Initialize image error attributes.
  1160. X                */
  1161. X                if (image->class == DirectClass)
  1162. !                 image->colors=NumberColors(image);
  1163. X                total_colors=image->colors;
  1164. X              }
  1165. X            if (colorspace == GRAYColorspace)
  1166. --- 802,808 ----
  1167. X                  Initialize image error attributes.
  1168. X                */
  1169. X                if (image->class == DirectClass)
  1170. !                 image->colors=NumberColors(image,(FILE *) NULL);
  1171. X                total_colors=image->colors;
  1172. X              }
  1173. X            if (colorspace == GRAYColorspace)
  1174. ***************
  1175. *** 759,764 ****
  1176. --- 890,896 ----
  1177. X        /*
  1178. X          Global colormap option;  reduce colors then write image.
  1179. X        */
  1180. +       colormap_image=(Image *) NULL;
  1181. X        if (colormap_filename != (char *) NULL)
  1182. X          {
  1183. X            (void) strcpy(alien_info.filename,colormap_filename);
  1184. ***************
  1185. *** 770,776 ****
  1186. X        QuantizeImages(images,maximum_images,colormap_image,number_colors,
  1187. X          tree_depth,dither,colorspace,True);
  1188. X        if (colormap_image != (Image *) NULL)
  1189. !     DestroyImage(colormap_image);
  1190. X        for (image_number=0; image_number < maximum_images; image_number++)
  1191. X        {
  1192. X          (void) WriteAlienImage(images[image_number]);
  1193. --- 902,908 ----
  1194. X        QuantizeImages(images,maximum_images,colormap_image,number_colors,
  1195. X          tree_depth,dither,colorspace,True);
  1196. X        if (colormap_image != (Image *) NULL)
  1197. !         DestroyImage(colormap_image);
  1198. X        for (image_number=0; image_number < maximum_images; image_number++)
  1199. X        {
  1200. X          (void) WriteAlienImage(images[image_number]);
  1201. diff -r -c ImageMagick/utilities/mogrify.man ImageMagick2.2.1/utilities/mogrify.man
  1202. *** ImageMagick/utilities/mogrify.man    Mon Dec  7 09:26:14 1992
  1203. --- ImageMagick2.2.1/utilities/mogrify.man    Fri Dec 18 17:08:27 1992
  1204. ***************
  1205. *** 21,26 ****
  1206. --- 21,33 ----
  1207. X      mogrify -colors 256 scenes/birds.*
  1208. X  .SH OPTIONS
  1209. X  .TP 5
  1210. + .B "-border \fI<width>x<height>fP"
  1211. + surround the image with a border or color.  See \fBX(1)\fP for details
  1212. + about the geometry specification.
  1213. + The color of the border is obtained from the X server and is defined as
  1214. + \fBbackground\fP (class \fBBackground\fP).  See \fBX(1)\fP for details.
  1215. + .TP 5
  1216. X  .B "-clip \fI<width>x<height>{\+-}<x offset>{\+-}<y offset>\fP"
  1217. X  preferred size and location of the clipped image.  See \fBX(1)\fP for details
  1218. X  about the geometry specification.
  1219. ***************
  1220. *** 28,33 ****
  1221. --- 35,52 ----
  1222. X  Use clipping to apply image processing options, or transmogrify, only a
  1223. X  particular area of an image.
  1224. X  .TP 5
  1225. + .B "-colormap \fIfilename\fP"
  1226. + choose a particular set of colors from this image.
  1227. + By default, color reduction chooses an optimal set of colors that
  1228. + best represent the original image.  Alternatively, you can choose a
  1229. + particular set of colors with this option.  This is useful when
  1230. + you want to create a sequence of images with one particular set of
  1231. + colors for each image.
  1232. + The \fB-colors\fP or \fB-monochrome\fP option is required
  1233. + for this option to take effect.
  1234. + .TP 5
  1235. X  .B "-colors \fIvalue\fP"
  1236. X  preferred number of colors in the image.
  1237. X  
  1238. ***************
  1239. *** 39,46 ****
  1240. X  If more than one image is specified on the command line, a single
  1241. X  colormap is created and saved with each image.
  1242. X  
  1243. ! Note, options \fB-dither\fP, \fB-colorspace\fP, and \fB-treedepth\fP affect
  1244. ! the color reduction algorithm.
  1245. X  .TP 5
  1246. X  .B "-colorspace \fIvalue\fP"
  1247. X  the type of colorspace: \fIGRAY\fP, \fIRGB\fP, \fIXYZ\fP, \fIYIQ\fP, or
  1248. --- 58,65 ----
  1249. X  If more than one image is specified on the command line, a single
  1250. X  colormap is created and saved with each image.
  1251. X  
  1252. ! Note, options \fB-colormap\fP, \fB-dither\fP, \fB-colorspace\fP, and
  1253. ! \fB-treedepth\fP affect the color reduction algorithm.
  1254. X  .TP 5
  1255. X  .B "-colorspace \fIvalue\fP"
  1256. X  the type of colorspace: \fIGRAY\fP, \fIRGB\fP, \fIXYZ\fP, \fIYIQ\fP, or
  1257. ***************
  1258. *** 137,144 ****
  1259. --- 156,174 ----
  1260. X  .B "-reflect"
  1261. X  create a "mirror image" by reflecting the image scanlines.
  1262. X  .TP 5
  1263. + .B "-roll \fI{\+-}<x offset>{\+-}<y offset>\fP"
  1264. + roll an image vertically or horizontally.  See \fBX(1)\fP for details
  1265. + about the geometry specification.
  1266. +  
  1267. + A negative \fIx offset\fP rolls the image left-to-right.  A negative
  1268. + \fIy offset\fP rolls the image top-to-bottom.
  1269. + .TP 5
  1270. X  .B "-rotate \fIdegrees\fP"
  1271. X  apply Paeth image rotation to the image.
  1272. + Empty triangles left over from rotating the image are filled with the
  1273. + color defined by the pixel at location (0,0).  Refer to \fB-border\fP
  1274. + to choose a specific color.
  1275. X  .TP 5
  1276. X  .B "-scale \fI<width factor>x<height factor>\fP"
  1277. X  preferred size factors of the image.
  1278. ***************
  1279. *** 149,159 ****
  1280. X  one factor is specified, both the width and height factors assume the
  1281. X  value.
  1282. X  
  1283. ! Factors may be fractional.  For example, a factor of 1.5 will increase the
  1284. ! image size by one and one-half.
  1285. X  .TP 5
  1286. X  .B "-scene \fIvalue\fP"
  1287. X  image scene number.
  1288. X  .TP 5
  1289. X  .B "-treedepth \fIvalue\fP"
  1290. X  Normally, this integer value is zero or one.  A zero or one tells
  1291. --- 179,204 ----
  1292. X  one factor is specified, both the width and height factors assume the
  1293. X  value.
  1294. X  
  1295. ! Factors may be fractional.  To increase the size of an image, use a
  1296. ! scale factor greater than 1.0.  To decrease an image's size, use a
  1297. ! scale factor less than 1.0.  Default is 1.0.
  1298. X  .TP 5
  1299. X  .B "-scene \fIvalue\fP"
  1300. X  image scene number.
  1301. + .TP 5
  1302. + .B "-shear \fI<x degrees>x<y degrees>\fP"
  1303. + shear the image along the X or Y axis by a positive or negative shear angle.
  1304. + Shearing slides one edge of an image along the X or Y axis, creating a
  1305. + parallelogram.  An X direction shear slides an edge along the X axis,
  1306. + while a Y direction shear slides an edge along the Y axis.  The amount
  1307. + of the shear is controlled by a shear angle.  For X direction shears,
  1308. + \fIx degrees>\fP is measured relative to the Y axis, and similarly, for
  1309. + Y direction shears \fIy degrees\fP is measured relative to the X axis.
  1310. + Empty triangles left over from shearing the image are filled with the
  1311. + color defined by the pixel at location (0,0).  Refer to \fB-border\fP
  1312. + to choose a specific color.
  1313. X  .TP 5
  1314. X  .B "-treedepth \fIvalue\fP"
  1315. X  Normally, this integer value is zero or one.  A zero or one tells
  1316. diff -r -c ImageMagick/xtp/xtp.c ImageMagick2.2.1/xtp/xtp.c
  1317. *** ImageMagick/xtp/xtp.c    Mon Dec  7 09:28:48 1992
  1318. --- ImageMagick2.2.1/xtp/xtp.c    Mon Dec 21 12:54:03 1992
  1319. ***************
  1320. *** 88,94 ****
  1321. X    Variable declarations.
  1322. X  */
  1323. X  static char
  1324. !   *application_name,
  1325. X    slave_tty[16];
  1326. X  
  1327. X  static int
  1328. --- 88,94 ----
  1329. X    Variable declarations.
  1330. X  */
  1331. X  static char
  1332. !   *client_name,
  1333. X    slave_tty[16];
  1334. X  
  1335. X  static int
  1336. ***************
  1337. *** 187,193 ****
  1338. X    *message,
  1339. X    *qualifier;
  1340. X  {
  1341. !   (void) fprintf(stderr,"%s: %s",application_name,message);
  1342. X    if (qualifier != (char *) NULL)
  1343. X      (void) fprintf(stderr," (%s)",qualifier);
  1344. X    (void) fprintf(stderr,".\n");
  1345. --- 187,193 ----
  1346. X    *message,
  1347. X    *qualifier;
  1348. X  {
  1349. !   (void) fprintf(stderr,"%s: %s",client_name,message);
  1350. X    if (qualifier != (char *) NULL)
  1351. X      (void) fprintf(stderr," (%s)",qualifier);
  1352. X    (void) fprintf(stderr,".\n");
  1353. ***************
  1354. *** 940,946 ****
  1355. X      };
  1356. X    (void) fprintf(stderr,
  1357. X      "Usage: %s [-options ...] <host/ip address> [ <home directory> ]\n",
  1358. !     application_name);
  1359. X    (void) fprintf(stderr,"\nWhere options include:\n");
  1360. X    for (p=options; *p; p++)
  1361. X      (void) fprintf(stderr,"  %s\n",*p);
  1362. --- 940,946 ----
  1363. X      };
  1364. X    (void) fprintf(stderr,
  1365. X      "Usage: %s [-options ...] <host/ip address> [ <home directory> ]\n",
  1366. !     client_name);
  1367. X    (void) fprintf(stderr,"\nWhere options include:\n");
  1368. X    for (p=options; *p; p++)
  1369. X      (void) fprintf(stderr,"  %s\n",*p);
  1370. ***************
  1371. *** 1072,1078 ****
  1372. X    /*
  1373. X      Initialize program variables.
  1374. X    */
  1375. !   application_name=argv[0];
  1376. X    binary=False;
  1377. X    directory_expression=(RegularExpression *) NULL;
  1378. X    exclude_expression=(RegularExpression *) NULL;
  1379. --- 1072,1078 ----
  1380. X    /*
  1381. X      Initialize program variables.
  1382. X    */
  1383. !   client_name=argv[0];
  1384. X    binary=False;
  1385. X    directory_expression=(RegularExpression *) NULL;
  1386. X    exclude_expression=(RegularExpression *) NULL;
  1387. diff -r -c ImageMagick/xtp/xtp.h ImageMagick2.2.1/xtp/xtp.h
  1388. *** ImageMagick/xtp/xtp.h    Mon Dec  7 09:29:01 1992
  1389. --- ImageMagick2.2.1/xtp/xtp.h    Mon Dec 21 12:53:04 1992
  1390. ***************
  1391. *** 31,37 ****
  1392. X  #define True  1
  1393. X  #define Warning(message,qualifier)  \
  1394. X  {  \
  1395. !   (void) fprintf(stderr,"%s: %s",application_name,message);  \
  1396. X    if (qualifier != (char *) NULL)  \
  1397. X      (void) fprintf(stderr," (%s)",qualifier);  \
  1398. X    (void) fprintf(stderr,".\n");  \
  1399. --- 31,37 ----
  1400. X  #define True  1
  1401. X  #define Warning(message,qualifier)  \
  1402. X  {  \
  1403. !   (void) fprintf(stderr,"%s: %s",client_name,message);  \
  1404. X    if (qualifier != (char *) NULL)  \
  1405. X      (void) fprintf(stderr," (%s)",qualifier);  \
  1406. X    (void) fprintf(stderr,".\n");  \
  1407. SHAR_EOF
  1408. echo 'File fix-01 is complete' &&
  1409. chmod 0600 fix-01 ||
  1410. echo 'restore of fix-01 failed'
  1411. Wc_c="`wc -c < 'fix-01'`"
  1412. test 192865 -eq "$Wc_c" ||
  1413.     echo 'fix-01: original size 192865, current size' "$Wc_c"
  1414. rm -f _shar_wnt_.tmp
  1415. fi
  1416. rm -f _shar_seq_.tmp
  1417. echo You have unpacked the last part
  1418. exit 0
  1419. -- 
  1420. cristy@dupont.com
  1421.