First off, and probably unrelated to the rpoblem you seek help with, a painting method override is no place to be performing disk I/O or constructing BufferedImages or most any other object, with the possible exception of geopmetry primitives (and that too is best avoided). Any painting method must be lean and return fast.
If you need frequent or periodic updates, use a Swing Timer and cal repaint() when done. Your painting method override will then have just one line to paint the already loaded image (and a call to the super implementation if the entire component area isn't covered by the image -- not the case here).
I don't see anywhere that you fill the background of your new BufferedImage, nor where you set the color of its Graphics reference, so I would fully expect
that the background goes black as the strokes go white.
There are no new questions, but there may be new answers.
subject: Saving a drawed image to a file reverses its colors