Skip to content

mttfntn/image-converter-compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

MTTFNTN — Image Converter & Compressor

A fully client-side, single-file image converter and compressor. No server, no uploads, no dependencies — everything runs in the browser.

Features

Supported Input Formats

Category Formats
Standard Web JPEG, PNG, WebP, GIF, BMP
Professional / HDR OpenEXR (.exr), Radiance HDR (.hdr), TIFF / TIF
Device HEIC / HEIF (iPhone photos)
Other ICO

Output Formats

  • JPEG — adjustable quality (1–100)
  • PNG — lossless, optional interlace
  • WebP — adjustable quality or lossless mode
  • BMP — 24-bit uncompressed
  • Favicon Pack — generates a ZIP containing:
    • favicon.ico (multi-size ICO with selectable sizes: 16, 32, 48, 64, 128, 256)
    • favicon-32x32.png (browser tab)
    • apple-touch-icon.png (180×180, Apple devices)
    • android-chrome-192x192.png (Android / Google)
    • android-chrome-512x512.png (WordPress)
    • favicon-snippet.html (ready-to-paste <link> tags)

HDR / EXR Pipeline

When EXR or HDR files are loaded, a dedicated settings panel appears with:

  • Tone mapping — Reinhard, ACES Filmic, Hable (Uncharted 2), or Linear (clip)
  • Exposure — adjustable from -5.0 to +5.0 EV
  • Gamma — adjustable from 1.0 to 3.0

EXR decompression supports:

  • Uncompressed (type 0)
  • RLE (type 1)
  • ZIPS / ZIP (types 2–3, via pako)
  • PIZ (type 4, full Huffman + wavelet pipeline ported from THREE.js EXRLoader)

HDR files are decoded using the standard Radiance RGBE format with new-style RLE scanline support.

Resizing

  • Fixed dimensions (px) with optional aspect ratio lock
  • Scale by percent (1–200%)
  • Limit max width or max height
  • Resampling: Lanczos (best quality), Bilinear (fast), Nearest neighbor (pixel art)

Batch Processing

  • Drag & drop or click to browse — supports multiple files at once
  • Multi-select: Click to select, Ctrl/Cmd+Click to toggle individual files, Shift+Click to select ranges
  • Clear selected or Clear all with log entries for each action
  • Bundle as ZIP option for downloading all processed files in one archive
  • Customizable output filenames with prefix and suffix

Metadata

  • Option to strip EXIF and XMP metadata from output files

UI

  • Dark theme with orange accent (#FF4D00)
  • Real-time status per file: green (ready), purple (loading), red (error)
  • Bottom bar with file count, original vs. output size, and savings percentage
  • Collapsible log panel tracking all operations (loads, processing, errors, clears)
  • Toast notifications for quick feedback

How It Works

Everything runs in the browser using the Canvas API. The HTML file includes all dependencies inline — no build step, no package manager, no external requests.

Bundled libraries:

Library Purpose
pako zlib inflate for EXR ZIP/ZIPS decompression
JSZip ZIP bundling for batch downloads
heic2any HEIC/HEIF to PNG decoding
UTIF.js TIFF/TIF decoding

Custom implementations (no external library):

  • EXR parser and scanline decoder (uncompressed, RLE, ZIP, PIZ)
  • Radiance HDR (.hdr) parser and RGBE decoder
  • ICO encoder (multi-size, PNG-embedded)
  • BMP encoder (24-bit, bottom-up)
  • ZIP builder (store-only, for favicon packs)
  • CRC32 (for ZIP checksums)

Installation

Install... oh wait, no — you don't need to install anything.

It's a single HTML file. That's it. No npm install, no build tools, no frameworks, no Docker, no server. Just open image-converter-compressor.html in your browser and you're done.

No internet connection needed either — everything is bundled inline.

Usage

  1. Open image-converter-compressor.html in any modern browser
  2. Drop images onto the drop zone or click to browse
  3. Adjust format, quality, and resize settings in the right panel
  4. Click Process
  5. Click Download All or let auto-download handle it

Browser Compatibility

Works in all modern browsers (Chrome, Firefox, Edge, Safari). HEIC decoding may be slower on older hardware due to client-side processing.

Credits

This project uses the following open-source libraries:

  • pako — zlib inflate/deflate in pure JavaScript (MIT)
  • JSZip — ZIP file creation in the browser (MIT/GPLv3)
  • heic2any — HEIC/HEIF to JPEG/PNG conversion (MIT)
  • UTIF.js — TIFF decoder in JavaScript (MIT)

EXR PIZ decompression is based on the implementation from THREE.js EXRLoader (MIT).

Author

Created with love by Matteo Fontana.

License

MIT License

2026 Matteo Fontana

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A fully client-side, single-file image converter and compressor. No server, no uploads, no dependencies — everything runs in the browser.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages