diff --git a/README.md b/README.md index 79e0bbc..0fdf9a7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # platform_image_converter +[![pub package](https://img.shields.io/pub/v/platform_image_converter.svg)](https://pub.dev/packages/platform_image_converter) + A high-performance Flutter plugin for cross-platform image format conversion and resizing using native APIs on iOS, macOS, Android, and Web. ## Features @@ -88,8 +90,10 @@ static Future convert({ **Returns:** `Future` containing the converted image data. **Throws:** -- `UnsupportedError`: If the platform or format is not supported. -- `Exception`: If conversion fails. +- `UnsupportedError`: If the platform or output format is not supported. +- `ImageDecodingException`: If the input image data cannot be decoded. +- `ImageEncodingException`: If the image cannot be encoded to the target format. +- `ImageConversionException`: For other general errors during the conversion process. ### `OutputFormat` Enum diff --git a/lib/platform_image_converter.dart b/lib/platform_image_converter.dart index cd0b4bc..5a46bf8 100644 --- a/lib/platform_image_converter.dart +++ b/lib/platform_image_converter.dart @@ -45,7 +45,7 @@ class ImageConverter { /// - [UnsupportedError]: If the platform or output format is not supported. /// - [ImageDecodingException]: If the input image data cannot be decoded. /// - [ImageEncodingException]: If the image cannot be encoded to the target format. - /// - [ImageConversionException]: For other general errors during the conversion process. /// + /// - [ImageConversionException]: For other general errors during the conversion process. /// **Example - Convert HEIC to JPEG:** /// ```dart /// final jpegData = await ImageConverter.convert( diff --git a/lib/src/image_converter_platform_interface.dart b/lib/src/image_converter_platform_interface.dart index 4416240..ab9756c 100644 --- a/lib/src/image_converter_platform_interface.dart +++ b/lib/src/image_converter_platform_interface.dart @@ -11,6 +11,7 @@ import 'package:platform_image_converter/src/output_resize.dart'; /// **Implementations:** /// - [ImageConverterDarwin]: iOS and macOS using ImageIO /// - [ImageConverterAndroid]: Android using BitmapFactory +/// - [ImageConverterWeb]: Web using Canvas API abstract interface class ImageConverterPlatform { /// Converts an image to a target format. ///