home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / arexx / scripti.lha / 3-DEE / Scripti / General / ImageInfo.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-05-19  |  2.4 KB  |  93 lines

  1. /*
  2. -----------------------------------------------------------------------------
  3. This AREXX-Script will give as much information as it can about an image.
  4.  
  5. Host address: ADPro (Art Department Professional   ®ASDG)
  6. Written by Jan Van Overbeke, 3-DEE, ©1993.
  7. Read the AREXX-Scripti doc, for info about operation and rights!
  8. -----------------------------------------------------------------------------
  9. */
  10.  
  11. arg filename
  12. if ~exists(filename)|filename='' then do
  13.     say 'Unable to find the image!!!'
  14.     say 'See Ya......'
  15.     say ''
  16.     exit
  17.     end
  18.  
  19. address 'ADPro'
  20. options results
  21. say 'ImageInfo: Written by JAN VAN OVERBEKE, 3-DEE, ©1993'
  22. say 'Image: 'filename
  23. say ''
  24.  
  25. LFORMAT 'UNIVERSAL'
  26. if RC~=0 then do
  27.     say 'Unable to select the UNIVERSAL loader.'
  28.     say 'See Ya.......'
  29.     say ''
  30.     exit
  31.     end
  32.  
  33. load filename
  34. if RC~=0 then do
  35.     say 'Load failed!!!!!!'
  36.     say 'See Ya......'
  37.     say ''
  38.     exit
  39.     end
  40.  
  41. /* ---- Info about size ---- */
  42. /* ------------------------- */
  43. XSIZE
  44. w=ADPRO_RESULT
  45. YSIZE
  46. h=ADPRO_RESULT
  47. /* ---- Info about colors ---- */
  48. /* --------------------------- */
  49. RENDER_TYPE
  50. c=ADPRO_RESULT
  51. /* ---- Info about image status ---- */
  52. /* --------------------------------- */
  53. IMAGE
  54. help=ADPRO_RESULT
  55. m=word(help,1)
  56. if pos('RENDERED',help)>0|pos('BITPLANE',help)>0 then r='RENDERED'
  57.                            else r='NOT RENDERED'
  58.  
  59. /* ---- What kind of screenmode have we got here? ---- */
  60. /* ---- If the image is 24Bit, there's no screen! ---- */
  61. /* --------------------------------------------------- */
  62. if r='RENDERED' then do
  63.     screen_type
  64.     screenmode=ADPRO_RESULT
  65.     if screenmode=6 then screenmode='Lores, Interlaced'
  66.     if screenmode=4 then screenmode='Lores, Not Interlaced'
  67.     if screenmode=7 then screenmode='Hires, Interlaced'
  68.     if screenmode=5 then screenmode='Hires, Not Interlaced'
  69.     if screenmode=35 then screenmode='Productivity, Hires, Interlaced (->VGA)'
  70.     if screenmode=33 then
  71.         screenmode='Productivity, Hires, Not Interlaced (->VGA)'
  72.     if screenmode=70 then screenmode='Super-Hires, Interlaced'
  73.     if screenmode=68 then screenmode='Super-Hires, Not Interlaced'
  74.     if datatype(screenmode)='NUM' then screenmode='Code '||screenmode||' (?)'
  75.     end
  76.     else screenmode='No Screen!'
  77.  
  78.  
  79. /* ---- Writing down results ---- */
  80. /* ------------------------------ */
  81. say 'ImageInfo:'
  82. say '    Size  : 'w'x'h
  83. if r~='RENDERED' then say '    Colors: 24Bit'
  84.         else say '    Colors: 'c
  85. say ' ColorMode: 'm
  86. say '     Image: 'r
  87. say '    Screen: 'screenmode
  88. say ''
  89.  
  90. say 'Press [return] to end program.'
  91. pull endd
  92. exit
  93.