From 302dee926ad9a38f45af54a887689ebf1fad1cdd Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Thu, 27 Nov 2014 21:02:26 +0100 Subject: ImageConverter fix --- .../src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java index 7e59711c..d4ad4496 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java @@ -160,7 +160,7 @@ public class ImageConverter { data.transparentPixel = -1; WritableRaster raster = bufferedImage.getRaster(); - int[] pixelArray = new int[3]; + int[] pixelArray = new int[bufferedImage.getColorModel().getNumComponents()]; for (int y = 0; y < data.height; y++) { for (int x = 0; x < data.width; x++) { raster.getPixel(x, y, pixelArray); -- cgit v1.2.3