PROCESSIMAGES Procedure
Example 12.20 Add a Constant Value to Image Pixels
(View the complete code for this example.)
This example shows how to use the PROCESSIMAGES procedure to add a constant value to the pixels of an image.
The following statements process the image in the mylib.input_image table. You use the ADDCONSTANT statement to apply a constant value to each color channel. The processed image is stored in the mylib.output_image table.
proc processimages data=mylib.input_image;
addconstant b=-75 g=-75 r=-75;
output out=mylib.output_image;
run;
Output 12.20.1 shows the original image, and Output 12.20.2 shows the processed image.
Output 12.20.1: Original Image

Output 12.20.2: Processed Image

Last updated: March 26, 2026