-
-
Notifications
You must be signed in to change notification settings - Fork 323
Open
Description
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-bmp</artifactId>
<version>3.12.0</version>
</dependency> This is the bmp plugin for the Twelve monkeys introduced in the project.
private String transfer(
String source,
String destination,
String format
) {
try {
BufferedImage image = ImageIO.read(new File(source));
boolean success = ImageIO.write(image, format, new File(destination));
if (success==false) {
return "Failed";
}else {
return null;
}
} catch (Exception e) {
log.error("",e);
return "Exception";
}
} This is my transfer method.
Hi, haraldk.
ImageIO.getReaderFileSuffixes() and ImageIO.getWriterFileSuffixes(), both printed out ico. When I used the transfer method to transfer jpeg image to ico image, ImageIO.write(image, format, new File(destination)) returnd false.
Would you tell me how to transfer jpeg image to ico image?
Reactions are currently unavailable