Browse Source

REPORT-103847 优化补充内容

bugfix/11.0
obo 1 year ago
parent
commit
2d7f260d19
  1. 9
      fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/Image.java

9
fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/Image.java

@ -753,10 +753,6 @@ public abstract class Image extends Rectangle {
} else if (transparency == null) {
if (alpha == 0) {
transparentPixel = pixels[j] & 0xffffff;
transparency = new int[6];
transparency[0] = transparency[1] = (transparentPixel >> 16) & 0xff;
transparency[2] = transparency[3] = (transparentPixel >> 8) & 0xff;
transparency[4] = transparency[5] = transparentPixel & 0xff;
// Added by Michael Klink
// Check whether this value for transparent pixels
// has already been used for a non-transparent one
@ -768,10 +764,15 @@ public abstract class Image extends Rectangle {
// for transparency; we could still use an image
// mask but for simplicity let's use a soft mask
// which already is implemented here
// stackOverFlow:https://stackoverflow.com/questions/39119776/itext-binary-transparency-bug
shades = true;
break;
}
}
transparency = new int[6];
transparency[0] = transparency[1] = (transparentPixel >> 16) & 0xff;
transparency[2] = transparency[3] = (transparentPixel >> 8) & 0xff;
transparency[4] = transparency[5] = transparentPixel & 0xff;
}
} else if (((pixels[j] & 0xffffff) != transparentPixel) && (alpha == 0)) {
shades = true;

Loading…
Cancel
Save