From 5a1cd202cc39365bb3e0a72fa5e83d5462470f22 Mon Sep 17 00:00:00 2001 From: DaveyEke Date: Mon, 27 Apr 2026 18:05:36 +0100 Subject: [PATCH] fix(docs): reflect supported file formats in readme --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 74d8cd4d..003188b1 100644 --- a/README.md +++ b/README.md @@ -212,14 +212,25 @@ const path = await image.saveToTemporaryFileAsync('jpg', 50) // 50% compre const compressed = await image.toEncodedImageData('jpg', 50) // 50% compression ``` -#### HEIC/HEIF +#### Supported Formats -NitroImage supports `HEIC`/`HEIF` format if the host OS natively supports it. +NitroImage uses the host OS for decoding, so loading supports any format the platform does. Writing is limited to `jpg`, `png` and `heic`. -| | iOS | Android | -|--------------|----------------|----------------| -| Loading HEIC | ✅ | ✅ (>= SDK 28) | -| Writing HEIC | ✅ (>= iOS 17) | ❌ | +| | Loading (iOS) | Loading (Android) | Writing (iOS) | Writing (Android) | +|-------|---------------|-------------------|----------------|-------------------| +| JPEG | ✅ | ✅ | ✅ | ✅ | +| PNG | ✅ | ✅ | ✅ | ✅ | +| HEIC | ✅ | ✅ (>= SDK 28) | ✅ (>= iOS 17) | ❌ | +| WebP | ✅ | ✅ | ❌ | ❌ | +| GIF | ✅ | ✅ | ❌ | ❌ | +| BMP | ✅ | ✅ | ❌ | ❌ | +| TIFF | ✅ | ❌ | ❌ | ❌ | + +Animated formats (GIF, WebP, APNG) decode to a single frame - `` does not play animations. + +For loading remote images, [react-native-nitro-web-image](https://www.npmjs.com/package/react-native-nitro-web-image) additionally supports AVIF via SDWebImage (iOS) and Coil (Android). + +##### HEIC/HEIF You can check whether your OS supports `HEIC` via NitroImage: