bugfix 4793: correct determination of the result image dimension in image reader