avoid "image file is truncated (%d bytes not processed)"