home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 2000 April & May
/
AMIGA_2000_04.iso
/
amiga-magazin
/
visualengineer
/
ve-full.lha
/
arexx
/
UnknownRegion.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-10
|
2KB
|
105 lines
/*
v1.02 UnknownRegion
Marko Seppänen
marko.seppanen@wwnet.fi
*/
address IMAGEENGINEER
Options results
signal on error
if arg()=0 then exit
pic=arg(1)
MARK pic PRIMARY
PROJECT_INFO pic BOX
picbox=result
parse var picbox xplace yplace x2place y2place .
/* Small enough? */
if (x2place-xplace)<10 | (y2place-yplace)<10 then do
'REQUEST "Would you like to choose even smaller box..? ;)" "Sorry"'
exit
end
else do
CROP pic picbox
cropped=result
PROJECT_SET cropped ZOOM "1:4"
PROJECT_INFO cropped WIDTH
cropwidth=result
PROJECT_INFO cropped HEIGHT
cropheight=result
smaller=trunc(min(cropwidth,cropheight))
end
/* What should we do to it? */
RIPPLE cropped trunc(cropwidth/2) trunc(cropheight/2) 30 3 0 AROUND FAST trunc(smaller/2)
fixed=result
CLOSE cropped
/* Let's put it back, where it belongs. */
MARK fixed PRIMARY
MARK pic SECONDARY
COMPOSITE xplace yplace MIX 100
final=result
CLOSE fixed
exit
/*******************************************************************/
/* This is where control goes when an error code is returned by IE */
/* It puts up a message saying what happened and on which line */
/*******************************************************************/
error:
if RC=5 then do
IE_TO_FRONT
LAST_ERROR
'REQUEST "'||RESULT||'"'
exit
end
else do
IE_TO_FRONT
LAST_ERROR
'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' ' OK '
exit
end