A web application that creates glitch art through JPEG byte manipulation. Upload a photo and get 10 unique glitched variants to choose from.
- ✅ Upload JPEG images
- ✅ Capture JPEG images directly from webcam
- ✅ Generate 10 glitched variants using random byte manipulation
- ✅ Select multiple variants
- ✅ Download selected images as JPEG files
- ✅ Responsive grid layout with auto-scaled images
- ✅ Built with Vue 3 + TypeScript
- Upload: Choose a JPEG image (max 10MB)
- Capture (optional): Use "Use Webcam" to shoot a picture directly in the browser
- Generate: The app automatically creates 10 glitched variants
- Select: Click on images to select/deselect your favorites
- Download: Click "Download Selected" to save chosen variants
The application uses smart JPEG byte manipulation:
- Parses JPEG structure to identify safe modification zones
- Randomly modifies bytes in the scan data section
- Avoids headers and markers to prevent complete corruption
- Uses different random seeds for each variant to ensure variety
- DataBender.ts: Low-level JPEG byte manipulation engine
- GlitchGenerator.ts: Orchestrates generation of 10 variants
- Vue Components: Reactive UI with TypeScript
- 100% Client-Side: All processing happens in your browser
- Node.js 18+ and npm
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- Open the app in your browser (usually http://localhost:3000)
- Click "Choose File" and select a JPEG image, or click "Use Webcam" and capture a photo
- Wait a few seconds for glitch variants to generate
- Click on variants to select them (green border indicates selection)
- Click "Download Selected" to save your favorites
- Intensity slider (control glitch severity)
- Drag-and-drop file upload
- Better error handling and UX improvements
- Beauty scoring algorithm (color diversity, difference from original)
- Smart ranking: show top 5 variants by default, expandable to all 10
- Optional beauty filter toggle
data-bending/
├── src/
│ ├── components/
│ │ ├── ImageUploader.vue # File upload interface
│ │ └── ImageGallery.vue # Display variants with selection
│ ├── lib/
│ │ ├── DataBender.ts # JPEG byte manipulation
│ │ └── GlitchGenerator.ts # Generate variants
│ ├── types/
│ │ └── index.ts # TypeScript interfaces
│ ├── styles/
│ │ └── main.css # Global styles
│ ├── App.vue # Root component
│ └── main.ts # App entry point
├── index.html
├── vite.config.ts
├── tsconfig.json
└── package.json
- Best results: High-quality JPEG images work best
- File size: Keep images under 10MB for optimal performance
- Variety: Each upload generates fresh variants with different glitch patterns
- Selection: You can select all 10 variants if you want them all!
MIT
Built with Vue.js, TypeScript, and Vite