LOADIMAGES Procedure

Example 10.2 Loading Images from a List

(View the complete code for this example.)

This example shows how to use the LOADIMAGES procedure to load any set of supported images (see Table 1) by using the PATHFILE= option. In the example, the list.txt file could contain a list like this:

   ./1.bmp
   ./twoImages.zip
   http://.../imageFarAway.jpg
   ./subdir/4.png

The following statements read the images in the list.txt file and load them into a table named mylib.images:

proc loadimages libref=mylib pathfile='list.txt';
   output out=mylib.images;
run;

The following PROC PRINT statement displays the contents of the mylib.images data table that PROC LOADIMAGES generates:

proc print data=mylib.images;
run;

Output 10.2.1 shows the output, which contains the image and metadata columns.

Output 10.2.1: The mylib.images Data Table

Obs_image__size__path__type__id_
1...111893/path/to/images/1.bmpbmp3
2...17978166/path/to/images/twoImages/2.jpgjpg1
3...1666167/path/to/images/twoImages/3.jpgjpg4
4...69220http://.../imageFarAway.jpgjpg2
5...1026571/path/to/images/subdir/4.pngpng5


Last updated: March 26, 2026