Skip to content

Supported File Types

PaperHammer edited this page May 22, 2026 · 1 revision

File Type → Runtime Type Mapping

Internally, each file type (FileType) is mapped to a RuntimeType that determines how it is rendered. Understanding this mapping explains the behavior differences between types.

Wallpaper Type Extensions FileType RuntimeType
Still Image .jpg .jpeg .bmp .png .svg .webp FImage RImage or RImage3D ¹
Motion Picture .gif .apng FGif RImage or RImage3D ¹
Video .mp4 .webm FVideo RVideo
Web Interactive .zip .rar .7z FWebZip RWeb

¹ When a Still Image or Motion Picture is imported, a dialog asks whether to apply 3D Parallax. Choosing yes triggers depth estimation (MiDaS) and sets the runtime type to RImage3D. See AI Features for depth estimation details.

All four RuntimeType values share the same player process (VirtualPaper.PlayerWeb.exe) backed by a WebView2 host. RVideo disables mouse parallax input forwarding; the other three types enable it.


File Validation

Files are validated by magic bytes (file header), not just by extension. A file with a mismatched extension is rejected at import time.

Type Magic bytes checked
.jpg / .jpeg FF D8 FF
.bmp 42 4D
.png 89 50 4E 47 0D 0A 1A 0A
.svg 3C 73 76 67 (<svg) or 3C 3F 78 6D (<?xm)
.gif 47 49 46 38 39 61 (GIF89a) or 47 49 46 38 37 61 (GIF87a)
.mp4 66 74 79 70 (ftyp, at offset 4)
.webm 1A 45 DF A3 (EBML)
.zip 50 4B 03 04 / 50 4B 05 06 / 50 4B 07 08
.rar 52 61 72 21 1A 07 (RAR4) or 52 61 72 21 1A 07 01 00 (RAR5)
.7z 37 7A BC AF 27 1C

Notes

  • Web Interactive wallpapers are packaged web projects embedded in a built-in player shell — no JS callbacks required. See Web Interactive Wallpaper for the required project.json manifest and package structure.

  • SVG is supported as a static image rendered through WebView2. SVG is intentionally excluded from AI features (Style Transfer, Super Resolution) because OpenCV's ImRead cannot parse vector formats.

  • AI features (Style Transfer, Super Resolution) accept .jpg .jpeg .png .bmp .webp only — this subset is tracked separately as FimageAI internally.

  • Video playback runs inside WebView2. Hardware decoding availability depends on the system's GPU driver and codec support, which is outside VirtualPaper's control.

  • .apng (Animated PNG) is classified as FGif alongside .gif and follows the same runtime path.

Clone this wiki locally