fix coordinate problem with large images - bug 1523