Skip to content

v0.4.0

Choose a tag to compare

@benface benface released this 06 Oct 17:04
· 9 commits to main since this release
00cae10

🎨 Smart Format & Alpha Handling + Rust 2024

This release brings intelligent format handling, proper alpha channel support, and upgrades to the latest Rust edition!

✨ New Features

Intelligent Alpha Channel Handling

bgone now correctly processes images with existing transparency:

  • Translucent pixels are pre-composited over the background color
  • Background auto-detection composites translucent edges over black
  • Works perfectly with PNG files, anti-aliased edges, and semi-transparent graphics

Example: A semi-transparent red pixel rgba(255, 0, 0, 128) on white background → rgb(255, 127, 127) before processing

Smart Format Selection

Automatic output format conversion for formats without alpha support:

  • JPEG/BMP inputPNG output (preserves transparency)
  • Formats with alpha (PNG, WebP, TIFF, GIF, etc.) → preserved
  • Case-insensitive extension handling
bgone photo.jpg        # → photo-bgone.png (auto-converted!)
bgone logo.png         # → logo-bgone.png (preserved)
bgone image.webp       # → image-bgone.webp (preserved)

🔧 Improvements

Rust Edition 2024 Upgrade

  • Upgraded from Edition 2021 → 2024
  • New syntax: let-chains in if statements
  • Modern patterns: RangeInclusive::contains()
  • Cleaner code: removed unnecessary let-bindings and closures
  • Zero clippy warnings

Documentation Cleanup

  • Simplified "Supported Formats" section
  • Clearer, more concise README
  • Better examples with inline comments

🧪 Testing

  • 82 tests (added 7 new tests)
  • Full coverage for alpha compositing
  • Format conversion test coverage
  • All tests passing

📦 Installation

# Homebrew
brew upgrade bgone

# Cargo
cargo install bgone --version 0.4.0

This release makes bgone more intelligent, modern, and user-friendly while maintaining backward compatibility!