Hi! I'm working in a project, and I need do this pre-processing, shown in the picture:

But, when I run it:

The operator that generates this problem is: "Write image to file", when I delete it, I can see the result that I was expected, but I need save it in a file (.jpg) and so I placed that operator.
Anyone know what happens?
Thanks in advance!