From 9fa72eafaa07c4dd0f78d81b78c9c93074326fbc Mon Sep 17 00:00:00 2001 From: Jason Millard Date: Mon, 16 Feb 2026 10:59:08 -0500 Subject: [PATCH] misc: add support for 128x16 colorizations --- src/vni.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/vni.cpp b/src/vni.cpp index 8498de9..62fb7d0 100644 --- a/src/vni.cpp +++ b/src/vni.cpp @@ -967,7 +967,21 @@ uint32_t Vni_Colorize(Vni_Context* ctx, const uint8_t* frame, uint32_t width, } } - auto planes = split_planes(frame, width, height, bitlen); + const uint8_t* effective_frame = frame; + std::vector padded_frame; + + Dimensions standard; + if (dim.width < standard.width || dim.height < standard.height) { + padded_frame.resize(standard.surface(), 0); + FrameUtil::Helper::CenterIndexed( + padded_frame.data(), static_cast(standard.width), + static_cast(standard.height), frame, + static_cast(dim.width), static_cast(dim.height)); + effective_frame = padded_frame.data(); + dim = standard; + } + + auto planes = split_planes(effective_frame, dim.width, dim.height, bitlen); if (!context->pal->mappings.empty()) { trigger_animation(context, dim, planes, false);