Explicitly cast image shape to integer value