From fde5f1293e564362d69fab33ab414c74a155fe65 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Mon, 2 Aug 2021 04:10:23 -0300 Subject: [PATCH] resize favicon to letterbox --- src/main/kotlin/com/viaversion/aas/config/VIAaaSConfig.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/kotlin/com/viaversion/aas/config/VIAaaSConfig.kt b/src/main/kotlin/com/viaversion/aas/config/VIAaaSConfig.kt index c2548f9..2434d87 100644 --- a/src/main/kotlin/com/viaversion/aas/config/VIAaaSConfig.kt +++ b/src/main/kotlin/com/viaversion/aas/config/VIAaaSConfig.kt @@ -3,6 +3,8 @@ package com.viaversion.aas.config import com.viaversion.aas.secureRandom import com.viaversion.viaversion.util.Config import net.coobird.thumbnailator.Thumbnails +import net.coobird.thumbnailator.filters.Canvas +import net.coobird.thumbnailator.geometry.Positions import java.io.ByteArrayOutputStream import java.io.File import java.net.URI @@ -28,6 +30,7 @@ object VIAaaSConfig : Config(File("config/viaaas.yml")) { ByteArrayOutputStream().also { Thumbnails.of(URL(rawUrl)) .size(64, 64) + .addFilter(Canvas(64, 64, Positions.CENTER, false)) .outputFormat("png").toOutputStream(it) }.toByteArray() )