almost had it

This commit is contained in:
Dank074 2019-08-08 18:50:24 -05:00
parent 4cdfbf0ce6
commit 9dc25e3594

View File

@ -48,13 +48,6 @@ public class CameraRoomThumbnailEvent extends MessageHandler
this.packet.readInt();
this.packet.readInt();
BufferedImage theImage = null;
try {
theImage = ImageIO.read(new ByteBufInputStream(image));
} catch (IOException e) {
e.printStackTrace();
}
try {
if(Emulator.getConfig().getInt("ftp.enabled") == 1) {
byte[] imageBytes = new byte[image.readableBytes()];
@ -62,6 +55,8 @@ public class CameraRoomThumbnailEvent extends MessageHandler
FTPUploadService.uploadImage(imageBytes, Emulator.getConfig().getValue("imager.location.output.thumbnail") + room.getId() + ".png");
}
else {
BufferedImage theImage = null;
theImage = ImageIO.read(new ByteBufInputStream(image));
ImageIO.write(theImage, "png", new File(Emulator.getConfig().getValue("imager.location.output.thumbnail") + room.getId() + ".png"));
}
} catch (IOException e) {