As @IshanBhatnagar14 pointed out, the function getResolution should be used to get the sl::Resolution from a given sl::RESOLUTION.
In order to get the size of the image, you can do something like this instead :
sl::Resolution image_size = xm_zed.getCameraInformation().camera_configuration.resolution;
int xi_Width = image_size.width;
int xi_Height = image_size.height;