Skip to content

About

QuickLook plugin for previewing PAG (Portable Animated Graphics) files

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

67 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickLook.Plugin.PagViewer

同系列插件 / More plugins: SvgaViewer · AlphaVideoViewer · PluginManager

English | 中文


中文

简介

一个用于预览 PAG(Portable Animated Graphics)动画文件的 QuickLook 插件。

PAG 是腾讯开源的跨平台动画格式,广泛应用于游戏、短视频、直播等场景。本插件使用 libpag WebAssembly 引擎进行实时渲染。

🌐 在线预览(GitHub Pages):https://yancongya.github.io/QuickLook.Plugin.PagViewer/

功能特性

  • 实时 PAG 动画播放(自动循环)
  • 播放/暂停、进度条拖拽
  • 音量控制(按钮、滑块、滚轮调节)
  • 画布缩放(Ctrl+滚轮,0.1x ~ 5x)
  • 画布拖拽(左键长按)
  • 背景切换(默认/棋盘格/白色/黑色/自定义颜色)
  • 文件信息面板(悬停显示尺寸、时长、帧率、图层数等)
  • 性能监控(FPS 显示 + 进度条颜色反映渲染压力)
  • 保存为 PNG(保存到 PAG 文件旁边)
  • 复制文件到剪贴板
  • 窗口拖拽(点击背景区域)
  • 自动隐藏控制栏
  • 适配 QuickLook 暗色/亮色主题
  • 中英双语支持(自动检测系统语言)
  • 使用 Segoe Fluent Icons 图标

安装

  1. 从 Releases 下载 .qlplugin 文件
  2. 确保 QuickLook 正在运行
  3. 选中 .qlplugin 文件,按空格键预览
  4. 点击"安装"按钮
  5. 重启 QuickLook

系统要求

从源码构建

git clone https://github.com/yancongya/QuickLook.Plugin.PagViewer.git
cd QuickLook.Plugin.PagViewer
dotnet build -c Release

打包为 .qlplugin:

powershell -ExecutionPolicy Bypass -File Scripts/build.ps1

快捷键

操作 快捷键
播放/暂停 点击按钮
跳转 点击/拖拽进度条
音量 鼠标滚轮
静音 点击按钮
缩放 Ctrl + 滚轮
拖拽画布 左键长按
重置视图 双击画布
文件信息 悬停信息按钮
保存 PNG 点击保存按钮
复制文件 Ctrl + C
背景色选择器 右键点击背景按钮

项目结构

├── Plugin.cs                      # IViewer 入口
├── PagViewerPanel.xaml(.cs)       # WebView2 播放面板
├── Native/                        # P/Invoke 桩代码
├── Resources/Web/                 # Web 资源
│   ├── libpag.min.js              # PAG Web SDK
│   ├── libpag.wasm                # PAG WebAssembly 引擎
│   └── pag-player.html            # 播放器 UI
├── Samples/                       # 测试用 PAG 示例文件
├── Translations.config            # 中英文翻译
├── Properties/
├── Scripts/
└── *.csproj / *.sln

English

Introduction

A QuickLook plugin for previewing PAG (Portable Animated Graphics) animation files.

PAG is an open-source cross-platform animation format by Tencent, widely used in games, short videos, and live streaming. This plugin uses the libpag WebAssembly engine for real-time rendering.

🌐 Online preview (GitHub Pages): https://yancongya.github.io/QuickLook.Plugin.PagViewer/

Features

  • Real-time PAG animation playback (auto loop)
  • Play/Pause, Progress bar with seek
  • Volume control (button, slider, mouse wheel)
  • Canvas zoom (Ctrl+Scroll, 0.1x ~ 5x)
  • Canvas pan (left-click drag)
  • Background switcher (Default / Checkerboard / White / Black / Custom color)
  • File info panel (hover to show dimensions, duration, FPS, layers, etc.)
  • Performance monitoring (FPS display + progress bar color reflects render pressure)
  • Save as PNG (saves next to PAG file)
  • Copy file to clipboard
  • Window drag (click background area)
  • Auto-hide control bar
  • QuickLook Dark/Light theme support
  • Bilingual support (Chinese/English, auto-detect system language)
  • Segoe Fluent Icons

Installation

  1. Download .qlplugin from Releases
  2. Ensure QuickLook is running
  3. Select the .qlplugin file and press Space
  4. Click "Install"
  5. Restart QuickLook

Requirements

Build from source

git clone https://github.com/yancongya/QuickLook.Plugin.PagViewer.git
cd QuickLook.Plugin.PagViewer
dotnet build -c Release

Package as .qlplugin:

powershell -ExecutionPolicy Bypass -File Scripts/build.ps1

Keyboard & Mouse Shortcuts

Action Shortcut
Play / Pause Click button
Seek Click/drag progress bar
Volume Mouse wheel
Mute Click button
Zoom in/out Ctrl + Scroll
Pan canvas Left-click drag
Reset view Double-click canvas
File info Hover info button
Save PNG Click save button
Copy file Ctrl + C
Background picker Right-click background button

Project Structure

├── Plugin.cs                      # IViewer entry point
├── PagViewerPanel.xaml(.cs)       # WebView2 player panel
├── Native/                        # P/Invoke stubs
├── Resources/Web/                 # Web assets
│   ├── libpag.min.js              # PAG Web SDK
│   ├── libpag.wasm                # PAG WebAssembly engine
│   └── pag-player.html            # Player UI
├── Samples/                       # Sample PAG files for testing
├── Translations.config            # i18n translations
├── Properties/
├── Scripts/
└── *.csproj / *.sln

Changelog

See CHANGELOG.md

Credits

  • QuickLook by QL-Win
  • libpag by Tencent
  • UI design references official QuickLook plugins (VideoViewer, ImageViewer)

License

GPL-3.0

About

QuickLook plugin for previewing PAG (Portable Animated Graphics) files

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages