Skip to content

Latest commit

 

History

63 Commits

Folders and files

Repository files navigation

ImageGlass Ithmb Plugin

License: MIT Rust 1.88+ CI

Decoded .ithmb sample (720×480 YCbCr 4:2:0)
720×480 YCbCr 4:2:0, decoded by ithmb-core v1.9.10.


Built with AI assistance — see CREDITS.md
DeepSeek OpenCode Oh My OpenAgent



C ABI plugin for ImageGlass v10 to decode .ithmb thumbnail files using ithmb-core from the parent repo ithmb-codec

Prefer a browser? The ITHMB Codec Web tool decodes .ithmb files online — no install needed, works on any OS, 100% private.

Quick Start

# Build the cdylib
cargo build --release

# Run all tests (unit + pseudo-fuzz)
cargo test

# Run local CI gates (clippy, test, build, deny, gitleaks, F-### anchors, fitness)
./scripts/check-local.sh

# Package as .igplugin.zip (auto-detects host platform)
./scripts/package.sh

# Or specify a target:
# ./scripts/package.sh linux
# ./scripts/package.sh macos
# ./scripts/package.sh windows

Output: dist/ithmb-codec-<platform>.igplugin.zip (binary + manifest).

Architecture

┌─────────────────────────────────────┐
│         ImageGlass Host (C#)        │
│  Plugin Loader → dlopen/LoadLibrary │
└──────────────────┬──────────────────┘
                   │ C ABI (ig_plugin_get_api)
                   ▼
┌─────────────────────────────────────┐
│     ithmb-core-cabi (this plugin)   │
│                                     │
│  lib.rs       — C ABI entry point   │
│  codec.rs     — capability, exts    │
│  decode.rs    — raster decode       │
│  buffer_registry.rs — buffer track  │
│  state.rs     — OnceLock statics    │
│  types.rs     — #[repr(C)] ABI      │
│  strings.rs   — UTF-16 helpers      │
│  allocator.rs — libc malloc/free    │
│  logging.rs   — IGHost logger       │
│  file_io.rs   — file read helpers   │
│                                     │
│  ┌───────────────────────────────┐  │
│  │    ithmb-core (dependency)    │  │
│  │  ProfileDb · decode · encode  │  │
│  └───────────────────────────────┘  │
└─────────────────────────────────────┘

ImageGlass Integration (v10+)

  1. Build and package: ./scripts/package.sh
  2. Open ImageGlass v10 -> Settings -> Plugins -> Add
  3. Select the .igplugin.zip file from dist/
  4. ImageGlass installs and registers the codec automatically

.ithmb and .ipm files now open natively in ImageGlass.

Scripts

Script Purpose CI equivalent
scripts/check-local.sh Run all local CI gates Mirror of CI verify_clippy + verify_deny + build
scripts/package.sh Package cdylib into .igplugin.zip CI build job artifact
scripts/abi-smoke.py Load cdylib + exercise full codec path CI build job smoke step
scripts/check-parity.sh Verify local vs CI output parity —

FFI from Other Languages

The library exposes a single C entry point (SDK v1.1.0 two-argument form):

const IGPluginApi* ig_plugin_get_api(int32_t host_abi_version, const IGHostApi* host_api);

The plugin implements the ImageGlass SDK v1.1.0 codec contract (decode-only; IGCodecApi/IGCodecCapability are StructSize-validated and the encode function pointers are null). Requires ImageGlass build 10.0.3.805+.

See the ImageGlass plugin SDK for details.

Features

See docs/FEATURES.md for the full feature inventory with behavior contracts and test anchoring.

Tech Debt

See TECH_DEBT_AUDIT.md for the triaged list.

License

MIT

Releases

Sponsor this project

Used by

Contributors

Languages