Image Alchemy: Efficient Processing of Images
summary
Covers concrete fixes: use decoder sampling + one final scaled copy to avoid allocating two full bitmaps (12MP → ~48MB heap), handle EXIF orientation and copy metadata instead of re-encoding, and prefer lossless block ops via JPEGtran when rotating or cropping. Native libs like libjpeg-turbo enable non-power-of-two downsampling and streaming to avoid Java heap crashes. Measure quality with MS-SSIM; Mozilla JPEG encoder yields ~15% smaller files at equal quality; AVIF can reach ~1/3 the JPEG size. Example API: request JPEG ≤2000px, quality 85, library picks lossless or best encoder automatically.
AI-written summary · about
chapters (15)
- 0:00Introduction and overview
- 1:09Why image preprocessing matters
- 6:28Efficient resizing techniques
- 10:18Handling image metadata
- 13:04Color profiles and compatibility
- 14:28Questioning the approach
- 15:10Understanding JPEG compression
- 16:35Minimizing re-encodings
- 18:42Native code challenges
- 19:23Adding overlays and edits
- 21:32Measuring image quality
- 25:26Exploring HEIF and AVIF
- 28:34Future-proofing image pipelines
- 29:59Introducing the image library
- 33:11Summary and additional resources
related talks
38mImage Loading With Fresco: 4 Years Later
11mFrom Artifacts to Art: A Data-Driven Guide to Android Video Encoding
35mImages 101
35mPractical Image Processing in Android
33mMastering the Images Spectrum
34mThe Bytecode Mumbo Jumbo
37mWebAssembly in Android Apps — Do WASM Dream of JNI?
40mVideo Processing on Android
