home *** CD-ROM | disk | FTP | other *** search
/ Spanish Scene 4 / SpanishScene4.iso / Programas / EsteveBoix_Ind / tablePlugv12.lha / tablePlug12 / rx / gfxcon_dt.tpx < prev    next >
Text File  |  1999-10-11  |  963b  |  40 lines

  1. /*
  2.  
  3.     gfxcon_dt.tpx v1.0 © 1999 Esteve Boix
  4.  
  5.     Uses GFXCon to scale the images and save them in JPG
  6.     format.
  7.  
  8.     The tool tp_dtc is used to use the datatypes to convert
  9.     the image to IFF, so GFXCon can load it without problems.
  10.  
  11.     Args: SIZEX SIZEY JPEG_COMPRESSION
  12.  
  13.     Where:
  14.  
  15.         SIZEX, SIZEY        Size in pixels of the thumbnail
  16.         JPEG_COMPRESSION    Well...
  17.  
  18.     You may have to edit this file in order to adapt the filename of GFXCon
  19.     executable.
  20.  
  21. */
  22.  
  23. options results
  24.  
  25. parse arg maxsizex maxsizey compression infile outfile
  26.  
  27. address command
  28. 'stack 25000'
  29.  
  30. /* Load the image and save it with tp_dtc */
  31. address command
  32. 'tableplug:tools/tp_dtc >nil: <nil: '||infile||' ram:tP_temp_image.iff'
  33.  
  34. 'c:gfxcon_68020 '||infile||' TO '||outfile||' BOXFIT '||maxsizex||' '||maxsizey||' FORMAT JPEG NOPROGRESS QUALITY '||compression
  35.  
  36. /* Now delete the iff image created by tp_dtc */
  37. address command
  38. 'delete >nil: <nil: ram:tP_temp_image.iff'
  39.  
  40.