How Image Compression Works
AnyTool compresses images by drawing them onto an HTML Canvas element at progressively lower quality levels until the target file size is reached. The algorithm uses binary search over quality parameters for efficiency. Supports JPG, PNG, and WebP formats.
- Canvas-based compression with binary search quality optimization
- Supports JPG (lossy), PNG (palette reduction), and WebP
- Target size presets: 50 KB, 100 KB, 200 KB, and custom
- Batch processing for multiple images
