Fixed failed image writing when using jpgs in WmsClipper