8000 GitHub - apothis/ImageViewer: Lightweight native macOS image viewer (Swift + AppKit) — folder navigation, RAW/HEIC/WebP/PSD support, lazy loading with adjacent preload · GitHub
[go: up one dir, main page]

Skip to content

About

Lightweight native macOS image viewer (Swift + AppKit) — folder navigation, RAW/HEIC/WebP/PSD support, lazy loading with adjacent preload

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

ImageViewer

A lightweight native macOS image viewer built with Swift + AppKit. No Electron, no dependencies — just a small .app bundle compiled directly with swiftc.

Features

  • Browse images folder-by-folder with keyboard navigation
  • Recursive folder scanning with per-directory sets (↑/↓ to jump between them)
  • Adjacent image preloading with a 3-image LRU cache
  • Loading spinner with 150 ms delay so fast images don't flash
  • Window auto-sizes to each image, capped to the visible screen
  • Drag-and-drop a file or folder onto the window to open it
  • ESC hides the window without quitting; Dock click brings it back

Supported formats: JPEG, PNG, TIFF, GIF, BMP, WebP, HEIC, HEIF, AVIF, PSD, ICO, ICNS, and RAW (CR2, CR3, NEF, NRW, ARW, SRF, SR2, DNG, RAF, RW2, ORF, PEF, SRW, X3F, 3FR)

Build & Install

Requires macOS 26 and Xcode Command Line Tools (Swift 6.3.1+).

./build.sh                            # compile, bundle, ad-hoc sign
cp -r ImageViewer.app /Applications/ # install

Or run directly from the project directory:

open ImageViewer.app

Keyboard Shortcuts

Key Action
⌘O Open Folder…
⇧⌘O Open File…
← / → or [ / ] Previous / next image
⌘← / Home First image in set
⌘→ / End Last image in set
↑ / ↓ Previous / next set
= or + Zoom in (1.25×)
- Zoom out
0 Zoom to fit
ESC Hide window
⌘Q Quit

Project Structure

Sources/ImageViewer/
  main.swift        — entry point
  AppDelegate.swift — app logic: window, menus, image loading, cache, navigation
  ContentView.swift — DropView (drag-and-drop) + CenteredScrollView
build.sh            — compile + bundle script

Everything is programmatic AppKit — no storyboards, no XIBs.

About

Lightweight native macOS image viewer (Swift + AppKit) — folder navigation, RAW/HEIC/WebP/PSD support, lazy loading with adjacent preload

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0