summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/ImageConverter.java2
1 files changed, 1 insertions, 1 deletions
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);