DPX bug fixes for cropped images

DPX bug fixes

1. incorrect addressing when writing crop images could cause a crash

2. incorrect reading of crop image offsets