respect targetWidth and targetHeight if set

Allows the pixel dimensions to be set.

Watson 3833743