You say "resolution," that is, pixels per inch or centimeter, but it sounds like you mean "dimensions," the number of columns and rows.
In either case, check out ImageMagick at
http://www.imagemagick.org. This package includes a command called "identify" that prints the dimensions and resolution of an image along with a lot of other information. Here's a SAS program that runs identify and parses its output:
[pre]
filename id pipe 'identify myimage.jpg';
data _null_;
attrib imgname length=$12 format length=$8 dimensions length=$9;
infile id;
/*
Skip to the 2nd line. The first word in the line is the image filename.
The 2nd is the image format, in this case 'JPEG'. The third word are the
dimensions, which are displayed in the form CCCCxRRRR.
*/
input / imgname format dimensions;
columns = input(scan(dimensions, 1, 'x'), best.);
rows = input(scan(dimensions, 2, 'x'), best.);
put _all_;
run;
[/pre]
If you need the resolution use the -verbose option on identify.
ImageMagick is free, supports over 100 different image formats, and runs on just about any platform you can imagine.