Releases: yangchenlarkin/MonstraImageFilters
v1.0.0
🌊 MonstraImageFilters v1.0.0
Initial stable release of MonstraImageFilters - A high-performance Swift library for GPU-accelerated image filtering with advanced wave distortion effects.
🎯 What's New
This is the first stable release of MonstraImageFilters, featuring a sophisticated WaveFilter implementation with circular geometry correction and Metal shader optimization.
✨ Key Features
- 🌊 Advanced WaveFilter - Creates realistic ripple and wave distortion effects
- 🔄 Circular Geometry Correction - Maintains perfect circular waves on any aspect ratio
- ⚡ GPU-Accelerated Processing - Custom Metal shader pipeline for maximum performance
- 🎛️ Configurable Parameters - Control amplitude (0.0-0.5), frequency (1.0-20.0), and phase (0.0-1.0)
- 🛡️ Automatic Validation - Parameter clamping prevents invalid values
- 🧵 Thread-Safe - Semaphore-protected concurrent processing
- 📱 Cross-Platform - Native support for iOS 13+ and macOS 10.15+
- 📦 Swift Package Manager - Easy integration with intelligent resource discovery
🏗️ Technical Highlights
- Direct Metal Integration - Bypasses standard GPUImage3 pipeline for optimal performance
- Custom Shader Pipeline - Loads Metal shaders from Swift package resources
- Zero-CPU Processing - All filtering happens on GPU with no CPU image processing
- Aspect Ratio Correction - Automatic calculation ensures circular waves on any image size
- Resource Management - Efficient buffer management with minimal allocations
📦 Installation
Swift Package Manager
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/yangchenlarkin/MonstraImageFilters.git", from: "1.0.0")
]Or in Xcode: File → Add Package Dependencies → Enter repository URL
🚀 Quick Start
import MonstraImageFilters
// Create and configure wave filter
let waveFilter = WaveFilter()
waveFilter.normalizedPhase = 0.5 // Animation phase (0.0 - 1.0)
waveFilter.amplitude = 0.05 // Wave strength (0.0 - 0.5, auto-clamped)
waveFilter.frequency = 15.0 // Wave rings (1.0 - 20.0, auto-clamped)
// Apply to image using GPUImage3
let filteredImage = originalImage.filterWithOperation(waveFilter)🎨 Example App
The included example app demonstrates all capabilities:
- Clone and open the workspace:
MonstraImageFilters.xcworkspace - Run the Example scheme to see live filtering
- Tap "waveFilter" button to apply wave effects
- Tap any image to view full-screen with applied filter
- Customize parameters in
AllFilters.swiftlines 55-57
🔧 Parameter Examples
// Gentle water ripples
waveFilter.normalizedPhase = 0.3
waveFilter.amplitude = 0.03
waveFilter.frequency = 12.0
// Strong wave distortion
waveFilter.normalizedPhase = 0.7
waveFilter.amplitude = 0.2
waveFilter.frequency = 5.0
// Animation by varying phase
for frame in 0..<60 {
waveFilter.normalizedPhase = Float(frame) / 60.0
let frameImage = originalImage.filterWithOperation(waveFilter)
}📋 Requirements
- iOS 13.0+ or macOS 10.15+
- Xcode 12.0+
- Swift 5.9+
- Metal-compatible device for GPU acceleration
🎯 Use Cases
- Photo effects apps - Add dynamic wave distortions
- Real-time camera filters - Live wave effects on camera feed
- Animation and motion graphics - Animated ripple effects
- Creative tools - Water simulation and artistic effects
📚 Documentation
- Complete README with technical details and usage examples
- API documentation with parameter ranges and validation rules
- Example app with customizable filter parameters
- Metal shader source included for reference
🙏 Acknowledgments
Built on the powerful GPUImage3 framework with custom Metal shader enhancements for optimal performance and circular geometry correction.
Ready to add stunning wave effects to your iOS/macOS apps! 🚀
For questions, issues, or feature requests, please visit our GitHub repository.