Edit: Ah, I made changes so the image is copied before preprocessing - this should fix the problem at least partly.