Skip to content

AjaxFNC-YT/D.W.I.F

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D.W.I.F.

Discord Widget Image Fixer.

Node 18+ Tauri v2 PNG, WEBP, and GIF output Auto sizing enabled

Small image fixer for adding a transparent top strip and rounded top-right corner to Discord widget images, with both a CLI and a Tauri desktop UI.

Before and after preview of D.W.I.F. fixing a Discord widget image

Install

CLI requirements:

  • Node.js 18+

Desktop UI requirements:

  • Node.js 18+
  • Rust toolchain
  • Visual Studio Build Tools with Desktop development with C++ on Windows

Install dependencies:

npm install

Desktop UI

Launch the desktop app:

npm run tauri:dev

The desktop UI includes:

  • file picker for PNG, JPG, WEBP, and GIF files
  • live preview area
  • loading spinner and animated processing progress bar
  • fast animated processing enabled by default
  • top strip and radius controls
  • generate action
  • custom title bar with working window controls
  • resizable desktop window
  • download button to save a copy anywhere you want

Notes:

  • large GIF and animated WEBP files can take a while to process
  • animated previews may be limited depending on the file and platform
  • animated processing now reports frame-by-frame progress in the UI
  • the desktop app now uses the faster animated export path by default
  • generated files are still written to the local output/ folder first

Build a desktop bundle:

npm run tauri:build

CLI Use

Quick start:

node index.mjs input.png

That keeps the original image size, auto-calculates the strip and radius, and writes the fixed output into output/.

If you run it without paths:

node index.mjs

it will prompt for the input image and output file name.

Paths

  • relative inputs default to input/
  • relative paths outside input/ also work if the file exists locally
  • absolute input paths also work
  • outputs always go to output/

Examples:

node index.mjs input.png
node index.mjs input\input.png
node index.mjs animation.webp fixed.webp
node index.mjs animation.gif fixed.gif
node index.mjs C:\full\path\image.png output.png

Manual Options

node index.mjs <input-image> [output-name] [top-strip] [radius]

Examples:

node index.mjs input.png output.png 17 36
node index.mjs animation.webp fixed.webp
node index.mjs animation.gif fixed.gif

You can also override only one value and leave the other on auto:

node index.mjs input.png output.png 17

Help:

node index.mjs --help

Notes

  • Output format follows the output file extension: .png, .webp, or .gif.
  • Transparent WEBP files are supported.
  • Animated WEBP and GIF files keep their animation frames.
  • Animated output currently supports .webp and .gif.
  • Faster animated export settings are enabled by default. GIF output still has harder edges than WEBP because GIF transparency is only 1-bit.
  • The original image size is preserved.
  • Auto sizing is calibrated from:
    • 512x512 -> 17 / 36
    • 1844x853 -> 54 / 172
  • You may see a warning when the source image is not 512x512, since that is the original widget reference size.

About

D.W.I.F. - Discord Widget Image Fixer

Resources

Stars

17 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors