PROCESSIMAGES Procedure
Getting Started: PROCESSIMAGES Procedure
(View the complete code for this example.)
The example in this section shows how to use PROC PROCESSIMAGES to resize the images that are stored in an input data table. This example assumes that the CAS engine libref "mylib" and the caslib that is associated with "mylib" have already been created. For more information, see the section Setting Up Your Environment for Working with Images in Chapter 1, Shared Concepts.
The following PROC LOADIMAGES statement loads the image from the specified path into the mylib.images data table, which is specified in the OUTPUT statement. The specified path must be relative to the caslib that is associated with the "mylib" libref:
proc loadimages libref=mylib path="path/to/images/sample.jpg";
output out=mylib.input_image;
run;
Figure 1 shows the original image loaded into the mylib.images table.
Figure 1: Original Image

Then you use the PROC PROCESSIMAGES statement as follows to resize the sample image to a width of 400 pixels and a height of 400 pixels:
proc processimages data=mylib.input_image;
resize width=400 height=400;
output out=mylib.resized_image;
run;
Figure 2 shows the output of the PROCESSIMAGES procedure.
Figure 2: Processed Image
