home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / disk / directory / dop2apd1 / s / pic2jpg.dopus.eng < prev   
Text File  |  1995-02-27  |  3KB  |  7 lines

  1. /* Compressed with COMPRESS.REXX v1.2, © 1993 Robert Hofmann */
  2. adop="DOPUS.1"; adad="ADPro"; address value adop; options results; NL = '0A'X; lad=0; vers="V1.0"; topstring="Gif<>JPG "vers" (c)1993 by Conny Ankargren"; Toptext topstring; status 3; activ=result; status 7 activ; valda=result; if valda<1 then do; Toptext "ERROR: no files choosed!"; exit; end; if activ=0 then do; status 13 1; dest=result; status 13 0; source=result; end; if activ=1 then do; status 13 0; dest=result; status 13 1; source=result; end; status 26 set "GIF"; status 27 set "JPEG"; Request "Save in what format?"; format=result; bost=0; if format=0 then do; suff=".JPG"; status 26 set "OK"; status 27 set "NOPE"; getstring "What_Quality_[1-100]? 50"; qual=result; if qual=0 | qual=1 then qual=50; status 26 set "NORMAL"; status 27 set "BOOST"; request "Save in what JPG Format?"; bost=result; end; else suff=".GIF"; status 26 set "OK"; status 27 set "NOPE"; Again:; form=256; getstring "Compress_Width?_[%_of_Picture] 100"; Bredd=result; if Bredd=1 then Bredd=100; if Bredd=0 | Bredd>100 then Bredd=100
  3. getstring "Compress_Length_?_[%_of_Picture] 100"; Hojd=result; if Hojd=1 then Hojd=100; if Hojd=0 | Hojd>100 then Hojd=100; status 26 set "COLORS"; status 27 set "GREYSCALES"; request "Use what Color mode ?"; ferg=result; status 26 set "OK"; status 27 set "NOPE"; request "Iconify DirOpus while working?"; icon=result; request "Close ADpro when done ?"; av=result; call Hemta; busy on; flag=0; if SHOW(Ports,"ADPro")=0 then do until SHOW(Ports,"ADPro") >0; if flag=0 then do; address command "run Adpro:Adpro"; Toptext "Starting ADPro..."; flag=1; end; end; if icon=1 then iconify; address 'ADPro'; RED = 0; GREEN = 0; BLUE = 0; BRIGHTNESS = 0; CONTRAST = 0; GAMMA = 0; ORIENTATION PORTRAIT; DITHER 0; auto = 0; orientation "portrait"; pstatus "unlocked"; first_flag = 0; adpro_to_front; do i=1 to antal; fuck=0; lformat "UNIVERSAL"; if format=0 then sformat "JPEG"; else sformat "GIF"; load file.i; if rc ~= 0 then do; okay1 "Unable to load" file.i; fuck=1; end; if fuck=0 then do; if ferg=0 then OPERATOR "COLOR_TO_GRAY"
  4. if Bredd~=100 | Hojd~=100 then PCT_SCALE Bredd Hojd; SCREEN_TYPE 30; RENDER_TYPE form; if format=0 then OPERATOR "RENDERED_TO_RAW"; execute; adpro_display; if bost=1 & format=0 then save Dfile.i "RAW" qual; if bost=0 & format=0 then save Dfile.i "RAW" qual "BOOST"; if format=1 then save Dfile.i "image"; if rc ~= 0 then do; okay1 "Unable to save" Dfile.i; end; else do; address command 'c:filenote 'Dfile.i' "Saved using 'topstring'"'; end; end; end; if av=1 then adpro_exit; address value adop; if icon=1 then uniconify; if activ=0 then rescan 1; if activ=1 then rescan 0; busy off; exit; Hemta:; antal=0; do forever; antal=antal+1; getnextselected; file.antal=result; file2.antal=file.antal; file.antal=source""file.antal; if file2.antal>0 then selectfile file2.antal 0 1; if file2.antal=0 then leave; lang=length(file2.antal)
  5. if upper(substr(file2.antal,lang-3))=".JPG" | upper(substr(file2.antal,lang-3))=".HAM" | upper(substr(file2.antal,lang-3))=".GIF" | upper(substr(file2.antal,lang-3))=".IFF" then Dfile.antal=dest""delstr(file2.antal,lang-3)""suff; else Dfile.antal=dest""file2.antal""suff; end; if file2.antal=0 then antal=antal-1; return
  6. /* Original script: 203 lines, 3296 bytes */
  7.