diff --git a/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/commands/BlockChangeTimelapseCommand.kt b/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/commands/BlockChangeTimelapseCommand.kt index adfb5c3..40ad637 100644 --- a/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/commands/BlockChangeTimelapseCommand.kt +++ b/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/commands/BlockChangeTimelapseCommand.kt @@ -59,6 +59,7 @@ class BlockChangeTimelapseCommand : CliktCommand("Block Change Timelapse", name logger.info("Timelapse Slices: ${slices.size} slices") val imagePadCount = slices.size.toString().length + val pool = BlockMapRenderPool( changelog = changelog, blockTrackMode = if (considerAirBlocks) BlockTrackMode.AirOnDelete else BlockTrackMode.RemoveOnDelete, @@ -68,12 +69,13 @@ class BlockChangeTimelapseCommand : CliktCommand("Block Change Timelapse", name ) { slice, result -> val speed = slice.relative.toSeconds().toDouble() / timelapseMode.interval.toSeconds().toDouble() val graphics = result.createGraphics() - val font = Font.decode("Arial Black").deriveFont(36.0f) + val font = Font.decode("Arial Black").deriveFont(24.0f) graphics.color = Color.black graphics.font = font val context = graphics.fontRenderContext + val text = String.format("%s @ %.4f speed (1 frame = %s sec)", slice.to, speed, slice.relative.toSeconds()) val layout = - TextLayout("${slice.to} @ ${speed}x (1 frame = ${slice.relative.toSeconds()} seconds)", font, context) + TextLayout(text, font, context) layout.draw(graphics, 60f, 60f) graphics.dispose() val index = slices.indexOf(slice) + 1 diff --git a/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/render/BlockGridRenderer.kt b/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/render/BlockGridRenderer.kt index 4e9d276..6247852 100644 --- a/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/render/BlockGridRenderer.kt +++ b/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/render/BlockGridRenderer.kt @@ -25,7 +25,7 @@ abstract class BlockGridRenderer(val quadPixelSize: Int = defaultQuadPixelSize) val widthInPixels = widthInBlocks.toInt() * quadPixelSize val heightInPixels = heightInBlocks.toInt() * quadPixelSize val bufferedImage = - BufferedImage(widthInPixels, heightInPixels, BufferedImage.TYPE_4BYTE_ABGR) + BufferedImage(widthInPixels, heightInPixels, BufferedImage.TYPE_3BYTE_BGR) val graphics = bufferedImage.createGraphics() for (x in 0 until widthInBlocks) { diff --git a/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/state/BlockMapRenderPool.kt b/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/state/BlockMapRenderPool.kt index bdc8595..f6867e8 100644 --- a/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/state/BlockMapRenderPool.kt +++ b/tool-gjallarhorn/src/main/kotlin/cloud/kubelet/foundation/gjallarhorn/state/BlockMapRenderPool.kt @@ -66,7 +66,7 @@ class BlockMapRenderPool( } val end = System.currentTimeMillis() val timeInMilliseconds = end - start - logger.info("Playback Completed for Slice $id in ${timeInMilliseconds}ms") + logger.debug("Playback Completed for Slice $id in ${timeInMilliseconds}ms") } interface RenderPoolDelegate {