Overview
The image_size_getter package efficiently retrieves the width and height of an image by reading only its metadata, avoiding full image decoding. This lightweight approach ensures fast performance and low memory usage, making it ideal for applications that need to preview or layout images without loading their full content. It supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, providing consistent behavior across environments.
Use cases
- Image preview sizing
- Layout calculations before full load
- Thumbnail generation
- Performance optimization in image-heavy apps
- Dynamic UI adjustments based on image dimensions
Key features
- Metadata-only reading
- Cross-platform compatibility
- Low memory footprint
- Fast execution
- Supports multiple image formats
- No full image decoding required
Suitable for
- Apps with large image collections
- Image gallery implementations
- Responsive UI design
- Performance-critical applications
- Developers prioritizing memory efficiency
Considerations
- Does not support all obscure image formats
- Relies on accurate metadata in image files
- May fail if metadata is corrupted or missing
- Not suitable for retrieving image data beyond dimensions
- Limited to size information, no thumbnail or pixel data