Skip to content

Instantly share code, notes, and snippets.

@buzztaiki
Last active January 18, 2026 02:05
Show Gist options
  • Select an option

  • Save buzztaiki/df0672c3ca7cae8135829b8792091e53 to your computer and use it in GitHub Desktop.

Select an option

Save buzztaiki/df0672c3ca7cae8135829b8792091e53 to your computer and use it in GitHub Desktop.
HiDPI環境でgrimのスクリーンショットがぼやける問題のワークアラウンドパッチ

https://gitlab.freedesktop.org/emersion/grim/-/issues/99 で報告されてる通り、HiDPI (特に小数スケーリング) で grim を使うとスクショがぼやける。原因はどうやら、マルチモニタ対応のために各 outupt のスクショを一つの画像に合成してスケーリングしてるかららしい (というような事が issue に書いてある。

自分の使い方と環境だとマルチモニタでも複数モニタを跨がったスクショは基本取らないので、キャプチャの対象となる output が一つだけの場合は合成せずに出力するようなパッチを書いた。回転には対応してない。

パッチはこれ: https://gitlab.freedesktop.org/buzztaiki/grim/-/compare/master...workaround_for_blur

根本対応とは言い難いし、MR だすかはちょっと迷う。issue にパッチはりつける程度が良いかもしれない。

スクショの比較

けっこうちがう

パッチなし

パッチあり

@buzztaiki
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment