mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
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:
parent
86a7fb3bb3
commit
7eb68cb75a
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue