diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-08-08 15:37:38 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-08-08 15:37:38 +0200 |
commit | 0dad4e12976720ef16de28cbd54086ef652ab2ec (patch) | |
tree | 5529527110923a0df8efeaf053f3a2b7da141e71 /pdf-over-commons | |
parent | edcabbd3f6b9fc7d4697257d4f9c2e18dc7c9534 (diff) | |
download | pdf-over-0dad4e12976720ef16de28cbd54086ef652ab2ec.tar.gz pdf-over-0dad4e12976720ef16de28cbd54086ef652ab2ec.tar.bz2 pdf-over-0dad4e12976720ef16de28cbd54086ef652ab2ec.zip |
fix transparent pixel handling in AWT -> SWT image converter, cf. #109
Diffstat (limited to 'pdf-over-commons')
-rw-r--r-- | pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java index 08adb0f2..b3687022 100644 --- a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java +++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java @@ -246,6 +246,8 @@ public final class ImageUtil { raster.getPixel(x, y, pixelArray); int pixel = palette.getPixel(new RGB(pixelArray[0], pixelArray[1], pixelArray[2])); data.setPixel(x, y, pixel); + if (3 < pixelArray.length) + data.setAlpha(x, y, pixelArray[3]); } } return data; |