home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / grafica / redfix / rexx / autofx / scale_newicon.ifx < prev   
Text File  |  1999-09-05  |  791b  |  35 lines

  1. /*
  2.  * $VER: Scale_NewIcon.ifx (AutoFX Arexx script) 1.0 (06.09.99) ® 1999 by Przemyslaw 'SENSEI' Gruchala
  3.  *
  4.  * Based on the Scale_Absolute.ifx written by Thomas Krehbiel
  5.  *
  6.  * Scale to best NewIcon size.
  7.  *
  8.  * Inputs:
  9.  *    Word(Arg(1),1) = Frame number (1 - N)
  10.  *    Word(Arg(1),2) = Main filename ("-" if not specified)
  11.  *    Word(Arg(1),3) = Swap filename ("-" if not specified)
  12.  *    Word(Arg(1),4) = Sequence number
  13.  *    Word(Arg(1),5) = Total number of frames (N)
  14.  *
  15.  * Returns:
  16.  *    0 if successful, non-zero on failure
  17.  *
  18.  */
  19.  
  20. OPTIONS RESULTS
  21.  
  22. GetMain
  23. IF result="" THEN EXIT
  24. PARSE VAR result . width height .
  25. IF width >= 94 & height >= 94 THEN DO
  26.     IF width >= height THEN DO
  27.         Scale 93 ( height % (width/93) )
  28.         END
  29.     ELSE DO
  30.         Scale ( width % (height/93) ) 93
  31.         END
  32.     END
  33.  
  34. EXIT rc
  35.