Fixed bug
This commit is contained in:
parent
0d904ed7bd
commit
b958c96c9c
@ -36,6 +36,7 @@ public class CameraRoomPictureEvent extends MessageHandler {
|
|||||||
final int count = this.packet.readInt();
|
final int count = this.packet.readInt();
|
||||||
|
|
||||||
ByteBuf image = this.packet.getBuffer().readBytes(count);
|
ByteBuf image = this.packet.getBuffer().readBytes(count);
|
||||||
|
ByteBuf imageCopy = image.copy();
|
||||||
|
|
||||||
if (image == null)
|
if (image == null)
|
||||||
return;
|
return;
|
||||||
@ -67,7 +68,7 @@ public class CameraRoomPictureEvent extends MessageHandler {
|
|||||||
FTPUploadService.uploadImage(imageBytes, Emulator.getConfig().getValue("imager.location.output.camera") + URL);
|
FTPUploadService.uploadImage(imageBytes, Emulator.getConfig().getValue("imager.location.output.camera") + URL);
|
||||||
FTPUploadService.uploadImage(imageBytes, Emulator.getConfig().getValue("imager.location.output.camera") + URL_small);
|
FTPUploadService.uploadImage(imageBytes, Emulator.getConfig().getValue("imager.location.output.camera") + URL_small);
|
||||||
} else {
|
} else {
|
||||||
BufferedImage theImage = ImageIO.read(new ByteBufInputStream(image));
|
BufferedImage theImage = ImageIO.read(new ByteBufInputStream(imageCopy));
|
||||||
ImageIO.write(theImage, "png", new File(Emulator.getConfig().getValue("imager.location.output.camera") + URL));
|
ImageIO.write(theImage, "png", new File(Emulator.getConfig().getValue("imager.location.output.camera") + URL));
|
||||||
ImageIO.write(theImage, "png", new File(Emulator.getConfig().getValue("imager.location.output.camera") + URL_small));
|
ImageIO.write(theImage, "png", new File(Emulator.getConfig().getValue("imager.location.output.camera") + URL_small));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user