Added WriteImageWithOffset