Browse Source

REPORT-103847 导出后蓝色图片不显示

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

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

@ -757,8 +757,25 @@ public abstract class Image extends Rectangle {
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
// before this position
for (int prevPixel = 0; prevPixel < j; prevPixel++) {
if ((pixels[prevPixel] & 0xffffff) == transparentPixel) {
// found a prior use of the transparentPixel color
// and, therefore, cannot make use of this color
// for transparency; we could still use an image
// mask but for simplicity let's use a soft mask
// which already is implemented here
shades = true;
break;
}
}
} else if ((pixels[j] & 0xffffff) != transparentPixel) {
}
} else if (((pixels[j] & 0xffffff) != transparentPixel) && (alpha == 0)) {
shades = true;
} else if (((pixels[j] & 0xffffff) == transparentPixel) && (alpha != 0)) {
shades = true;
}
}

Loading…
Cancel
Save