Use RGB not ARGB so that ImageIO can write more image formats

git-svn-id: https://zxing.googlecode.com/svn/trunk@2105 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-01-07 05:19:57 +00:00
parent 86a7fb3bb3
commit 7eb68cb75a

View file

@ -45,7 +45,7 @@ public final class MatrixToImageWriter {
public static BufferedImage toBufferedImage(BitMatrix matrix) {
int width = matrix.getWidth();
int height = matrix.getHeight();
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);