home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sources / misc / 4229 < prev    next >
Encoding:
Text File  |  1992-12-27  |  45.5 KB  |  1,447 lines

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