Skip to content
fest-livePublic

About

Image orient aware library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

61 Commits

Folders and files

Repository files navigation

@fest-lib/image
Orientation-aware wallpaper canvas + K-Means seeds for Veela (--color-primary / secondary / tertiary).

npm MIT stars

Caches the last wallpaper URL and seed colors so a reload can skip re-clustering. Paint target: [data-app-layer="canvas"] canvas[is="ui-canvas"].

core · dom · object · lure
 └── fest/image       ← you are here
      └── shell wallpaper · Material You seed

Install

npm install @fest-lib/core @fest-lib/dom @fest-lib/object @fest-lib/lure @fest-lib/image

Peers: core, dom, object, lure. Also uses culori.

import {
    setAppWallpaper,
    setAppWallpaperFromBlob,
    applyThemeFromWallpaper,
    syncAppWallpaperOrient
} from "@fest-lib/image";

setAppWallpaper("/wallpapers/desk.jpg");
await applyThemeFromWallpaper("/wallpapers/desk.jpg");
syncAppWallpaperOrient();

await setAppWallpaperFromBlob(file); // Blob | File

setAppWallpaper(url) is sync at the call site (persist + theme run in the background). applyThemeFromWallpaper(url, { force: true }) re-clusters even if the URL matches the cache.

Layout

Path Role
src/engine/KMean.ts dominant colors
src/engine/WallpaperTheme.ts seeds → theme hosts
src/canvas/Canvas.ts cover / orient paint
src/canvas/Canvas-2.ts app wallpaper layer + IDB

Do not rewrite K-Means or the Canvas-2 paint path unless that is the task — they are the SoT for shell wallpaper.

Workspace

cd modules/projects/image.ts
npm run dev
npm run build
npm run publish

License: MIT.

About

Image orient aware library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages