title: How can I invert a binary image in MATLAB?
body: <p>I have a binary image and need to convert all of the black pixels to white pixels and vice versa. Then I need to save the new image to a file. Is there a way to do this without simply looping over every pixel and flipping its value?</p>