mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Update JPEGFilter.java
Addressed transparency issues.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
package org.dspace.app.mediafilter;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Color;
|
||||
import java.awt.image.*;
|
||||
import java.awt.RenderingHints;
|
||||
import java.awt.Transparency;
|
||||
@@ -273,7 +274,7 @@ public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
|
||||
BufferedImage tmp = new BufferedImage(w, h, type);
|
||||
Graphics2D g2d = tmp.createGraphics();
|
||||
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);
|
||||
g2d.drawImage(scalebuf, 0, 0, w, h, null);
|
||||
g2d.drawImage(scalebuf, 0, 0, w, h, Color.WHITE, null);
|
||||
g2d.dispose();
|
||||
|
||||
scalebuf = tmp;
|
||||
|
Reference in New Issue
Block a user