home *** CD-ROM | disk | FTP | other *** search
- /*
- * ScaleImage.virx
- * Copyright (c)1992 Bruno Costa & Lucia Darsa
- */
-
- options results
-
- signal on HALT
- signal on SYNTAX
- signal on FAILURE
-
- lockgui
-
- form = '"FILE,Source image:,,50|' ||,
- 'FILE,Destination image:,,50|' ||,
- 'INT,Destination Width:,320,6|' ||,
- 'INT,Destination Height:,200,6|' ||,
- 'BOOL,Use Factors,1|' ||,
- 'STR,X Factor:,1.0,6|' ||,
- 'STR,Y Factor:,1.0,6"'
-
- requestform TITLE '"Scale Image"' form
- if rc >= 5 then
- signal halt
-
- parse var result source '|' dest '|' dwidth '|' dheight '|' usefact '|' xfact '|' yfact
-
- if usefact = 1 then
- scaleimage '"'||source||'"' '"'||dest||'"' trunc(xfact * 1000) 1000 trunc(yfact * 1000) 1000
- else
- scaleimage '"'||source||'"' '"'||dest||'"' WIDTH dwidth HEIGHT dheight
-
- unlockgui
- exit 0
-
- BREAK_C:
- HALT:
- unlockgui
- exit 20
-
- FAILURE:
- requestnotify '"Host *"'address()'*" returned an error (severity 'rc')*nexecuting' compress(sourceline(2),'* ') 'at line' SIGL'"'
- unlockgui
- exit 20
-
- SYNTAX:
- requestnotify '"'errortext(rc)'*nexecuting' compress(sourceline(2),'* ') 'at line' SIGL'"'
- unlockgui
- exit 20
-