first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package net.sf.jasperreports.engine.util;
import java.awt.Image;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.imageio.ImageIO;
import net.sf.jasperreports.engine.JRException;
public class JRJdk14ImageReader implements JRImageReader {
public Image readImage(byte[] bytes) throws JRException {
InputStream bais = new ByteArrayInputStream(bytes);
Image image = null;
try {
image = ImageIO.read(bais);
} catch (Exception e) {
throw new JRException(e);
} finally {
try {
bais.close();
} catch (IOException e) {}
}
if (image == null)
throw new JRException("Image read failed.");
return image;
}
}