mirror of https://github.com/apache/poi.git
Jpeg can't be processed with alpha channel
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883129 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
150fb90cc2
commit
b27bb4f413
|
@ -42,7 +42,17 @@ public class BitmapFormat implements OutputFormat {
|
|||
|
||||
@Override
|
||||
public Graphics2D addSlide(double width, double height) {
|
||||
img = new BufferedImage((int)width, (int)height, BufferedImage.TYPE_INT_ARGB);
|
||||
int type;
|
||||
switch (format) {
|
||||
case "png":
|
||||
case "gif":
|
||||
type = BufferedImage.TYPE_INT_ARGB;
|
||||
break;
|
||||
default:
|
||||
type = BufferedImage.TYPE_INT_RGB;
|
||||
break;
|
||||
}
|
||||
img = new BufferedImage((int)width, (int)height, type);
|
||||
graphics = img.createGraphics();
|
||||
graphics.setRenderingHint(Drawable.BUFFERED_IMAGE, new WeakReference<>(img));
|
||||
return graphics;
|
||||
|
|
Loading…
Reference in New Issue