Skip to content

Enable TIFF decode for iTerm2 images#1428

Open
zouyonghe wants to merge 4 commits intoraphamorim:mainfrom
zouyonghe:feature-enable-tiff
Open

Enable TIFF decode for iTerm2 images#1428
zouyonghe wants to merge 4 commits intoraphamorim:mainfrom
zouyonghe:feature-enable-tiff

Conversation

@zouyonghe
Copy link

Summary

  • Enable TIFF decoding in image crate to support iTerm2 image protocol output from chafa/PixelTerm.

Context

Rio parses OSC 1337 and feeds the payload to image::load_from_memory.
Chafa’s iTerm2 renderer emits TIFF data, which previously failed to decode.

Changes

  • Add tiff feature to image dependency.

Testing

  • manual verification: PixelTerm --protocol iterm2 now displays images.

@zouyonghe
Copy link
Author

Problem

Large GIF/video frames rendered via iTerm2 (OSC 1337) caused the viewport to scroll,
leading to misaligned UI in Rio. Sixel did not show this issue.

Root Cause

Rio reused the sixel insertion path for iTerm2 graphics. With SIXEL_DISPLAY unset,
the insertion logic performs linefeeds for each row, which scrolls the grid when
the image height is large.

Fix

Route OSC 1337 images through a source-aware insert path and disable scrolling for
iTerm2 images. This anchors at the cursor and clips to the viewport, keeping UI
stable. Sixel behavior remains unchanged.

Also fixes an unused background alpha assignment for unfocused splits.

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