Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void a(jp paramjp) {
- File localFile = d("server-icon.png");
- if (localFile.isFile()) {
- ByteBuf localByteBuf1 = Unpooled.buffer();
- try
- {
- BufferedImage localBufferedImage = ImageIO.read(localFile);
- Validate.validState(localBufferedImage.getWidth() == 64, "Must be 64 pixels wide", new Object[0]);
- Validate.validState(localBufferedImage.getHeight() == 64, "Must be 64 pixels high", new Object[0]);
- ImageIO.write(localBufferedImage, "PNG", new ByteBufOutputStream(localByteBuf1));
- ByteBuf localByteBuf2 = Base64.encode(localByteBuf1);
- paramjp.a("data:image/png;base64," + localByteBuf2.toString(Charsets.UTF_8));
- } catch (Exception localException) {
- h.error("Couldn't load server icon", localException);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment