Skip to content

Add IMSC 1.1 image profile image-based export#12547

Merged
niksedk merged 1 commit into
mainfrom
feature/imsc-image-export
Jul 16, 2026
Merged

Add IMSC 1.1 image profile image-based export#12547
niksedk merged 1 commit into
mainfrom
feature/imsc-image-export

Conversation

@niksedk

@niksedk niksedk commented Jul 16, 2026

Copy link
Copy Markdown
Member

Adds the IMSC 1.1 image profile (W3C/ISO TTML image profile) as an image-based export — the standardized image-subtitle carriage used for streaming and broadcast delivery, and the one widely-used image-based format SE didn't have (the gap identified in the EBU-TT-D discussion).

What it produces

ExportHandlerImscImage writes a single self-contained TTML file:

  • each cue is a cropped PNG embedded as a base64 <smpte:image imagetype="PNG" encoding="Base64"> in <head>,
  • referenced from a <div smpte:backgroundImage="#imgN"> in <body> with begin/end,
  • positioned by a per-cue <region> with percentage tts:origin/tts:extent computed from the cue's on-screen placement (same alignment + OverridePosition logic as the BDN XML handler),
  • ttp:profile=".../imsc1/image", ttp:timeBase="media", HH:MM:SS.mmm times.

It reuses the shared ImageRenderer, so it inherits the export dialog's font / outline / shadow / box / position settings automatically.

Wiring

  • File → Export menu entry, and the image-based export dialog (new ExportImageType.ImscImage).
  • Output round-trips through SE's own Timed Text Base64 Image reader — export then re-open recovers the cues.

Verified

  • 3 libuilogic tests: conformant profile/timebase/smpte:image shape, round-trip through the base64-image reader recovering exact timings, and embedded PNGs decoding to the right dimensions.
  • Rendered a real sample and extracted the first embedded PNG — shows the correct subtitle; region math checks out (a 400×90 cue centered near the bottom → origin 39.58% 87.04%, extent 20.83% 8.33%).
  • Full solution builds; all libuilogic tests pass.
  • Docs (File features page) and change-log updated.

Pairs naturally with the EBU-TT-D text format added earlier — together they cover both the text and image TTML profiles European/streaming delivery asks for.

🤖 Generated with Claude Code

IMSC 1.1 image profile (W3C/ISO TTML image profile) is the standardized
image-subtitle carriage for streaming and broadcast delivery. It was the
one widely-used image-based export SE lacked.

ExportHandlerImscImage writes a single self-contained TTML file: each cue
is a cropped PNG embedded as a base64 <smpte:image> in the head, referenced
from a <div smpte:backgroundImage> in the body, positioned by a per-cue
region with percentage origin/extent computed from the cue's on-screen
placement (same alignment/override logic as the BDN XML handler). Media
timebase, HH:MM:SS.mmm times. Reuses the shared ImageRenderer, so it picks
up the export dialog's font/outline/box/position settings for free.

Wired into the File > Export menu and the image-based export dialog; the
output round-trips through SE's own Timed Text Base64 Image reader.

Verified: 3 libuilogic tests (conformant profile/timebase/smpte shape,
round-trip through the base64-image reader recovering exact timings, and
embedded PNGs decoding to the right dimensions), plus a rendered sample
whose extracted PNG shows the correct subtitle. Full solution builds; all
libuilogic tests pass. Docs (File features) + change-log updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@niksedk
niksedk merged commit 5962fc8 into main Jul 16, 2026
1 of 3 checks passed
@niksedk
niksedk deleted the feature/imsc-image-export branch July 16, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant