You can use the set , setRegion and flip methods of the setRegion output to change the bits in the output matrix and add any (if you have a good level of error correction) monochrome image to your output code, or you can export your BitMatrix to a mutable Image and do everything whatever you want with Image.getGraphics() , which gives you a built-in Graphics object where you can draw as usual, but remember to increase the level of ERROR_CORRECTION.
source share