home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sources / bugs / 313 < prev    next >
Encoding:
Text File  |  1992-12-22  |  75.0 KB  |  2,386 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 01/3
  5. Message-ID: <cristy.724966577@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:17 GMT
  10. Lines: 2374
  11.  
  12. Submitted-by: cristy@dupont.com
  13. Archive-name: ImageMagick/patch0101
  14.  
  15. #!/bin/sh
  16. # This is ImageMagick/patch01, a shell archive (produced by shar 3.49)
  17. # To extract the files from this archive, save it to a file, remove
  18. # everything above the "!/bin/sh" line above, and type "sh file_name".
  19. #
  20. # made 12/21/1992 19:36 UTC by cristy@dupont.com
  21. # Source directory /tmp_mnt/nfs/zeta/home/cristy/Archive/ImageMagick
  22. #
  23. # existing files will NOT be overwritten unless -c is specified
  24. #
  25. # This is part 1 of a multipart archive                                    
  26. # do not concatenate these parts, unpack them in order with /bin/sh        
  27. #
  28. # This shar contains:
  29. # length  mode       name
  30. # ------ ---------- ------------------------------------------
  31. # 192865 -rw------- fix-01
  32. #
  33. if test -r _shar_seq_.tmp; then
  34.     echo 'Must unpack archives in sequence!'
  35.     echo Please unpack part `cat _shar_seq_.tmp` next
  36.     exit 1
  37. fi
  38. # ============= fix-01 ==============
  39. if test -f 'fix-01' -a X"$1" != X"-c"; then
  40.     echo 'x - skipping fix-01 (File already exists)'
  41.     rm -f _shar_wnt_.tmp
  42. else
  43. > _shar_wnt_.tmp
  44. echo 'x - extracting fix-01 (Text)'
  45. sed 's/^X//' << 'SHAR_EOF' > 'fix-01' &&
  46. X
  47. X
  48. X                    ImageMagick 2.2 Patch #1
  49. X
  50. To apply this patch:
  51. X
  52. cd to the top of the source tree (to the directory containing the
  53. "ImageMagick" subdirectories) and do:
  54. X
  55. X  patch -p < ThisFile
  56. X  cd ImageMagick
  57. X  mv rotate.c shear.c
  58. X
  59. Prereq: ImageMagick 2.2 (posted from comp.sources.misc, Volume 34,
  60. Issue 28).
  61. X
  62. Alternatively get the entire distribution as contrib/ImageMagick.tar.Z
  63. on export.lcs.mit.edu.  I will post this patch to comp.sources.misc in
  64. a few days.
  65. X
  66. X
  67. diff -r -c ImageMagick/ChangeLog ImageMagick2.2.1/ChangeLog
  68. *** ImageMagick/ChangeLog    Wed Dec  2 09:33:26 1992
  69. --- ImageMagick2.2.1/ChangeLog    Mon Dec 21 14:12:35 1992
  70. ***************
  71. *** 1,3 ****
  72. --- 1,35 ----
  73. + ImageMagick 2.2.1
  74. +   o The number of colors reported with the -verbose option was on
  75. +     occasion incorrect.
  76. +   o Color quantization was improved and in some cases sped up ~10%.
  77. +   o Cleaned up image rotation code.
  78. +   o Added -shear to mogrify options.
  79. +   o Added a file type of HISTOGRAM to convert.
  80. +   o Sometimes PBM image files did not have the correct number of bytes.
  81. +   o Color reduced PPM images were being written at the full color resolution.
  82. +   o Keypresses are no longer accepted during image configuration.
  83. +   o Red, green, and blue values of a X constant image were set to the
  84. +     red intensity of the background color.
  85. +   o Clipped images did not show up correctly in the panning icon.
  86. +   o `animate' no longer shows images out-of-order if the image scene number is
  87. +     absent (thanks to kent@oddjob.uchicago.edu).
  88. +   o ImageMagick now recognizes the X resource class with the first letter
  89. +     of the client capitalized, i.e. 'Display.Visual: default' (thanks to
  90. +     dws@ssec.wisc.edu).
  91. X  ImageMagick 2.2
  92. X  
  93. X    o When displaying a composite MIFF image created with `montage',
  94. ***************
  95. *** 17,22 ****
  96. --- 49,57 ----
  97. X    o Updated MIFF manual page to reflect 'montage' image header
  98. X      keyword.
  99. X  
  100. +   o Add -colormap to `mogrify.'  Use to color reduce an image to
  101. +     a set of colors you choose.
  102. X    o Some compilers have read-only strings.   ImageMagick no longer
  103. X      writes on read-only strings.
  104. X  
  105. ***************
  106. *** 57,64 ****
  107. X    o Panning uses a pixmap for faster panning speed.
  108. X  
  109. X    o Rotate.c now uses a table to force range limits.
  110. -   o Fixed strcasecmp to work under VMS.
  111. X  
  112. X    o range table in quantize.c is allocated from the heap instead of
  113. X      the stack.
  114. --- 92,97 ----
  115. diff -r -c ImageMagick/Imakefile ImageMagick2.2.1/Imakefile
  116. *** ImageMagick/Imakefile    Wed Nov 25 14:22:24 1992
  117. --- ImageMagick2.2.1/Imakefile    Fri Dec 18 17:07:44 1992
  118. ***************
  119. *** 25,34 ****
  120. X  
  121. X  #include "Magick.tmpl"
  122. X  
  123. ! MagickObjects= X.o image.o rotate.o quantize.o colors.o signature.o compress.o\
  124. X    alien.o PreRvIcccm.o
  125. X  
  126. ! SRCS= display.c X.c image.c rotate.c quantize.c colors.c signature.c\
  127. X    compress.c alien.c PreRvIcccm.c
  128. X  OBJS= display.o $(MagickObjects)
  129. X  AnimateObjects= animate.o $(MagickObjects)
  130. --- 25,34 ----
  131. X  
  132. X  #include "Magick.tmpl"
  133. X  
  134. ! MagickObjects= X.o image.o shear.o quantize.o colors.o signature.o compress.o\
  135. X    alien.o PreRvIcccm.o
  136. X  
  137. ! SRCS= display.c X.c image.c shear.c quantize.c colors.c signature.c\
  138. X    compress.c alien.c PreRvIcccm.c
  139. X  OBJS= display.o $(MagickObjects)
  140. X  AnimateObjects= animate.o $(MagickObjects)
  141. diff -r -c ImageMagick/Make.com ImageMagick2.2.1/Make.com
  142. *** ImageMagick/Make.com    Wed Jun 24 10:40:27 1992
  143. --- ImageMagick2.2.1/Make.com    Fri Dec 18 17:08:13 1992
  144. ***************
  145. *** 12,18 ****
  146. X  $call Make display
  147. X  $call Make X
  148. X  $call Make image
  149. ! $call Make rotate
  150. X  $call Make quantize
  151. X  $call Make colors
  152. X  $call Make signature
  153. --- 12,18 ----
  154. X  $call Make display
  155. X  $call Make X
  156. X  $call Make image
  157. ! $call Make shear
  158. X  $call Make quantize
  159. X  $call Make colors
  160. X  $call Make signature
  161. ***************
  162. *** 20,26 ****
  163. X  $call Make alien
  164. X  $call Make PreRvIcccm
  165. X  $
  166. ! $link'link_options' display,X,image,rotate,quantize,colors,signature, -
  167. X    compress,alien,PreRvIcccm,sys$input:/opt
  168. X  sys$share:decw$xlibshr.exe/share
  169. X  $
  170. --- 20,26 ----
  171. X  $call Make alien
  172. X  $call Make PreRvIcccm
  173. X  $
  174. ! $link'link_options' display,X,image,shear,quantize,colors,signature, -
  175. X    compress,alien,PreRvIcccm,sys$input:/opt
  176. X  sys$share:decw$xlibshr.exe/share
  177. X  $
  178. ***************
  179. *** 33,39 ****
  180. X  $call Make import
  181. X  $call Make X
  182. X  $call Make image
  183. ! $call Make rotate
  184. X  $call Make quantize
  185. X  $call Make colors
  186. X  $call Make signature
  187. --- 33,39 ----
  188. X  $call Make import
  189. X  $call Make X
  190. X  $call Make image
  191. ! $call Make shear
  192. X  $call Make quantize
  193. X  $call Make colors
  194. X  $call Make signature
  195. ***************
  196. *** 41,47 ****
  197. X  $call Make alien
  198. X  $call Make PreRvIcccm
  199. X  $
  200. ! $link'link_options' import,X,image,rotate,quantize,colors,signature,compress, -
  201. X    alien,PreRvIcccm,sys$input:/opt
  202. X  sys$share:decw$xlibshr.exe/share
  203. X  $
  204. --- 41,47 ----
  205. X  $call Make alien
  206. X  $call Make PreRvIcccm
  207. X  $
  208. ! $link'link_options' import,X,image,shear,quantize,colors,signature,compress, -
  209. X    alien,PreRvIcccm,sys$input:/opt
  210. X  sys$share:decw$xlibshr.exe/share
  211. X  $
  212. ***************
  213. *** 54,60 ****
  214. X  $call Make XtoPS
  215. X  $call Make X
  216. X  $call Make image
  217. ! $call Make rotate
  218. X  $call Make quantize
  219. X  $call Make colors
  220. X  $call Make signature
  221. --- 54,60 ----
  222. X  $call Make XtoPS
  223. X  $call Make X
  224. X  $call Make image
  225. ! $call Make shear
  226. X  $call Make quantize
  227. X  $call Make colors
  228. X  $call Make signature
  229. ***************
  230. *** 61,67 ****
  231. X  $call Make compress
  232. X  $call Make PreRvIcccm
  233. X  $
  234. ! $link'link_options' XtoPS,X,image,rotate,quantize,colors,signature,compress, -
  235. X    alien,PreRvIcccm,sys$input:/opt
  236. X  sys$share:decw$xlibshr.exe/share
  237. X  $
  238. --- 61,67 ----
  239. X  $call Make compress
  240. X  $call Make PreRvIcccm
  241. X  $
  242. ! $link'link_options' XtoPS,X,image,shear,quantize,colors,signature,compress, -
  243. X    alien,PreRvIcccm,sys$input:/opt
  244. X  sys$share:decw$xlibshr.exe/share
  245. X  $
  246. ***************
  247. *** 74,80 ****
  248. X  $call Make animate
  249. X  $call Make X
  250. X  $call Make image
  251. ! $call Make rotate
  252. X  $call Make quantize
  253. X  $call Make colors
  254. X  $call Make signature
  255. --- 74,80 ----
  256. X  $call Make animate
  257. X  $call Make X
  258. X  $call Make image
  259. ! $call Make shear
  260. X  $call Make quantize
  261. X  $call Make colors
  262. X  $call Make signature
  263. ***************
  264. *** 82,88 ****
  265. X  $call Make alien
  266. X  $call Make PreRvIcccm
  267. X  $
  268. ! $link'link_options' animate,X,image,rotate,quantize,colors,signature, -
  269. X    compress,alien,PreRvIcccm,sys$input:/opt
  270. X  sys$share:decw$xlibshr.exe/share
  271. X  $
  272. --- 82,88 ----
  273. X  $call Make alien
  274. X  $call Make PreRvIcccm
  275. X  $
  276. ! $link'link_options' animate,X,image,shear,quantize,colors,signature, -
  277. X    compress,alien,PreRvIcccm,sys$input:/opt
  278. X  sys$share:decw$xlibshr.exe/share
  279. X  $
  280. ***************
  281. *** 95,101 ****
  282. X  $call Make montage
  283. X  $call Make X
  284. X  $call Make image
  285. ! $call Make rotate
  286. X  $call Make quantize
  287. X  $call Make colors
  288. X  $call Make compress
  289. --- 95,101 ----
  290. X  $call Make montage
  291. X  $call Make X
  292. X  $call Make image
  293. ! $call Make shear
  294. X  $call Make quantize
  295. X  $call Make colors
  296. X  $call Make compress
  297. ***************
  298. *** 102,108 ****
  299. X  $call Make alien
  300. X  $call Make PreRvIcccm
  301. X  $
  302. ! $link'link_options' montage,X,image,rotate,quantize,colors,signature, -
  303. X    compress,alien,PreRvIcccm,sys$input:/opt
  304. X  sys$share:decw$xlibshr.exe/share
  305. X  $
  306. --- 102,108 ----
  307. X  $call Make alien
  308. X  $call Make PreRvIcccm
  309. X  $
  310. ! $link'link_options' montage,X,image,shear,quantize,colors,signature, -
  311. X    compress,alien,PreRvIcccm,sys$input:/opt
  312. X  sys$share:decw$xlibshr.exe/share
  313. X  $
  314. diff -r -c ImageMagick/Makefile ImageMagick2.2.1/Makefile
  315. *** ImageMagick/Makefile    Thu Jun 11 21:45:51 1992
  316. --- ImageMagick2.2.1/Makefile    Fri Dec 18 17:08:13 1992
  317. ***************
  318. *** 45,51 ****
  319. X  DEFINES= $(JPEG) $(JPEG_INCLUDES) $(TIFF) $(TIFF_INCLUDES)
  320. X  SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
  321. X  
  322. ! MagickObjects= X.o image.o rotate.o quantize.o colors.o signature.o compress.o\
  323. X    alien.o PreRvIcccm.o
  324. X  
  325. X  DisplayObjects= display.o $(MagickObjects)
  326. --- 45,51 ----
  327. X  DEFINES= $(JPEG) $(JPEG_INCLUDES) $(TIFF) $(TIFF_INCLUDES)
  328. X  SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
  329. X  
  330. ! MagickObjects= X.o image.o shear.o quantize.o colors.o signature.o compress.o\
  331. X    alien.o PreRvIcccm.o
  332. X  
  333. X  DisplayObjects= display.o $(MagickObjects)
  334. diff -r -c ImageMagick/Manifest.ps ImageMagick2.2.1/Manifest.ps
  335. *** ImageMagick/Manifest.ps    Wed Nov 25 14:23:10 1992
  336. --- ImageMagick2.2.1/Manifest.ps    Fri Dec 18 17:09:13 1992
  337. ***************
  338. *** 52,65 ****
  339. X  90 362 m(montage.man)s
  340. X  90 352 m(quantize.c)s
  341. X  90 342 m(quantize.man)s
  342. ! 90 332 m(rotate.c)s
  343. ! 180 322 m(Makefile)s
  344. ! 180 312 m(README)s
  345. ! 180 302 m(dna.script)s
  346. ! 90 312 m(scenes)s
  347. ! (scenes) stringwidth pop 91.0 add 315.3 m
  348. ! [ 325.3 315.3 305.3]
  349. X  {gsave 176.0 exch lineto stroke grestore} forall
  350. X  90 292 m(signature.c)s
  351. X  180 282 m(Imakefile)s
  352. X  180 272 m(MIFFtoSTEREO.c)s
  353. --- 52,65 ----
  354. X  90 362 m(montage.man)s
  355. X  90 352 m(quantize.c)s
  356. X  90 342 m(quantize.man)s
  357. ! 180 332 m(Makefile)s
  358. ! 180 322 m(README)s
  359. ! 180 312 m(dna.script)s
  360. ! 90 322 m(scenes)s
  361. ! (scenes) stringwidth pop 91.0 add 325.3 m
  362. ! [ 335.3 325.3 315.3]
  363. X  {gsave 176.0 exch lineto stroke grestore} forall
  364. + 90 302 m(shear.c)s
  365. X  90 292 m(signature.c)s
  366. X  180 282 m(Imakefile)s
  367. X  180 272 m(MIFFtoSTEREO.c)s
  368. ***************
  369. *** 89,94 ****
  370. X  {gsave 176.0 exch lineto stroke grestore} forall
  371. X  0 444 m(ImageMagick)s
  372. X  (ImageMagick) stringwidth pop 1.0 add 447.8 m
  373. ! [ 735.3 725.3 715.3 705.3 695.3 685.3 675.3 665.3 655.3 645.3 635.3 625.3 615.3 605.3 595.3 585.3 575.3 565.3 555.3 545.3 535.3 525.3 515.3 505.3 495.3 485.3 475.3 465.3 435.3 405.3 395.3 385.3 375.3 365.3 355.3 345.3 335.3 315.3 295.3 250.3 160.3]
  374. X  {gsave 86.0 exch lineto stroke grestore} forall
  375. X  showpage
  376. --- 89,94 ----
  377. X  {gsave 176.0 exch lineto stroke grestore} forall
  378. X  0 444 m(ImageMagick)s
  379. X  (ImageMagick) stringwidth pop 1.0 add 447.8 m
  380. ! [ 735.3 725.3 715.3 705.3 695.3 685.3 675.3 665.3 655.3 645.3 635.3 625.3 615.3 605.3 595.3 585.3 575.3 565.3 555.3 545.3 535.3 525.3 515.3 505.3 495.3 485.3 475.3 465.3 435.3 405.3 395.3 385.3 375.3 365.3 355.3 345.3 325.3 305.3 295.3 250.3 160.3]
  381. X  {gsave 86.0 exch lineto stroke grestore} forall
  382. X  showpage
  383. diff -r -c ImageMagick/README ImageMagick2.2.1/README
  384. *** ImageMagick/README    Thu Dec 10 15:16:54 1992
  385. --- ImageMagick2.2.1/README    Fri Dec 18 17:10:28 1992
  386. ***************
  387. *** 234,239 ****
  388. --- 234,244 ----
  389. X  
  390. X          Illegal unit size: 8 found in routine: _normalizeimagebits
  391. X  
  392. +       If alien.c does not compile on your HP, type defining
  393. +       -DXLIB_ILLEGAL_ACCESS when compiling.  If `display' dumps core
  394. +       when exiting, remove XCloseDisplay near the last line of
  395. +       display.c.
  396. X    4.  On occasion, a window manager (twm) may get in strange state which will 
  397. X        cause the display program to work improperly.  Fix this by restarting the
  398. X        window manager.
  399. diff -r -c ImageMagick/X.c ImageMagick2.2.1/X.c
  400. *** ImageMagick/X.c    Mon Dec  7 17:23:19 1992
  401. --- ImageMagick2.2.1/X.c    Mon Dec 21 14:12:34 1992
  402. ***************
  403. *** 62,68 ****
  404. X    External declarations.
  405. X  */
  406. X  extern char
  407. !   *application_name;
  408. X  
  409. X  extern void
  410. X    Error _Declare((char *,char *));
  411. --- 62,68 ----
  412. X    External declarations.
  413. X  */
  414. X  extern char
  415. !   *client_name;
  416. X  
  417. X  extern void
  418. X    Error _Declare((char *,char *));
  419. ***************
  420. *** 136,144 ****
  421. X  %  greater than, equal to, or less than second.  The two strings are
  422. X  %  assumed to be encoded using ISO 8859-1.
  423. X  %
  424. ! %  The format of the Latin1Upper routine is:
  425. X  %
  426. ! %      Latin1Upper(first,second)
  427. X  %
  428. X  %  A description of each parameter follows:
  429. X  %
  430. --- 136,144 ----
  431. X  %  greater than, equal to, or less than second.  The two strings are
  432. X  %  assumed to be encoded using ISO 8859-1.
  433. X  %
  434. ! %  The format of the Latin1Compare routine is:
  435. X  %
  436. ! %      Latin1Compare(first,second)
  437. X  %
  438. X  %  A description of each parameter follows:
  439. X  %
  440. ***************
  441. *** 386,392 ****
  442. X    /*
  443. X      Get user defaults from X resource database.
  444. X    */
  445. !   XGetResourceInfo(resource_database,application_name,&resource_info);
  446. X    /*
  447. X      Initialize visual info.
  448. X    */
  449. --- 386,392 ----
  450. X    /*
  451. X      Get user defaults from X resource database.
  452. X    */
  453. !   XGetResourceInfo(resource_database,client_name,&resource_info);
  454. X    /*
  455. X      Initialize visual info.
  456. X    */
  457. ***************
  458. *** 1117,1123 ****
  459. X    /*
  460. X      Get user defaults from X resource database.
  461. X    */
  462. !   XGetResourceInfo(resource_database,application_name,&resource_info);
  463. X    /*
  464. X      Initialize visual info.
  465. X    */
  466. --- 1117,1123 ----
  467. X    /*
  468. X      Get user defaults from X resource database.
  469. X    */
  470. !   XGetResourceInfo(resource_database,client_name,&resource_info);
  471. X    /*
  472. X      Initialize visual info.
  473. X    */
  474. ***************
  475. *** 1129,1135 ****
  476. X        return((Image *) NULL);
  477. X      }
  478. X    /*
  479. !     Determine background foreground colors.
  480. X    */
  481. X    map_info.colormap=XDefaultColormap(display,visual_info->screen);
  482. X    XGetPixelInfo(display,visual_info,&map_info,&resource_info,(Image *) NULL,
  483. --- 1129,1135 ----
  484. X        return((Image *) NULL);
  485. X      }
  486. X    /*
  487. !     Determine border color.
  488. X    */
  489. X    map_info.colormap=XDefaultColormap(display,visual_info->screen);
  490. X    XGetPixelInfo(display,visual_info,&map_info,&resource_info,(Image *) NULL,
  491. ***************
  492. *** 1167,1175 ****
  493. X        DestroyImage(image);
  494. X        return((Image *) NULL);
  495. X      }
  496. !   image->colormap[0].red=pixel_info.background_color.red >> 8;
  497. !   image->colormap[0].green=pixel_info.background_color.red >> 8;
  498. !   image->colormap[0].blue=pixel_info.background_color.red >> 8;
  499. X    p=image->pixels;
  500. X    for (i=0; i < (image->columns*image->rows); i++)
  501. X    {
  502. --- 1167,1175 ----
  503. X        DestroyImage(image);
  504. X        return((Image *) NULL);
  505. X      }
  506. !   image->colormap[0].red=pixel_info.border_color.red >> 8;
  507. !   image->colormap[0].green=pixel_info.border_color.green >> 8;
  508. !   image->colormap[0].blue=pixel_info.border_color.blue >> 8;
  509. X    p=image->pixels;
  510. X    for (i=0; i < (image->columns*image->rows); i++)
  511. X    {
  512. ***************
  513. *** 1372,1379 ****
  514. X    */
  515. X    (void) XParseGeometry(annotate_info->geometry,&x,&y,&width,&height);
  516. X    if ((width != annotate_image->columns) || (height != annotate_image->rows))
  517. !     TransformImage(&annotate_image,(char *) NULL,
  518. !       annotate_info->geometry,(char *) NULL);
  519. X    if (annotate_info->degrees != 0.0)
  520. X      {
  521. X        Image
  522. --- 1372,1379 ----
  523. X    */
  524. X    (void) XParseGeometry(annotate_info->geometry,&x,&y,&width,&height);
  525. X    if ((width != annotate_image->columns) || (height != annotate_image->rows))
  526. !     TransformImage(&annotate_image,(char *) NULL,annotate_info->geometry,
  527. !       (char *) NULL);
  528. X    if (annotate_info->degrees != 0.0)
  529. X      {
  530. X        Image
  531. ***************
  532. *** 1576,1586 ****
  533. X  #define MaxIconSize  64
  534. X  
  535. X    int
  536. X      number_sizes;
  537. X  
  538. X    unsigned int
  539. X      icon_height,
  540. !     icon_width;
  541. X  
  542. X    unsigned long int
  543. X      scale_factor;
  544. --- 1576,1589 ----
  545. X  #define MaxIconSize  64
  546. X  
  547. X    int
  548. +     i,
  549. X      number_sizes;
  550. X  
  551. X    unsigned int
  552. +     height,
  553. X      icon_height,
  554. !     icon_width,
  555. !     width;
  556. X  
  557. X    unsigned long int
  558. X      scale_factor;
  559. ***************
  560. *** 1622,1636 ****
  561. X        icon_size->height_inc=1;
  562. X      }
  563. X    /*
  564. X      Look for an icon size that maintains the aspect ratio of image.
  565. X    */
  566. !   scale_factor=UpShift(icon_size->max_width)/image->columns;
  567. !   if (scale_factor > (UpShift(icon_size->max_height)/image->rows))
  568. !     scale_factor=UpShift(icon_size->max_height)/image->rows;
  569. X    icon_width=icon_size->min_width;
  570. X    while (icon_width < icon_size->max_width)
  571. X    {
  572. !     if (icon_width >= (DownShift(image->columns*scale_factor)))
  573. X        break;
  574. X      icon_width+=icon_size->width_inc;
  575. X    }
  576. --- 1625,1646 ----
  577. X        icon_size->height_inc=1;
  578. X      }
  579. X    /*
  580. +     Determine aspect ratio of image.
  581. +   */
  582. +   width=image->columns;
  583. +   height=image->rows;
  584. +   if (window->clip_geometry)
  585. +     (void) XParseGeometry(window->clip_geometry,&i,&i,&width,&height);
  586. +   /*
  587. X      Look for an icon size that maintains the aspect ratio of image.
  588. X    */
  589. !   scale_factor=UpShift(icon_size->max_width)/width;
  590. !   if (scale_factor > (UpShift(icon_size->max_height)/height))
  591. !     scale_factor=UpShift(icon_size->max_height)/height;
  592. X    icon_width=icon_size->min_width;
  593. X    while (icon_width < icon_size->max_width)
  594. X    {
  595. !     if (icon_width >= (DownShift(width*scale_factor)))
  596. X        break;
  597. X      icon_width+=icon_size->width_inc;
  598. X    }
  599. ***************
  600. *** 1637,1643 ****
  601. X    icon_height=icon_size->min_height;
  602. X    while (icon_height < icon_size->max_height)
  603. X    {
  604. !     if (icon_height >= (DownShift(image->rows*scale_factor)))
  605. X        break;
  606. X      icon_height+=icon_size->height_inc;
  607. X    }
  608. --- 1647,1653 ----
  609. X    icon_height=icon_size->min_height;
  610. X    while (icon_height < icon_size->max_height)
  611. X    {
  612. !     if (icon_height >= (DownShift(height*scale_factor)))
  613. X        break;
  614. X      icon_height+=icon_size->height_inc;
  615. X    }
  616. ***************
  617. *** 2352,2358 ****
  618. X  %
  619. X  %  The format of the XGetResource routine is:
  620. X  %
  621. ! %      value=XGetResource(database,application_name,name,class,resource_default)
  622. X  %
  623. X  %  A description of each parameter follows:
  624. X  %
  625. --- 2362,2368 ----
  626. X  %
  627. X  %  The format of the XGetResource routine is:
  628. X  %
  629. ! %      value=XGetResource(database,client,keyword,resource_default)
  630. X  %
  631. X  %  A description of each parameter follows:
  632. X  %
  633. ***************
  634. *** 2363,2388 ****
  635. X  %    o database: Specifies a resource database; returned from
  636. X  %      XrmGetStringDatabase.
  637. X  %
  638. ! %    o application_name:  Specifies the application name used to retrieve
  639. X  %      resource info from the X server database.
  640. X  %
  641. ! %    o name: Specifies the name of the value being retrieved.
  642. X  %
  643. - %    o class: Specifies the class of the value being retrieved.
  644. - %
  645. X  %    o resource_default: Specifies the default value to return if the query
  646. ! %      fails to find the specified name/class.
  647. X  %
  648. X  %
  649. X  */
  650. ! char *XGetResource(database,application_name,name,class,resource_default)
  651. X  XrmDatabase
  652. X    database;
  653. X  
  654. X  char
  655. !   *application_name,
  656. !   *name,
  657. !   *class,
  658. X    *resource_default;
  659. X  {
  660. X    char
  661. --- 2373,2395 ----
  662. X  %    o database: Specifies a resource database; returned from
  663. X  %      XrmGetStringDatabase.
  664. X  %
  665. ! %    o client:  Specifies the application name used to retrieve
  666. X  %      resource info from the X server database.
  667. X  %
  668. ! %    o keyword: Specifies the keyword of the value being retrieved.
  669. X  %
  670. X  %    o resource_default: Specifies the default value to return if the query
  671. ! %      fails to find the specified keyword/class.
  672. X  %
  673. X  %
  674. X  */
  675. ! char *XGetResource(database,client,keyword,resource_default)
  676. X  XrmDatabase
  677. X    database;
  678. X  
  679. X  char
  680. !   *client,
  681. !   *keyword,
  682. X    *resource_default;
  683. X  {
  684. X    char
  685. ***************
  686. *** 2399,2409 ****
  687. X    if (database == (XrmDatabase) NULL)
  688. X      return(resource_default);
  689. X    *resource_name='\0';
  690. -   if (name != (char *) NULL)
  691. -     (void) sprintf(resource_name,"%s.%s\0",application_name,name);
  692. X    *resource_class='\0';
  693. !   if (class != (char *) NULL)
  694. !     (void) sprintf(resource_class,"%s.%s\0",application_name,class);
  695. X    status=XrmGetResource(database,resource_name,resource_class,&resource_type,
  696. X      &resource_value);
  697. X    if (status == False)
  698. --- 2406,2442 ----
  699. X    if (database == (XrmDatabase) NULL)
  700. X      return(resource_default);
  701. X    *resource_name='\0';
  702. X    *resource_class='\0';
  703. !   if (keyword != (char *) NULL)
  704. !     {
  705. !       unsigned char
  706. !         c,
  707. !         k;
  708. !      
  709. !       /*
  710. !         Initialize resource keyword and class.
  711. !       */
  712. !       (void) sprintf(resource_name,"%s.%s\0",client,keyword);
  713. !       c=(*client);
  714. !       if ((c >= XK_a) && (c <= XK_z))
  715. !         c-=(XK_a-XK_A);
  716. !       else
  717. !         if ((c >= XK_agrave) && (c <= XK_odiaeresis))
  718. !           c-=(XK_agrave-XK_Agrave);
  719. !         else
  720. !           if ((c >= XK_oslash) && (c <= XK_thorn))
  721. !             c-=(XK_oslash-XK_Ooblique);
  722. !       k=(*keyword);
  723. !       if ((k >= XK_a) && (k <= XK_z))
  724. !         k-=(XK_a-XK_A);
  725. !       else
  726. !         if ((k >= XK_agrave) && (k <= XK_odiaeresis))
  727. !           k-=(XK_agrave-XK_Agrave);
  728. !         else
  729. !           if ((k >= XK_oslash) && (k <= XK_thorn))
  730. !             k-=(XK_oslash-XK_Ooblique);
  731. !       (void) sprintf(resource_class,"%c%s.%c%s\0",c,client+1,k,keyword+1);
  732. !     }
  733. X    status=XrmGetResource(database,resource_name,resource_class,&resource_type,
  734. X      &resource_value);
  735. X    if (status == False)
  736. ***************
  737. *** 2426,2432 ****
  738. X  %
  739. X  %  The format of the XGetResourceInfo routine is:
  740. X  %
  741. ! %      XGetResourceInfo(resource_database,application_name,resource_info)
  742. X  %
  743. X  %  A description of each parameter follows:
  744. X  %
  745. --- 2459,2465 ----
  746. X  %
  747. X  %  The format of the XGetResourceInfo routine is:
  748. X  %
  749. ! %      XGetResourceInfo(resource_database,client_name,resource_info)
  750. X  %
  751. X  %  A description of each parameter follows:
  752. X  %
  753. ***************
  754. *** 2433,2439 ****
  755. X  %    o resource_database: Specifies a resource database; returned from
  756. X  %      XrmGetStringDatabase.
  757. X  %
  758. ! %    o application_name:  Specifies the application name used to retrieve
  759. X  %      resource info from the X server database.
  760. X  %
  761. X  %    o resource_info: Specifies a pointer to a X11 XResourceInfo structure.
  762. --- 2466,2472 ----
  763. X  %    o resource_database: Specifies a resource database; returned from
  764. X  %      XrmGetStringDatabase.
  765. X  %
  766. ! %    o client_name:  Specifies the application name used to retrieve
  767. X  %      resource info from the X server database.
  768. X  %
  769. X  %    o resource_info: Specifies a pointer to a X11 XResourceInfo structure.
  770. ***************
  771. *** 2440,2451 ****
  772. X  %
  773. X  %
  774. X  */
  775. ! void XGetResourceInfo(resource_database,application_name,resource_info)
  776. X  XrmDatabase
  777. X    resource_database;
  778. X  
  779. X  char
  780. !   *application_name;
  781. X  
  782. X  XResourceInfo
  783. X    *resource_info;
  784. --- 2473,2484 ----
  785. X  %
  786. X  %
  787. X  */
  788. ! void XGetResourceInfo(resource_database,client_name,resource_info)
  789. X  XrmDatabase
  790. X    resource_database;
  791. X  
  792. X  char
  793. !   *client_name;
  794. X  
  795. X  XResourceInfo
  796. X    *resource_info;
  797. ***************
  798. *** 2456,2473 ****
  799. X    /*
  800. X      Initialize resource info fields.
  801. X    */
  802. !   resource_value=XGetResource(resource_database,application_name,"backdrop",
  803. !     (char *) NULL,"False");
  804. X    resource_info->backdrop=IsTrue(resource_value);
  805. !   resource_info->background_color=XGetResource(resource_database,
  806. !     application_name,"background","Background","black");
  807. !   resource_info->border_color=XGetResource(resource_database,application_name,
  808. !     "borderColor","BorderColor","white");
  809. !   resource_value=XGetResource(resource_database,application_name,"borderWidth",
  810. !     "BorderWidth","2");
  811. X    resource_info->border_width=atoi(resource_value);
  812. !   resource_value=XGetResource(resource_database,application_name,"colormap",
  813. !     (char *) NULL,"shared");
  814. X    resource_info->colormap=UndefinedColormap;
  815. X    if (Latin1Compare("private",resource_value) == 0)
  816. X      resource_info->colormap=PrivateColormap;
  817. --- 2489,2504 ----
  818. X    /*
  819. X      Initialize resource info fields.
  820. X    */
  821. !   resource_value=XGetResource(resource_database,client_name,"backdrop","False");
  822. X    resource_info->backdrop=IsTrue(resource_value);
  823. !   resource_info->background_color=
  824. !     XGetResource(resource_database,client_name,"background","black");
  825. !   resource_info->border_color=
  826. !     XGetResource(resource_database,client_name,"borderColor","white");
  827. !   resource_value=XGetResource(resource_database,client_name,"borderWidth","2");
  828. X    resource_info->border_width=atoi(resource_value);
  829. !   resource_value=
  830. !     XGetResource(resource_database,client_name,"colormap","shared");
  831. X    resource_info->colormap=UndefinedColormap;
  832. X    if (Latin1Compare("private",resource_value) == 0)
  833. X      resource_info->colormap=PrivateColormap;
  834. ***************
  835. *** 2475,2485 ****
  836. X      resource_info->colormap=SharedColormap;
  837. X    if (resource_info->colormap == UndefinedColormap)
  838. X      Warning("unrecognized colormap type",resource_value);
  839. !   resource_value=XGetResource(resource_database,application_name,"colors",
  840. !     (char *) NULL,"0");
  841. X    resource_info->number_colors=atoi(resource_value);
  842. !   resource_value=XGetResource(resource_database,application_name,"colorspace",
  843. !     (char *) NULL,"rgb");
  844. X    resource_info->colorspace=UndefinedColorspace;
  845. X    if (Latin1Compare("gray",resource_value) == 0)
  846. X      resource_info->colorspace=GRAYColorspace;
  847. --- 2506,2514 ----
  848. X      resource_info->colormap=SharedColormap;
  849. X    if (resource_info->colormap == UndefinedColormap)
  850. X      Warning("unrecognized colormap type",resource_value);
  851. !   resource_value=XGetResource(resource_database,client_name,"colors","0");
  852. X    resource_info->number_colors=atoi(resource_value);
  853. !   resource_value=XGetResource(resource_database,client_name,"colorspace","rgb");
  854. X    resource_info->colorspace=UndefinedColorspace;
  855. X    if (Latin1Compare("gray",resource_value) == 0)
  856. X      resource_info->colorspace=GRAYColorspace;
  857. ***************
  858. *** 2493,2533 ****
  859. X      resource_info->colorspace=XYZColorspace;
  860. X    if (resource_info->colorspace == UndefinedColorspace)
  861. X      Warning("unrecognized colorspace type",resource_value);
  862. !   resource_value=XGetResource(resource_database,application_name,"debug",
  863. !     (char *) NULL,"False");
  864. X    resource_info->debug=IsTrue(resource_value);
  865. !   resource_value=XGetResource(resource_database,application_name,"delay",
  866. !     (char *) NULL,"0");
  867. X    resource_info->delay=atoi(resource_value);
  868. !   resource_value=XGetResource(resource_database,application_name,"dither",
  869. !     (char *) NULL,"False");
  870. X    resource_info->dither=IsTrue(resource_value);
  871. !   resource_info->font=XGetResource(resource_database,application_name,
  872. !     "font","Font",(char *) NULL);
  873. !   resource_info->font_name[0]=XGetResource(resource_database,application_name,
  874. !     "font1","Font1","fixed");
  875. !   resource_info->font_name[1]=XGetResource(resource_database,application_name,
  876. !     "font2","Font2","variable");
  877. !   resource_info->font_name[2]=XGetResource(resource_database,application_name,
  878. !     "font3","Font3","5x8");
  879. !   resource_info->font_name[3]=XGetResource(resource_database,application_name,
  880. !     "font4","Font4","6x10");
  881. !   resource_info->font_name[4]=XGetResource(resource_database,application_name,
  882. !     "font5","Font5","7x13bold");
  883. !   resource_info->font_name[5]=XGetResource(resource_database,application_name,
  884. !     "font6","Font6","8x13bold");
  885. !   resource_info->font_name[6]=XGetResource(resource_database,application_name,
  886. !     "font7","Font7","9x15bold");
  887. !   resource_info->font_name[7]=XGetResource(resource_database,application_name,
  888. !     "font8","Font8","10x20");
  889. !   resource_info->font_name[8]=XGetResource(resource_database,application_name,
  890. !     "font9","Font9","12x24");
  891. !   resource_info->foreground_color=XGetResource(resource_database,
  892. !     application_name,"foreground","Foreground","white");
  893. !   resource_info->icon_geometry=XGetResource(resource_database,
  894. !     application_name,"iconGeometry","IconGeometry",(char *) NULL);
  895. !   resource_value=XGetResource(resource_database,application_name,"gravity",
  896. !     (char *) NULL,"Center");
  897. X    resource_info->gravity=(-1);
  898. X    if (Latin1Compare("Forget",resource_value) == 0)
  899. X      resource_info->gravity=ForgetGravity;
  900. --- 2522,2558 ----
  901. X      resource_info->colorspace=XYZColorspace;
  902. X    if (resource_info->colorspace == UndefinedColorspace)
  903. X      Warning("unrecognized colorspace type",resource_value);
  904. !   resource_value=XGetResource(resource_database,client_name,"debug","False");
  905. X    resource_info->debug=IsTrue(resource_value);
  906. !   resource_value=XGetResource(resource_database,client_name,"delay","0");
  907. X    resource_info->delay=atoi(resource_value);
  908. !   resource_value=XGetResource(resource_database,client_name,"dither","False");
  909. X    resource_info->dither=IsTrue(resource_value);
  910. !   resource_info->font=
  911. !     XGetResource(resource_database,client_name,"font",(char *) NULL);
  912. !   resource_info->font_name[0]=
  913. !     XGetResource(resource_database,client_name,"font1","fixed");
  914. !   resource_info->font_name[1]=
  915. !     XGetResource(resource_database,client_name,"font2","variable");
  916. !   resource_info->font_name[2]=
  917. !     XGetResource(resource_database,client_name,"font3","5x8");
  918. !   resource_info->font_name[3]=
  919. !     XGetResource(resource_database,client_name,"font4","6x10");
  920. !   resource_info->font_name[4]=
  921. !     XGetResource(resource_database,client_name,"font5","7x13bold");
  922. !   resource_info->font_name[5]=
  923. !     XGetResource(resource_database,client_name,"font6","8x13bold");
  924. !   resource_info->font_name[6]=
  925. !     XGetResource(resource_database,client_name,"font7","9x15bold");
  926. !   resource_info->font_name[7]=
  927. !     XGetResource(resource_database,client_name,"font8","10x20");
  928. !   resource_info->font_name[8]=
  929. !     XGetResource(resource_database,client_name,"font9","12x24");
  930. !   resource_info->foreground_color=
  931. !     XGetResource(resource_database,client_name,"foreground","white");
  932. !   resource_info->icon_geometry=
  933. !     XGetResource(resource_database,client_name,"iconGeometry",(char *) NULL);
  934. !   resource_value=XGetResource(resource_database,client_name,"gravity","Center");
  935. X    resource_info->gravity=(-1);
  936. X    if (Latin1Compare("Forget",resource_value) == 0)
  937. X      resource_info->gravity=ForgetGravity;
  938. ***************
  939. *** 2552,2602 ****
  940. X    if (Latin1Compare("Static",resource_value) == 0)
  941. X      resource_info->gravity=StaticGravity;
  942. X    if (resource_info->gravity == (-1))
  943. !     Warning("unrecognized gravity type",resource_value);
  944. !   resource_value=XGetResource(resource_database,application_name,"iconic",
  945. !     "Iconic","False");
  946. X    resource_info->iconic=IsTrue(resource_value);
  947. !   resource_info->image_geometry=XGetResource(resource_database,
  948. !     application_name,"imageGeometry","ImageGeometry",(char *) NULL);
  949. !   resource_value=XGetResource(resource_database,application_name,"magnify",
  950. !     (char *) NULL,"2");
  951. X    resource_info->magnify=atoi(resource_value);
  952. !   resource_info->map_type=XGetResource(resource_database,application_name,"map",
  953. !     "Map",(char *) NULL);
  954. !   resource_value=XGetResource(resource_database,application_name,"monochrome",
  955. !     (char *) NULL,"False");
  956. X    resource_info->monochrome=IsTrue(resource_value);
  957. !   resource_info->name=XGetResource(resource_database,application_name,"name",
  958. !     "Name",(char *) NULL);
  959. !   resource_info->pen_color[0]=XGetResource(resource_database,application_name,
  960. !     "pen1","Pen1","black");
  961. !   resource_info->pen_color[1]=XGetResource(resource_database,application_name,
  962. !     "pen2","Pen2","blue");
  963. !   resource_info->pen_color[2]=XGetResource(resource_database,application_name,
  964. !     "pen3","Pen3","cyan");
  965. !   resource_info->pen_color[3]=XGetResource(resource_database,application_name,
  966. !     "pen4","Pen4","green");
  967. !   resource_info->pen_color[4]=XGetResource(resource_database,application_name,
  968. !     "pen5","Pen5","gray");
  969. !   resource_info->pen_color[5]=XGetResource(resource_database,application_name,
  970. !     "pen6","Pen6","red");
  971. !   resource_info->pen_color[6]=XGetResource(resource_database,application_name,
  972. !     "pen7","Pen7","magenta");
  973. !   resource_info->pen_color[7]=XGetResource(resource_database,application_name,
  974. !     "pen8","Pen8","yellow");
  975. !   resource_info->pen_color[8]=XGetResource(resource_database,application_name,
  976. !     "pen9","Pen9","white");
  977. !   resource_info->print_filename=XGetResource(resource_database,application_name,
  978. !     "printFilename",(char *) NULL,(char *) NULL);
  979. !   resource_info->title=XGetResource(resource_database,application_name,"title",
  980. !     "Title",(char *) NULL);
  981. !   resource_value=XGetResource(resource_database,application_name,"treeDepth",
  982. !     (char *) NULL,"0");
  983. X    resource_info->tree_depth=atoi(resource_value);
  984. !   resource_info->write_filename=XGetResource(resource_database,application_name,
  985. !     "writeFilename",(char *) NULL,(char *) NULL);
  986. !   resource_info->visual_type=XGetResource(resource_database,application_name,
  987. !     "visual","Visual",(char *) NULL);
  988. X  }
  989. X  
  990. X  /*
  991. --- 2577,2627 ----
  992. X    if (Latin1Compare("Static",resource_value) == 0)
  993. X      resource_info->gravity=StaticGravity;
  994. X    if (resource_info->gravity == (-1))
  995. !     {
  996. !       Warning("unrecognized gravity type",resource_value);
  997. !       resource_info->gravity=CenterGravity;
  998. !     }
  999. !   resource_value=XGetResource(resource_database,client_name,"iconic","False");
  1000. X    resource_info->iconic=IsTrue(resource_value);
  1001. !   resource_info->image_geometry=
  1002. !     XGetResource(resource_database,client_name,"imageGeometry",(char *) NULL);
  1003. !   resource_value=XGetResource(resource_database,client_name,"magnify","2");
  1004. X    resource_info->magnify=atoi(resource_value);
  1005. !   resource_info->map_type=
  1006. !     XGetResource(resource_database,client_name,"map",(char *) NULL);
  1007. !   resource_value=
  1008. !     XGetResource(resource_database,client_name,"monochrome","False");
  1009. X    resource_info->monochrome=IsTrue(resource_value);
  1010. !   resource_info->name=
  1011. !     XGetResource(resource_database,client_name,"name",(char *) NULL);
  1012. !   resource_info->pen_color[0]=
  1013. !     XGetResource(resource_database,client_name,"pen1","black");
  1014. !   resource_info->pen_color[1]=
  1015. !     XGetResource(resource_database,client_name,"pen2","blue");
  1016. !   resource_info->pen_color[2]=
  1017. !     XGetResource(resource_database,client_name,"pen3","cyan");
  1018. !   resource_info->pen_color[3]=
  1019. !     XGetResource(resource_database,client_name,"pen4","green");
  1020. !   resource_info->pen_color[4]=
  1021. !     XGetResource(resource_database,client_name,"pen5","gray");
  1022. !   resource_info->pen_color[5]=
  1023. !     XGetResource(resource_database,client_name,"pen6","red");
  1024. !   resource_info->pen_color[6]=
  1025. !     XGetResource(resource_database,client_name,"pen7","magenta");
  1026. !   resource_info->pen_color[7]=
  1027. !     XGetResource(resource_database,client_name,"pen8","yellow");
  1028. !   resource_info->pen_color[8]=
  1029. !     XGetResource(resource_database,client_name,"pen9","white");
  1030. !   resource_info->print_filename=
  1031. !     XGetResource(resource_database,client_name,"printFilename",(char *) NULL);
  1032. !   resource_info->title=
  1033. !     XGetResource(resource_database,client_name,"title",(char *) NULL);
  1034. !   resource_value=XGetResource(resource_database,client_name,"treeDepth","0");
  1035. X    resource_info->tree_depth=atoi(resource_value);
  1036. !   resource_info->write_filename=
  1037. !     XGetResource(resource_database,client_name,"writeFilename",(char *) NULL);
  1038. !   resource_info->visual_type=
  1039. !     XGetResource(resource_database,client_name,"visual",(char *) NULL);
  1040. X  }
  1041. X  
  1042. X  /*
  1043. ***************
  1044. *** 2748,2754 ****
  1045. X              clip_x,
  1046. X              clip_y;
  1047. X  
  1048. !           unsigned
  1049. X              clip_height,
  1050. X              clip_width;
  1051. X  
  1052. --- 2773,2779 ----
  1053. X              clip_x,
  1054. X              clip_y;
  1055. X  
  1056. !           unsigned int
  1057. X              clip_height,
  1058. X              clip_width;
  1059. X  
  1060. diff -r -c ImageMagick/X.h ImageMagick2.2.1/X.h
  1061. *** ImageMagick/X.h    Mon Dec  7 09:23:03 1992
  1062. --- ImageMagick2.2.1/X.h    Fri Dec 18 17:07:28 1992
  1063. ***************
  1064. *** 243,249 ****
  1065. X    X utilities routines.
  1066. X  */
  1067. X  extern char 
  1068. !   *XGetResource _Declare((XrmDatabase,char *,char *,char *,char *)),
  1069. X    *XVisualClassName _Declare((XVisualInfo *));
  1070. X  
  1071. X  extern Cursor 
  1072. --- 243,249 ----
  1073. X    X utilities routines.
  1074. X  */
  1075. X  extern char 
  1076. !   *XGetResource _Declare((XrmDatabase,char *,char *,char *)),
  1077. X    *XVisualClassName _Declare((XVisualInfo *));
  1078. X  
  1079. X  extern Cursor 
  1080. diff -r -c ImageMagick/XtoPS.c ImageMagick2.2.1/XtoPS.c
  1081. *** ImageMagick/XtoPS.c    Mon Dec  7 09:12:50 1992
  1082. --- ImageMagick2.2.1/XtoPS.c    Fri Dec 18 17:07:26 1992
  1083. ***************
  1084. *** 87,93 ****
  1085. X    Global declarations.
  1086. X  */
  1087. X  char
  1088. !   *application_name;
  1089. X  
  1090. X  /*
  1091. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1092. --- 87,93 ----
  1093. X    Global declarations.
  1094. X  */
  1095. X  char
  1096. !   *client_name;
  1097. X  
  1098. X  /*
  1099. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1100. ***************
  1101. *** 120,126 ****
  1102. X    *message,
  1103. X    *qualifier;
  1104. X  {
  1105. !   (void) fprintf(stderr,"%s: %s",application_name,message);
  1106. X    if (qualifier != (char *) NULL)
  1107. X      (void) fprintf(stderr," (%s)",qualifier);
  1108. X    (void) fprintf(stderr,".\n");
  1109. --- 120,126 ----
  1110. X    *message,
  1111. X    *qualifier;
  1112. X  {
  1113. !   (void) fprintf(stderr,"%s: %s",client_name,message);
  1114. X    if (qualifier != (char *) NULL)
  1115. X      (void) fprintf(stderr," (%s)",qualifier);
  1116. X    (void) fprintf(stderr,".\n");
  1117. ***************
  1118. *** 167,173 ****
  1119. X        "-window id          select window with this id or name",
  1120. X        (char *) NULL
  1121. X      };
  1122. !   (void) fprintf(stderr,"Usage: %s [options ...] file\n",application_name);
  1123. X    (void) fprintf(stderr,"\nWhere options include:\n");
  1124. X    for (p=options; *p != (char *) NULL; p++)
  1125. X      (void) fprintf(stderr,"  %s\n",*p);
  1126. --- 167,173 ----
  1127. X        "-window id          select window with this id or name",
  1128. X        (char *) NULL
  1129. X      };
  1130. !   (void) fprintf(stderr,"Usage: %s [options ...] file\n",client_name);
  1131. X    (void) fprintf(stderr,"\nWhere options include:\n");
  1132. X    for (p=options; *p != (char *) NULL; p++)
  1133. X      (void) fprintf(stderr,"  %s\n",*p);
  1134. ***************
  1135. *** 201,207 ****
  1136. X  {
  1137. X    char
  1138. X      *filename,
  1139. -     *image_geometry,
  1140. X      *option,
  1141. X      *resource_value,
  1142. X      *scale_geometry,
  1143. --- 201,206 ----
  1144. ***************
  1145. *** 238,244 ****
  1146. X    /*
  1147. X      Display usage profile if there are no command line arguments.
  1148. X    */
  1149. !   application_name=(*argv);
  1150. X    if (argc < 2)
  1151. X      Usage();
  1152. X    /*
  1153. --- 237,243 ----
  1154. X    /*
  1155. X      Display usage profile if there are no command line arguments.
  1156. X    */
  1157. !   client_name=(*argv);
  1158. X    if (argc < 2)
  1159. X      Usage();
  1160. X    /*
  1161. ***************
  1162. *** 284,308 ****
  1163. X    /*
  1164. X      Get user defaults from X resource database.
  1165. X    */
  1166. !   XGetResourceInfo(resource_database,application_name,&resource_info);
  1167. !   resource_value=XGetResource(resource_database,application_name,"borders",
  1168. !     (char *) NULL,"False");
  1169. X    borders=IsTrue(resource_value);
  1170. !   resource_value=XGetResource(resource_database,application_name,"frame",
  1171. !     (char *) NULL,"False");
  1172. X    frame=IsTrue(resource_value);
  1173. !   image_geometry=XGetResource(resource_database,application_name,
  1174. !     "imageGeometry","ImageGeometry",(char *) NULL);
  1175. !   resource_value=XGetResource(resource_database,application_name,"rotate",
  1176. !     (char *) NULL,"False");
  1177. !   scale_geometry=XGetResource(resource_database,application_name,
  1178. !     "scaleGeometry","ScaleGeometry",(char *) NULL);
  1179. X    degrees=atoi(resource_value);
  1180. !   resource_value=XGetResource(resource_database,application_name,"screen",
  1181. !     (char *) NULL,"False");
  1182. X    screen=IsTrue(resource_value);
  1183. !   resource_value=XGetResource(resource_database,application_name,"verbose",
  1184. !     (char *) NULL,"False");
  1185. X    verbose=IsTrue(resource_value);
  1186. X    /*
  1187. X      Check command syntax.
  1188. --- 283,300 ----
  1189. X    /*
  1190. X      Get user defaults from X resource database.
  1191. X    */
  1192. !   XGetResourceInfo(resource_database,client_name,&resource_info);
  1193. !   resource_value=XGetResource(resource_database,client_name,"borders","False");
  1194. X    borders=IsTrue(resource_value);
  1195. !   resource_value=XGetResource(resource_database,client_name,"frame","False");
  1196. X    frame=IsTrue(resource_value);
  1197. !   resource_value=XGetResource(resource_database,client_name,"rotate","False");
  1198. !   scale_geometry=
  1199. !     XGetResource(resource_database,client_name,"scaleGeometry",(char *) NULL);
  1200. X    degrees=atoi(resource_value);
  1201. !   resource_value=XGetResource(resource_database,client_name,"screen","False");
  1202. X    screen=IsTrue(resource_value);
  1203. !   resource_value=XGetResource(resource_database,client_name,"verbose","False");
  1204. X    verbose=IsTrue(resource_value);
  1205. X    /*
  1206. X      Check command syntax.
  1207. ***************
  1208. *** 359,365 ****
  1209. X            i++;
  1210. X            if (i == argc)
  1211. X              Error("missing geometry on -geometry",(char *) NULL);
  1212. !           image_geometry=argv[i];
  1213. X            break;
  1214. X          }
  1215. X          case 'h':
  1216. --- 351,357 ----
  1217. X            i++;
  1218. X            if (i == argc)
  1219. X              Error("missing geometry on -geometry",(char *) NULL);
  1220. !           resource_info.image_geometry=argv[i];
  1221. X            break;
  1222. X          }
  1223. X          case 'h':
  1224. ***************
  1225. *** 442,449 ****
  1226. X    image=ReadXImage(target_window,server_name,frame,screen,borders);
  1227. X    if (image == (Image *) NULL)
  1228. X      exit(1);
  1229. !   if (image_geometry || scale_geometry)
  1230. !     TransformImage(&image,(char *) NULL,image_geometry,scale_geometry);
  1231. X    if ((degrees % 360) != 0)
  1232. X      {
  1233. X        Image
  1234. --- 434,442 ----
  1235. X    image=ReadXImage(target_window,server_name,frame,screen,borders);
  1236. X    if (image == (Image *) NULL)
  1237. X      exit(1);
  1238. !   if (resource_info.image_geometry || scale_geometry)
  1239. !     TransformImage(&image,(char *) NULL,resource_info.image_geometry,
  1240. !       scale_geometry);
  1241. X    if ((degrees % 360) != 0)
  1242. X      {
  1243. X        Image
  1244. ***************
  1245. *** 462,468 ****
  1246. X    if (resource_info.monochrome)
  1247. X      QuantizeImage(image,2,8,False,GRAYColorspace,True);
  1248. X    (void) strcpy(image->filename,filename);
  1249. !   (void) PrintImage(image,image_geometry);
  1250. X    if (verbose)
  1251. X      {
  1252. X        /*
  1253. --- 455,461 ----
  1254. X    if (resource_info.monochrome)
  1255. X      QuantizeImage(image,2,8,False,GRAYColorspace,True);
  1256. X    (void) strcpy(image->filename,filename);
  1257. !   (void) PrintImage(image,resource_info.image_geometry);
  1258. X    if (verbose)
  1259. X      {
  1260. X        /*
  1261. ***************
  1262. *** 469,475 ****
  1263. X          Display detailed info about the image.
  1264. X        */
  1265. X        if (image->class == DirectClass)
  1266. !         image->colors=NumberColors(image);
  1267. X        (void) fprintf(stderr,"[%u] %s %ux%u",image->scene,image->filename,
  1268. X          image->columns,image->rows);
  1269. X        if (image->class == DirectClass)
  1270. --- 462,468 ----
  1271. X          Display detailed info about the image.
  1272. X        */
  1273. X        if (image->class == DirectClass)
  1274. !         image->colors=NumberColors(image,(FILE *) NULL);
  1275. X        (void) fprintf(stderr,"[%u] %s %ux%u",image->scene,image->filename,
  1276. X          image->columns,image->rows);
  1277. X        if (image->class == DirectClass)
  1278. diff -r -c ImageMagick/XtoPS.man ImageMagick2.2.1/XtoPS.man
  1279. *** ImageMagick/XtoPS.man    Mon Dec  7 19:52:59 1992
  1280. --- ImageMagick2.2.1/XtoPS.man    Fri Dec 18 17:07:31 1992
  1281. ***************
  1282. *** 79,84 ****
  1283. --- 79,87 ----
  1284. X  .B "-rotate \fIdegrees\fP"
  1285. X  apply Paeth image rotation to the image.
  1286. X  
  1287. + Empty triangles left over from rotating the image are filled with
  1288. + the color defined by the pixel at location (0,0).
  1289. X  By default the image is output in portrait mode.  Use \fB-rotate 90\fP to
  1290. X  display the image in landscape mode.
  1291. X  .TP 5
  1292. ***************
  1293. *** 91,98 ****
  1294. X  one factor is specified, both the width and height factors assume the
  1295. X  value.
  1296. X  
  1297. ! Factors may be fractional.  For example, a factor of 1.5 will increase the
  1298. ! image size by one and one-half.
  1299. X  .TP 5
  1300. X  .B "-screen"
  1301. X  This option indicates that the GetImage request used to obtain the image
  1302. --- 94,102 ----
  1303. X  one factor is specified, both the width and height factors assume the
  1304. X  value.
  1305. X  
  1306. ! Factors may be fractional.  To increase the size of an image, use a
  1307. ! scale factor greater than 1.0.  To decrease an image's size, use a
  1308. ! scale factor less than 1.0.  Default is 1.0.
  1309. X  .TP 5
  1310. X  .B "-screen"
  1311. X  This option indicates that the GetImage request used to obtain the image
  1312. diff -r -c ImageMagick/alien.c ImageMagick2.2.1/alien.c
  1313. *** ImageMagick/alien.c    Tue Dec  8 11:16:04 1992
  1314. --- ImageMagick2.2.1/alien.c    Sat Dec 19 02:57:52 1992
  1315. ***************
  1316. *** 68,73 ****
  1317. --- 68,74 ----
  1318. X      "FAX",
  1319. X      "GIF",
  1320. X      "GRAY",
  1321. +     "HISTOGRAM",
  1322. X      "JPEG",
  1323. X      "JPG",
  1324. X      "MIFF",
  1325. ***************
  1326. *** 92,99 ****
  1327. X    External declarations.
  1328. X  */
  1329. X  extern char
  1330. !   *application_name;
  1331. X  /*
  1332. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1333. X  %                                                                             %
  1334. --- 93,99 ----
  1335. X    External declarations.
  1336. X  */
  1337. X  extern char
  1338. !   *client_name;
  1339. X  /*
  1340. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1341. X  %                                                                             %
  1342. ***************
  1343. *** 614,620 ****
  1344. X        (void) free((char *) colormap);
  1345. X      }
  1346. X    image_count=0;
  1347. !   while (1)
  1348. X    {
  1349. X      status=ReadData((char *) &c,1,1,image->file);
  1350. X      if (status == False)
  1351. --- 614,620 ----
  1352. X        (void) free((char *) colormap);
  1353. X      }
  1354. X    image_count=0;
  1355. !   for ( ; ; )
  1356. X    {
  1357. X      status=ReadData((char *) &c,1,1,image->file);
  1358. X      if (status == False)
  1359. ***************
  1360. *** 4732,4737 ****
  1361. --- 4732,4784 ----
  1362. X    return(True);
  1363. X  }
  1364. X  
  1365. + /*
  1366. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1367. + %                                                                             %
  1368. + %                                                                             %
  1369. + %                                                                             %
  1370. + %   W r i t e H I S T O G R A M I m a g e                                     %
  1371. + %                                                                             %
  1372. + %                                                                             %
  1373. + %                                                                             %
  1374. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1375. + %
  1376. + %  Function WriteHISTOGRAMImage writes an image to a file in HISTOGRAM format.
  1377. + %  A list of unique pixel values and the number of times each occurs in the
  1378. + %  image is written to the file.
  1379. + %
  1380. + %  The format of the WriteHISTOGRAMImage routine is:
  1381. + %
  1382. + %      status=WriteAVSImage(image)
  1383. + %
  1384. + %  A description of each parameter follows.
  1385. + %
  1386. + %    o status: Function WriteImage return True if the image is written.
  1387. + %      False is returned is there is a memory shortage or if the image file
  1388. + %      fails to write.
  1389. + %
  1390. + %    o image:  A pointer to a Image structure.
  1391. + %
  1392. + %
  1393. + */
  1394. + static unsigned int WriteHISTOGRAMImage(image)
  1395. + Image
  1396. +   *image;
  1397. + {
  1398. +   /*
  1399. +     Open output image file.
  1400. +   */
  1401. +   OpenImage(image,"w");
  1402. +   if (image->file == (FILE *) NULL)
  1403. +     {
  1404. +       Warning("unable to open file",image->filename);
  1405. +       return(False);
  1406. +     }
  1407. +   (void) NumberColors(image,image->file);
  1408. +   CloseImage(image);
  1409. +   return(True);
  1410. + }
  1411. X  #ifdef AlienJPEG
  1412. X  /*
  1413. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1414. ***************
  1415. *** 5117,5126 ****
  1416. X        */
  1417. X        format='5';
  1418. X        if (image->colors == 2)
  1419. !         {
  1420. !           format='4';
  1421. !           packets/=8;
  1422. !         }
  1423. X        for (i=0; i < image->colors; i++)
  1424. X          if ((image->colormap[i].red != image->colormap[i].green) ||
  1425. X              (image->colormap[i].green != image->colormap[i].blue))
  1426. --- 5164,5170 ----
  1427. X        */
  1428. X        format='5';
  1429. X        if (image->colors == 2)
  1430. !         format='4';
  1431. X        for (i=0; i < image->colors; i++)
  1432. X          if ((image->colormap[i].red != image->colormap[i].green) ||
  1433. X              (image->colormap[i].green != image->colormap[i].blue))
  1434. ***************
  1435. *** 5192,5197 ****
  1436. --- 5236,5242 ----
  1437. X          }
  1438. X          p++;
  1439. X        }
  1440. +       packets=q-pixels;
  1441. X        break;
  1442. X      }
  1443. X      case '5':
  1444. ***************
  1445. *** 5210,5229 ****
  1446. X      }
  1447. X      case '6':
  1448. X      {
  1449. X        /*
  1450. X          Convert image to a PNM image.
  1451. X        */
  1452. X        (void) fprintf(image->file,"%d\n",MaxRGB);
  1453. !       for (i=0; i < image->packets; i++)
  1454. !       {
  1455. !         for (j=0; j <= ((int) p->length); j++)
  1456. X          {
  1457. !           *q++=p->red;
  1458. !           *q++=p->green;
  1459. !           *q++=p->blue;
  1460. X          }
  1461. !         p++;
  1462. !       }
  1463. X        break;
  1464. X      }
  1465. X    }
  1466. --- 5255,5290 ----
  1467. X      }
  1468. X      case '6':
  1469. X      {
  1470. +       unsigned short int
  1471. +         index;
  1472. X        /*
  1473. X          Convert image to a PNM image.
  1474. X        */
  1475. X        (void) fprintf(image->file,"%d\n",MaxRGB);
  1476. !       if (image->class == DirectClass)
  1477. !         for (i=0; i < image->packets; i++)
  1478. X          {
  1479. !           for (j=0; j <= ((int) p->length); j++)
  1480. !           {
  1481. !             *q++=p->red;
  1482. !             *q++=p->green;
  1483. !             *q++=p->blue;
  1484. !           }
  1485. !           p++;
  1486. X          }
  1487. !       else
  1488. !         for (i=0; i < image->packets; i++)
  1489. !         {
  1490. !           for (j=0; j <= ((int) p->length); j++)
  1491. !           {
  1492. !             index=p->index;
  1493. !             *q++=image->colormap[index].red;
  1494. !             *q++=image->colormap[index].green;
  1495. !             *q++=image->colormap[index].blue;
  1496. !           }
  1497. !           p++;
  1498. !         }
  1499. X        break;
  1500. X      }
  1501. X    }
  1502. ***************
  1503. *** 6565,6570 ****
  1504. --- 6626,6637 ----
  1505. X            ReadGRAYImage(alien_info);
  1506. X        break;
  1507. X      }
  1508. +     case 'H':
  1509. +     {
  1510. +       Warning("Cannot read HISTOGRAM images",alien_info->filename);
  1511. +       image=ReadImage(alien_info->filename);
  1512. +       break;
  1513. +     }
  1514. X      case 'J':
  1515. X      {
  1516. X        image=ReadJPEGImage(alien_info);
  1517. ***************
  1518. *** 6776,6781 ****
  1519. --- 6843,6853 ----
  1520. X          status=WriteGIFImage(&alien_image);
  1521. X        else
  1522. X          status=WriteGRAYImage(&alien_image);
  1523. +       break;
  1524. +     }
  1525. +     case 'H':
  1526. +     {
  1527. +       status=WriteHISTOGRAMImage(&alien_image);
  1528. X        break;
  1529. X      }
  1530. X      case 'J':
  1531. diff -r -c ImageMagick/animate.c ImageMagick2.2.1/animate.c
  1532. *** ImageMagick/animate.c    Tue Dec  8 11:13:52 1992
  1533. --- ImageMagick2.2.1/animate.c    Fri Dec 18 17:07:27 1992
  1534. ***************
  1535. *** 139,145 ****
  1536. X    Global declarations.
  1537. X  */
  1538. X  char
  1539. !   *application_name;
  1540. X  
  1541. X  /*
  1542. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1543. --- 139,145 ----
  1544. X    Global declarations.
  1545. X  */
  1546. X  char
  1547. !   *client_name;
  1548. X  
  1549. X  /*
  1550. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1551. ***************
  1552. *** 224,230 ****
  1553. X    *message,
  1554. X    *qualifier;
  1555. X  {
  1556. !   (void) fprintf(stderr,"%s: %s",application_name,message);
  1557. X    if (qualifier != (char *) NULL)
  1558. X      (void) fprintf(stderr," (%s)",qualifier);
  1559. X    (void) fprintf(stderr,".\n");
  1560. --- 224,230 ----
  1561. X    *message,
  1562. X    *qualifier;
  1563. X  {
  1564. !   (void) fprintf(stderr,"%s: %s",client_name,message);
  1565. X    if (qualifier != (char *) NULL)
  1566. X      (void) fprintf(stderr," (%s)",qualifier);
  1567. X    (void) fprintf(stderr,".\n");
  1568. ***************
  1569. *** 306,313 ****
  1570. X        (char *) NULL
  1571. X      };
  1572. X    (void) fprintf(stderr,
  1573. !     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",
  1574. !     application_name);
  1575. X    (void) fprintf(stderr,"\nWhere options include: \n");
  1576. X    for (p=options; *p != (char *) NULL; p++)
  1577. X      (void) fprintf(stderr,"  %s\n",*p);
  1578. --- 306,312 ----
  1579. X        (char *) NULL
  1580. X      };
  1581. X    (void) fprintf(stderr,
  1582. !     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",client_name);
  1583. X    (void) fprintf(stderr,"\nWhere options include: \n");
  1584. X    for (p=options; *p != (char *) NULL; p++)
  1585. X      (void) fprintf(stderr,"  %s\n",*p);
  1586. ***************
  1587. *** 619,629 ****
  1588. X      *manager_hints;
  1589. X  
  1590. X    /*
  1591. -     Sort images by increasing scene number.
  1592. -   */
  1593. -   (void) qsort((void *) images,(int) number_scenes,sizeof(Image *),
  1594. -     LinearCompare);
  1595. -   /*
  1596. X      Allocate standard colormap.
  1597. X    */
  1598. X    if (resource_info->debug)
  1599. --- 618,623 ----
  1600. ***************
  1601. *** 689,694 ****
  1602. --- 683,697 ----
  1603. X    magick_windows[number_windows++]=(&window->popup);
  1604. X    for (i=0; i < number_windows; i++)
  1605. X      magick_windows[i]->id=(Window) NULL;
  1606. +   /*
  1607. +     Sort images by increasing scene number.
  1608. +   */
  1609. +   i=0;
  1610. +   for (scene=0; scene < number_scenes; scene++)
  1611. +     i+=images[scene]->scene;
  1612. +   if (i > 0)
  1613. +     (void) qsort((void *) images,(int) number_scenes,sizeof(Image *),
  1614. +       LinearCompare);
  1615. X    if (resource_info->map_type == (char *) NULL)
  1616. X      if ((visual_info->class != TrueColor) &&
  1617. X          (visual_info->class != DirectColor))
  1618. ***************
  1619. *** 770,776 ****
  1620. X      Initialize class and manager hints.
  1621. X    */
  1622. X    if (resource_info->name == (char *) NULL)
  1623. !     class_hint->res_name=application_name;
  1624. X    else
  1625. X      class_hint->res_name=resource_info->name;
  1626. X    class_hint->res_class=(char *) "ImageMagick";
  1627. --- 773,779 ----
  1628. X      Initialize class and manager hints.
  1629. X    */
  1630. X    if (resource_info->name == (char *) NULL)
  1631. !     class_hint->res_name=client_name;
  1632. X    else
  1633. X      class_hint->res_name=resource_info->name;
  1634. X    class_hint->res_class=(char *) "ImageMagick";
  1635. ***************
  1636. *** 1488,1494 ****
  1637. X    /*
  1638. X      Display usage profile if there are no command line arguments.
  1639. X    */
  1640. !   application_name=(*argv);
  1641. X    if (argc < 2)
  1642. X      Usage(True);
  1643. X    /*
  1644. --- 1491,1497 ----
  1645. X    /*
  1646. X      Display usage profile if there are no command line arguments.
  1647. X    */
  1648. !   client_name=(*argv);
  1649. X    if (argc < 2)
  1650. X      Usage(True);
  1651. X    /*
  1652. ***************
  1653. *** 1555,1576 ****
  1654. X    /*
  1655. X      Get user defaults from X resource database.
  1656. X    */
  1657. !   XGetResourceInfo(resource_database,application_name,&resource_info);
  1658. !   clip_geometry=XGetResource(resource_database,application_name,"clipGeometry",
  1659. !     "ClipGeometry",(char *) NULL);
  1660. !   resource_value=XGetResource(resource_database,application_name,"gamma",
  1661. !     (char *) NULL,"0.0");
  1662. X    gamma=atof(resource_value);
  1663. !   resource_value=XGetResource(resource_database,application_name,"reflect",
  1664. !     (char *) NULL,"False");
  1665. X    reflect=IsTrue(resource_value);
  1666. !   resource_value=XGetResource(resource_database,application_name,"rotate",
  1667. !     (char *) NULL,"0");
  1668. X    degrees=atoi(resource_value);
  1669. !   scale_geometry=XGetResource(resource_database,application_name,
  1670. !     "scaleGeometry","ScaleGeometry",(char *) NULL);
  1671. !   resource_value=XGetResource(resource_database,application_name,"verbose",
  1672. !     (char *) NULL,"False");
  1673. X    verbose=IsTrue(resource_value);
  1674. X    /*
  1675. X      Parse command line.
  1676. --- 1558,1575 ----
  1677. X    /*
  1678. X      Get user defaults from X resource database.
  1679. X    */
  1680. !   XGetResourceInfo(resource_database,client_name,&resource_info);
  1681. !   clip_geometry=
  1682. !     XGetResource(resource_database,client_name,"clipGeometry",(char *) NULL);
  1683. !   resource_value=XGetResource(resource_database,client_name,"gamma","0.0");
  1684. X    gamma=atof(resource_value);
  1685. !   resource_value=XGetResource(resource_database,client_name,"reflect","False");
  1686. X    reflect=IsTrue(resource_value);
  1687. !   resource_value=XGetResource(resource_database,client_name,"rotate","0");
  1688. X    degrees=atoi(resource_value);
  1689. !   scale_geometry=
  1690. !     XGetResource(resource_database,client_name,"scaleGeometry",(char *) NULL);
  1691. !   resource_value=XGetResource(resource_database,client_name,"verbose","False");
  1692. X    verbose=IsTrue(resource_value);
  1693. X    /*
  1694. X      Parse command line.
  1695. ***************
  1696. *** 2036,2042 ****
  1697. X                  Initialize image error attributes.
  1698. X                */
  1699. X                if (image->class == DirectClass)
  1700. !                 image->colors=NumberColors(image);
  1701. X                total_colors=image->colors;
  1702. X              }
  1703. X            if (resource_info.colorspace == GRAYColorspace)
  1704. --- 2035,2041 ----
  1705. X                  Initialize image error attributes.
  1706. X                */
  1707. X                if (image->class == DirectClass)
  1708. !                 image->colors=NumberColors(image,(FILE *) NULL);
  1709. X                total_colors=image->colors;
  1710. X              }
  1711. X            if (resource_info.colorspace == GRAYColorspace)
  1712. diff -r -c ImageMagick/animate.man ImageMagick2.2.1/animate.man
  1713. *** ImageMagick/animate.man    Mon Dec  7 19:52:59 1992
  1714. --- ImageMagick2.2.1/animate.man    Fri Dec 18 17:07:31 1992
  1715. ***************
  1716. *** 185,190 ****
  1717. --- 185,193 ----
  1718. X  .TP 5
  1719. X  .B "-rotate \fIdegrees\fP"
  1720. X  apply Paeth image rotation to the image.
  1721. + Empty triangles left over from rotating the image are filled with
  1722. + the color defined by the pixel at location (0,0).
  1723. X  .TP 5
  1724. X  .B "-scale \fI<width factor>x<height factor>\fP"
  1725. X  preferred size factors of the image.
  1726. ***************
  1727. *** 195,202 ****
  1728. X  one factor is specified, both the width and height factors assume the
  1729. X  value.
  1730. X  
  1731. ! Factors may be fractional.  For example, a factor of 1.5 will increase the
  1732. ! image size by one and one-half.
  1733. X  
  1734. X  The equivalent X resource for this option is \fBscaleGeometry\fP
  1735. X  (class \fBScaleGeometry\fP).  See \fBX RESOURCES\fP for details.
  1736. --- 198,206 ----
  1737. X  one factor is specified, both the width and height factors assume the
  1738. X  value.
  1739. X  
  1740. ! Factors may be fractional.  To increase the size of an image, use a
  1741. ! scale factor greater than 1.0.  To decrease an image's size, use a
  1742. ! scale factor less than 1.0.  Default is 1.0.
  1743. X  
  1744. X  The equivalent X resource for this option is \fBscaleGeometry\fP
  1745. X  (class \fBScaleGeometry\fP).  See \fBX RESOURCES\fP for details.
  1746. diff -r -c ImageMagick/colors.c ImageMagick2.2.1/colors.c
  1747. *** ImageMagick/colors.c    Mon Dec  7 09:14:54 1992
  1748. --- ImageMagick2.2.1/colors.c    Fri Dec 18 17:07:27 1992
  1749. ***************
  1750. *** 66,74 ****
  1751. --- 66,78 ----
  1752. X      *child[8];
  1753. X  
  1754. X    unsigned char
  1755. +     level,
  1756. X      mid_red,
  1757. X      mid_green,
  1758. X      mid_blue;
  1759. +   unsigned long int
  1760. +     number_colors;
  1761. X  } Node;
  1762. X  
  1763. X  typedef struct _Nodes
  1764. ***************
  1765. *** 83,90 ****
  1766. X  typedef struct _Cube
  1767. X  {
  1768. X    Node
  1769. !     *root,
  1770. !     *leaf;
  1771. X  
  1772. X    unsigned int
  1773. X      colors;
  1774. --- 87,93 ----
  1775. X  typedef struct _Cube
  1776. X  {
  1777. X    Node
  1778. !     *root;
  1779. X  
  1780. X    unsigned int
  1781. X      colors;
  1782. ***************
  1783. *** 109,115 ****
  1784. X    External declarations.
  1785. X  */
  1786. X  extern char
  1787. !   *application_name;
  1788. X  
  1789. X  /*
  1790. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1791. --- 112,118 ----
  1792. X    External declarations.
  1793. X  */
  1794. X  extern char
  1795. !   *client_name;
  1796. X  
  1797. X  /*
  1798. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1799. ***************
  1800. *** 116,121 ****
  1801. --- 119,170 ----
  1802. X  %                                                                             %
  1803. X  %                                                                             %
  1804. X  %                                                                             %
  1805. + %  H i s t o g r a m                                                          %
  1806. + %                                                                             %
  1807. + %                                                                             %
  1808. + %                                                                             %
  1809. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1810. + %
  1811. + %  Procedure Histogram traverses the color cube tree and produces a list of
  1812. + %  unique pixel field values and the number of times each occurs in the image.
  1813. + %
  1814. + %  The format of the Histogram routine is:
  1815. + %
  1816. + %      Histogram(node,file)
  1817. + %
  1818. + %  A description of each parameter follows.
  1819. + %
  1820. + %    o node: The address of a structure of type Node which points to a
  1821. + %      node in the color cube tree that is to be pruned.
  1822. + %
  1823. + %
  1824. + */
  1825. + static void Histogram(node,file)
  1826. + register Node
  1827. +   *node;
  1828. + FILE
  1829. +   *file;
  1830. + {
  1831. +   register unsigned int
  1832. +     id;
  1833. +   /*
  1834. +     Traverse any children.
  1835. +   */
  1836. +   for (id=0; id < 8; id++)
  1837. +     if (node->child[id] != (Node *) NULL)
  1838. +       Histogram(node->child[id],file);
  1839. +   if (node->level == MaxTreeDepth)
  1840. +     (void) fprintf(file,"%8d\t%d\t%d\t%d\n",node->number_colors,
  1841. +       node->mid_red,node->mid_green,node->mid_blue);
  1842. + }
  1843. + /*
  1844. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1845. + %                                                                             %
  1846. + %                                                                             %
  1847. + %                                                                             %
  1848. X  %  I n i t i a l i z e N o d e                                                %
  1849. X  %                                                                             %
  1850. X  %                                                                             %
  1851. ***************
  1852. *** 127,136 ****
  1853. X  %
  1854. X  %  The format of the InitializeNode routine is:
  1855. X  %
  1856. ! %      node=InitializeNode(mid_red,mid_green,mid_blue)
  1857. X  %
  1858. X  %  A description of each parameter follows.
  1859. X  %
  1860. X  %    o mid_red: Specifies the mid point of the red axis for this node.
  1861. X  %
  1862. X  %    o mid_green: Specifies the mid point of the green axis for this node.
  1863. --- 176,187 ----
  1864. X  %
  1865. X  %  The format of the InitializeNode routine is:
  1866. X  %
  1867. ! %      node=InitializeNode(level,mid_red,mid_green,mid_blue)
  1868. X  %
  1869. X  %  A description of each parameter follows.
  1870. X  %
  1871. + %    o level: Specifies the level in the classification the node resides.
  1872. + %
  1873. X  %    o mid_red: Specifies the mid point of the red axis for this node.
  1874. X  %
  1875. X  %    o mid_green: Specifies the mid point of the green axis for this node.
  1876. ***************
  1877. *** 139,146 ****
  1878. X  %
  1879. X  %
  1880. X  */
  1881. ! static Node *InitializeNode(mid_red,mid_green,mid_blue)
  1882. ! register unsigned char
  1883. X    mid_red,
  1884. X    mid_green,
  1885. X    mid_blue;
  1886. --- 190,198 ----
  1887. X  %
  1888. X  %
  1889. X  */
  1890. ! static Node *InitializeNode(level,mid_red,mid_green,mid_blue)
  1891. ! unsigned int
  1892. !   level,
  1893. X    mid_red,
  1894. X    mid_green,
  1895. X    mid_blue;
  1896. ***************
  1897. *** 171,179 ****
  1898. --- 223,233 ----
  1899. X    node=cube.node++;
  1900. X    for (i=0; i < 8; i++)
  1901. X      node->child[i]=(Node *) NULL;
  1902. +   node->level=level;
  1903. X    node->mid_red=mid_red;
  1904. X    node->mid_green=mid_green;
  1905. X    node->mid_blue=mid_blue;
  1906. +   node->number_colors=0;
  1907. X    return(node);
  1908. X  }
  1909. X  
  1910. ***************
  1911. *** 192,198 ****
  1912. X  %
  1913. X  %  The format of the NumberColors routine is:
  1914. X  %
  1915. ! %      number_colors=NumberColors(image)
  1916. X  %
  1917. X  %  A description of each parameter follows.
  1918. X  %
  1919. --- 246,252 ----
  1920. X  %
  1921. X  %  The format of the NumberColors routine is:
  1922. X  %
  1923. ! %      number_colors=NumberColors(image,file)
  1924. X  %
  1925. X  %  A description of each parameter follows.
  1926. X  %
  1927. ***************
  1928. *** 201,211 ****
  1929. X  %      run-length counts in the source image must be equal to or exceed
  1930. X  %      the number of pixels.
  1931. X  %
  1932. X  %
  1933. X  */
  1934. ! unsigned int NumberColors(image)
  1935. X  Image
  1936. X    *image;
  1937. X  {
  1938. X    Nodes
  1939. X      *nodes;
  1940. --- 255,273 ----
  1941. X  %      run-length counts in the source image must be equal to or exceed
  1942. X  %      the number of pixels.
  1943. X  %
  1944. + %    o file:  An pointer to a FILE.  If it is non-null a list of unique pixel
  1945. + %      field values and the number of times each occurs in the image is 
  1946. + %      written to the file.
  1947. + %      
  1948. X  %
  1949. + %
  1950. X  */
  1951. ! unsigned int NumberColors(image,file)
  1952. X  Image
  1953. X    *image;
  1954. + FILE
  1955. +   *file;
  1956. X  {
  1957. X    Nodes
  1958. X      *nodes;
  1959. ***************
  1960. *** 219,231 ****
  1961. X    register Node
  1962. X      *node;
  1963. X  
  1964. -   register unsigned char
  1965. -     bisect,
  1966. -     id;
  1967. X    register unsigned int
  1968. X      level;
  1969. X  
  1970. X    /*
  1971. X      Initialize color description tree.
  1972. X    */
  1973. --- 281,294 ----
  1974. X    register Node
  1975. X      *node;
  1976. X  
  1977. X    register unsigned int
  1978. +     count,
  1979. +     id,
  1980. X      level;
  1981. X  
  1982. +   unsigned int
  1983. +     bisect;
  1984. X    /*
  1985. X      Initialize color description tree.
  1986. X    */
  1987. ***************
  1988. *** 232,240 ****
  1989. X    cube.node_list=(Nodes *) NULL;
  1990. X    cube.colors=0;
  1991. X    cube.free_nodes=0;
  1992. !   cube.root=InitializeNode(MaxRGB >> 1,MaxRGB >> 1,MaxRGB >> 1);
  1993. !   cube.leaf=InitializeNode(0,0,0);
  1994. !   if ((cube.root == (Node *) NULL) || (cube.leaf == (Node *) NULL))
  1995. X      {
  1996. X        Warning("unable to count colors","memory allocation failed");
  1997. X        return(0);
  1998. --- 295,302 ----
  1999. X    cube.node_list=(Nodes *) NULL;
  2000. X    cube.colors=0;
  2001. X    cube.free_nodes=0;
  2002. !   cube.root=InitializeNode(0,(MaxRGB+1) >> 1,(MaxRGB+1) >> 1,(MaxRGB+1) >> 1);
  2003. !   if (cube.root == (Node *) NULL)
  2004. X      {
  2005. X        Warning("unable to count colors","memory allocation failed");
  2006. X        return(0);
  2007. ***************
  2008. *** 245,252 ****
  2009. X      /*
  2010. X        Start at the root and proceed level by level.
  2011. X      */
  2012. X      node=cube.root;
  2013. !     for (level=1; level < MaxTreeDepth; level++)
  2014. X      {
  2015. X        id=(p->red >= node->mid_red ? 1 : 0) |
  2016. X          (p->green >= node->mid_green ? 1 : 0) << 1 |
  2017. --- 307,315 ----
  2018. X      /*
  2019. X        Start at the root and proceed level by level.
  2020. X      */
  2021. +     count=p->length+1;
  2022. X      node=cube.root;
  2023. !     for (level=1; level <= MaxTreeDepth; level++)
  2024. X      {
  2025. X        id=(p->red >= node->mid_red ? 1 : 0) |
  2026. X          (p->green >= node->mid_green ? 1 : 0) << 1 |
  2027. ***************
  2028. *** 253,263 ****
  2029. X          (p->blue >= node->mid_blue ? 1 : 0) << 2;
  2030. X        if (node->child[id] == (Node *) NULL)
  2031. X          {
  2032. !           bisect=(unsigned int) (1 << (MaxTreeDepth-level)) >> 1;
  2033. !           node->child[id]=InitializeNode(
  2034. !             node->mid_red+(id & 1 ? bisect : -bisect),
  2035. !             node->mid_green+(id & 2 ? bisect : -bisect),
  2036. !             node->mid_blue+(id & 4 ? bisect : -bisect));
  2037. X            if (node->child[id] == (Node *) NULL)
  2038. X              {
  2039. X                Warning("unable to count colors","memory allocation failed");
  2040. --- 316,334 ----
  2041. X          (p->blue >= node->mid_blue ? 1 : 0) << 2;
  2042. X        if (node->child[id] == (Node *) NULL)
  2043. X          {
  2044. !           if (level == MaxTreeDepth)
  2045. !             {
  2046. !               node->child[id]=InitializeNode(level,p->red,p->green,p->blue);
  2047. !               cube.colors++;
  2048. !             }
  2049. !           else
  2050. !             {
  2051. !               bisect=(unsigned int) (1 << (MaxTreeDepth-level)) >> 1;
  2052. !               node->child[id]=InitializeNode(level,
  2053. !                 node->mid_red+(id & 1 ? bisect : -bisect),
  2054. !                 node->mid_green+(id & 2 ? bisect : -bisect),
  2055. !                 node->mid_blue+(id & 4 ? bisect : -bisect));
  2056. !             }
  2057. X            if (node->child[id] == (Node *) NULL)
  2058. X              {
  2059. X                Warning("unable to count colors","memory allocation failed");
  2060. ***************
  2061. *** 266,281 ****
  2062. X          }
  2063. X        node=node->child[id];
  2064. X      }
  2065. !     id=(p->red >= node->mid_red ? 1 : 0) |
  2066. !       (p->green >= node->mid_green ? 1 : 0) << 1 |
  2067. !       (p->blue >= node->mid_blue ? 1 : 0) << 2;
  2068. !     if (node->child[id] == (Node *) NULL)
  2069. !       {
  2070. !         node->child[id]=cube.leaf;
  2071. !         cube.colors++;
  2072. !       }
  2073. X      p++;
  2074. X    }
  2075. X    /*
  2076. X      Release color cube tree storage.
  2077. X    */
  2078. --- 337,347 ----
  2079. X          }
  2080. X        node=node->child[id];
  2081. X      }
  2082. !     node->number_colors+=count;
  2083. X      p++;
  2084. X    }
  2085. +   if (file != (FILE *) NULL)
  2086. +     Histogram(cube.root,file);
  2087. X    /*
  2088. X      Release color cube tree storage.
  2089. X    */
  2090. diff -r -c ImageMagick/compress.c ImageMagick2.2.1/compress.c
  2091. *** ImageMagick/compress.c    Mon Dec  7 09:15:08 1992
  2092. --- ImageMagick2.2.1/compress.c    Fri Dec 18 17:07:27 1992
  2093. ***************
  2094. *** 159,165 ****
  2095. X    External declarations.
  2096. X  */
  2097. X  extern char
  2098. !   *application_name;
  2099. X  
  2100. X  /*
  2101. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2102. --- 159,165 ----
  2103. X    External declarations.
  2104. X  */
  2105. X  extern char
  2106. !   *client_name;
  2107. X  
  2108. X  /*
  2109. X  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2110. ***************
  2111. *** 1091,1097 ****
  2112. X            else
  2113. X              displacement=MaxHashTable-k;
  2114. X            next_pixel=False;
  2115. !           while (1)
  2116. X            {
  2117. X              k-=displacement;
  2118. X              if (k < 0)
  2119. --- 1091,1097 ----
  2120. X            else
  2121. X              displacement=MaxHashTable-k;
  2122. X            next_pixel=False;
  2123. !           for ( ; ; )
  2124. X            {
  2125. X              k-=displacement;
  2126. X              if (k < 0)
  2127. diff -r -c ImageMagick/display.c ImageMagick2.2.1/display.c
  2128. *** ImageMagick/display.c    Tue Dec  8 11:13:21 1992
  2129. --- ImageMagick2.2.1/display.c    Mon Dec 21 14:12:34 1992
  2130. ***************
  2131. *** 160,166 ****
  2132. X    Global declarations.
  2133. X  */
  2134. X  char
  2135. !   *application_name;
  2136. X  
  2137. X  /*
  2138. X    Forward declarations.
  2139. --- 160,166 ----
  2140. X    Global declarations.
  2141. X  */
  2142. X  char
  2143. !   *client_name;
  2144. X  
  2145. X  /*
  2146. X    Forward declarations.
  2147. ***************
  2148. *** 218,224 ****
  2149. X    *message,
  2150. X    *qualifier;
  2151. X  {
  2152. !   (void) fprintf(stderr,"%s: %s",application_name,message);
  2153. X    if (qualifier != (char *) NULL)
  2154. X      (void) fprintf(stderr," (%s)",qualifier);
  2155. X    (void) fprintf(stderr,".\n");
  2156. --- 218,224 ----
  2157. X    *message,
  2158. X    *qualifier;
  2159. X  {
  2160. !   (void) fprintf(stderr,"%s: %s",client_name,message);
  2161. X    if (qualifier != (char *) NULL)
  2162. X      (void) fprintf(stderr," (%s)",qualifier);
  2163. X    (void) fprintf(stderr,".\n");
  2164. ***************
  2165. *** 315,322 ****
  2166. X        (char *) NULL
  2167. X      };
  2168. X    (void) fprintf(stderr,
  2169. !     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",
  2170. !     application_name);
  2171. X    (void) fprintf(stderr,"\nWhere options include: \n");
  2172. X    for (p=options; *p != (char *) NULL; p++)
  2173. X      (void) fprintf(stderr,"  %s\n",*p);
  2174. --- 315,321 ----
  2175. X        (char *) NULL
  2176. X      };
  2177. X    (void) fprintf(stderr,
  2178. !     "Usage: %s [-options ...] file [ [-options ...] file ...]\n",client_name);
  2179. X    (void) fprintf(stderr,"\nWhere options include: \n");
  2180. X    for (p=options; *p != (char *) NULL; p++)
  2181. X      (void) fprintf(stderr,"  %s\n",*p);
  2182. ***************
  2183. *** 2609,2615 ****
  2184. X      Initialize class and manager hints.
  2185. X    */
  2186. X    if (resource_info->name == (char *) NULL)
  2187. !     class_hint->res_name=application_name;
  2188. X    else
  2189. X      class_hint->res_name=resource_info->name;
  2190. X    class_hint->res_class=(char *) "ImageMagick";
  2191. --- 2608,2614 ----
  2192. X      Initialize class and manager hints.
  2193. X    */
  2194. X    if (resource_info->name == (char *) NULL)
  2195. !     class_hint->res_name=client_name;
  2196. X    else
  2197. X      class_hint->res_name=resource_info->name;
  2198. X    class_hint->res_class=(char *) "ImageMagick";
  2199. ***************
  2200. *** 3203,3208 ****
  2201. --- 3202,3215 ----
  2202. X        }
  2203. X        case KeyPress:
  2204. X        {
  2205. +         if (*state & ReconfigureImageState)
  2206. +           {
  2207. +             /*
  2208. +               No key press during image reconfiguration.
  2209. +             */
  2210. +             XBell(display,0);
  2211. +             break;
  2212. +           }
  2213. X          /*
  2214. X            Respond to a user key press.
  2215. X          */
  2216. ***************
  2217. *** 3415,3420 ****
  2218. --- 3422,3428 ----
  2219. X        /*
  2220. X          Update panning icon configuration.
  2221. X        */
  2222. +       window->pan.clip_geometry=window->image.clip_geometry;
  2223. X        XBestIconSize(display,&window->pan,displayed_image);
  2224. X        window_changes.width=window->pan.width;
  2225. X        window_changes.height=window->pan.height;
  2226. ***************
  2227. *** 3435,3440 ****
  2228. --- 3443,3449 ----
  2229. X        /*
  2230. X          Update icon configuration.
  2231. X        */
  2232. +       window->icon.clip_geometry=window->image.clip_geometry;
  2233. X        XBestIconSize(display,&window->icon,displayed_image);
  2234. X        window_changes.width=window->icon.width;
  2235. X        window_changes.height=window->icon.height;
  2236. ***************
  2237. *** 4913,4919 ****
  2238. X    /*
  2239. X      Display usage profile if there are no command line arguments.
  2240. X    */
  2241. !   application_name=(*argv);
  2242. X    if (argc < 2)
  2243. X      Usage(True);
  2244. X    /*
  2245. --- 4922,4928 ----
  2246. X    /*
  2247. X      Display usage profile if there are no command line arguments.
  2248. X    */
  2249. !   client_name=(*argv);
  2250. X    if (argc < 2)
  2251. X      Usage(True);
  2252. X    /*
  2253. ***************
  2254. *** 4967,4973 ****
  2255. X      Initialize resource database.
  2256. X    */
  2257. X    XrmInitialize();
  2258. !   XGetDefault(display,application_name,"dummy");
  2259. X    resource_database=XrmGetDatabase(display);
  2260. X    resource_value=XResourceManagerString(display);
  2261. X    if (resource_value == (char *) NULL)
  2262. --- 4976,4982 ----
  2263. X      Initialize resource database.
  2264. X    */
  2265. X    XrmInitialize();
  2266. !   XGetDefault(display,client_name,"dummy");
  2267. X    resource_database=XrmGetDatabase(display);
  2268. X    resource_value=XResourceManagerString(display);
  2269. X    if (resource_value == (char *) NULL)
  2270. ***************
  2271. *** 4977,5022 ****
  2272. X    /*
  2273. X      Get user defaults from X resource database.
  2274. X    */
  2275. !   XGetResourceInfo(resource_database,application_name,&resource_info);
  2276. !   clip_geometry=XGetResource(resource_database,application_name,"clipGeometry",
  2277. !     "ClipGeometry",(char *) NULL);
  2278. !   resource_value=XGetResource(resource_database,application_name,"compression",
  2279. !     (char *) NULL,"RunlengthEncoded");
  2280. X    if (Latin1Compare("qencoded",resource_value) == 0)
  2281. X      compression=QEncodedCompression;
  2282. X    else
  2283. X      compression=RunlengthEncodedCompression;
  2284. !   resource_value=XGetResource(resource_database,application_name,"enhance",
  2285. !     (char *) NULL,"False");
  2286. X    enhance=IsTrue(resource_value);
  2287. !   resource_value=XGetResource(resource_database,application_name,"gamma",
  2288. !     (char *) NULL,"0.0");
  2289. X    gamma=atof(resource_value);
  2290. !   resource_value=XGetResource(resource_database,application_name,"inverse",
  2291. !     (char *) NULL,"False");
  2292. X    inverse=IsTrue(resource_value);
  2293. !   resource_value=XGetResource(resource_database,application_name,"noise",
  2294. !     (char *) NULL,"False");
  2295. X    noise=IsTrue(resource_value);
  2296. !   resource_value=XGetResource(resource_database,application_name,"normalize",
  2297. !     (char *) NULL,"False");
  2298. X    normalize=IsTrue(resource_value);
  2299. !   resource_value=XGetResource(resource_database,application_name,"reflect",
  2300. !     (char *) NULL,"False");
  2301. X    reflect=IsTrue(resource_value);
  2302. !   resource_value=XGetResource(resource_database,application_name,"rotate",
  2303. !     (char *) NULL,"0");
  2304. X    degrees=atoi(resource_value);
  2305. !   scale_geometry=XGetResource(resource_database,application_name,
  2306. !     "scaleGeometry","ScaleGeometry",(char *) NULL);
  2307. !   resource_value=XGetResource(resource_database,application_name,"scene",
  2308. !     (char *) NULL,"0");
  2309. X    scene=atoi(resource_value);
  2310. !   resource_value=XGetResource(resource_database,application_name,"verbose",
  2311. !     (char *) NULL,"False");
  2312. X    verbose=IsTrue(resource_value);
  2313. !   window_id=XGetResource(resource_database,application_name,"windowId",
  2314. !     "WindowId",(char *) NULL);
  2315. X    /*
  2316. X      Parse command line.
  2317. X    */
  2318. --- 4986,5023 ----
  2319. X    /*
  2320. X      Get user defaults from X resource database.
  2321. X    */
  2322. !   XGetResourceInfo(resource_database,client_name,&resource_info);
  2323. !   clip_geometry=
  2324. !     XGetResource(resource_database,client_name,"clipGeometry",(char *) NULL);
  2325. !   resource_value=XGetResource(resource_database,client_name,"compression",
  2326. !     "RunlengthEncoded");
  2327. X    if (Latin1Compare("qencoded",resource_value) == 0)
  2328. X      compression=QEncodedCompression;
  2329. X    else
  2330. X      compression=RunlengthEncodedCompression;
  2331. !   resource_value=XGetResource(resource_database,client_name,"enhance","False");
  2332. X    enhance=IsTrue(resource_value);
  2333. !   resource_value=XGetResource(resource_database,client_name,"gamma","0.0");
  2334. X    gamma=atof(resource_value);
  2335. !   resource_value=XGetResource(resource_database,client_name,"inverse","False");
  2336. X    inverse=IsTrue(resource_value);
  2337. !   resource_value=XGetResource(resource_database,client_name,"noise","False");
  2338. X    noise=IsTrue(resource_value);
  2339. !   resource_value=
  2340. !     XGetResource(resource_database,client_name,"normalize","False");
  2341. X    normalize=IsTrue(resource_value);
  2342. !   resource_value=XGetResource(resource_database,client_name,"reflect","False");
  2343. X    reflect=IsTrue(resource_value);
  2344. !   resource_value=XGetResource(resource_database,client_name,"rotate","0");
  2345. X    degrees=atoi(resource_value);
  2346. !   scale_geometry=
  2347. !     XGetResource(resource_database,client_name,"scaleGeometry",(char *) NULL);
  2348. SHAR_EOF
  2349. true || echo 'restore of fix-01 failed'
  2350. fi
  2351. echo 'End of ImageMagick/patch01 part 1'
  2352. echo 'File fix-01 is continued in part 2'
  2353. echo 2 > _shar_seq_.tmp
  2354. exit 0
  2355. -- 
  2356. cristy@dupont.com
  2357.