extractKittyCellImageId function
Extracts the 32-bit Kitty imageId from a U+10EEEE placeholder grapheme
and cell fgArgb without allocating coordinate records.
Implementation
int extractKittyCellImageId(String grapheme, int fgArgb) {
final low24 = fgArgb & 0xFFFFFF;
if (grapheme.length < 5) return low24;
final msb = _diacriticToIndex[grapheme.codeUnitAt(4)] ?? 0;
return ((msb & 0xFF) << 24) | low24;
}