home *** CD-ROM | disk | FTP | other *** search
- /*
- AntiqueTint: Makes the image have a tint like in the old
- photographs. If the original image is in greyscale, then this
- will turn it into an RGB image.
-
- by Janne Jalkanen 1997.
-
- $Id: AntiqueTint.prx 1.2 1998/06/29 20:50:43 jj Exp jj $
- */
-
- /*-------------------------------------------------------------------*/
- /* I suggest you use this header as-is and add your own code below */
-
- OPTIONS RESULTS
- SIGNAL ON ERROR
- IF ADDRESS() = REXX THEN DO
- startedfromcli = 1
- ADDRESS PPT
- END
- ELSE DO
- startedfromcli = 0
- ADDRESS PPT
- END
- RESULT = 'no result'
-
- /*-------------------------------------------------------------------*/
- /* Main code. */
-
- PARSE ARG frame
-
- IF DATATYPE(frame) ~= NUM THEN DO
- RC = 10
- RC2 = "No frame selected"
- SIGNAL ERROR
- END
-
- FRAMEINFO frame STEM myinfo
-
- /*
- * If the original image is greyscale, then we will convert it into
- * truecolor before we can apply the antique tint effect
- */
-
- IF myinfo.COLORSPACE = "Greyscale" THEN DO
- PROCESS frame TRUECOLOR
- END
-
- /*
- * Let's apply the transformation. This will simulate the aging
- * effect which makes the red color withstand the passage of time.
- */
-
- PROCESS frame COLORMIX RED "1.0,0,0" GREEN "0,0.84,0" BLUE "0,0,0.68"
-
- EXIT 0
-
- /*-------------------------------------------------------------------*/
- /* Again, keep this part intact. This is the error handler. */
- ERROR :
- returncode = RC
- IF startedfromcli = 1 THEN DO
- SAY 'ERROR ' returncode ' on line ' SIGL ': ' RC2
- PPT_TO_BACK
- END
- ELSE
- SHOWERROR '"'RC2'"' SIGL
- EXIT returncode
-
-
-