Resize segmentation button to display "STOP" correctly.
Beautify code.
Create overlay image on the fly.

That allows taking into account the gradient image when present.
Remove output image code, no longer needed.
When clicking on "border image", update display image to avoid showing the gradient image.