MATLAB: Writing images superimposed with coloured boundaries

imwrite

Is it possible to write images on which I've superimposed boundaries into jpg files.If so how? When I tried just the binary image is written to the file. Thanx in Advance.