Search packages, repositories and app categories

Package detailsv0.0.2

fast_image_resizer

Resize images with native implementations. Supports only PNG as output.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
2.8K
Likes
19
Pub points
160

Install package

flutter pub add fast_image_resizer

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Fast Image Resizer is a Flutter package that enables efficient image resizing using native implementations across multiple platforms. It specializes in high-performance scaling of images with minimal overhead, delivering optimized results. The package supports only PNG output format, making it ideal for applications requiring compressed, high-quality PNGs. Built for speed and reliability, it integrates seamlessly into apps focused on multimedia editing, compression, or image processing workflows. Its cross-platform compatibility ensures consistent behavior on Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Image thumbnail generation
  • Optimizing images for web delivery
  • Reducing image file size for storage
  • Preprocessing images for app display
  • Batch image resizing in media apps

Key features

  • Native performance on all platforms
  • PNG-only output format
  • Cross-platform compatibility
  • Minimal memory usage
  • Simple API for resizing
  • Fast execution with low latency

Suitable for

  • Apps needing fast image processing
  • Developers prioritizing performance
  • Projects focused on PNG output
  • Media-heavy applications
  • Web and mobile apps requiring image optimization

Considerations

  • Only outputs PNG files
  • Limited to resizing operations
  • No support for other image formats
  • Requires careful handling of large images
  • Not suitable for complex image transformations

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

fast_image_resizer

This package uses native implementations to resize an image. It should be fast compared to the image package. It only supports PNG as output at the moment.

This package has zero dependencies.

Features

  • Supported inputs: JPEG, PNG, GIF, Animated GIF, WebP, Animated WebP, BMP, and WBMP
  • Supported outputs: PNG

Getting started

Add fast_image_resizer to your pubspec.yaml

Usage

import 'package:fast_image_resizer/fast_image_resizer.dart';
import 'dart:typed_data';
final rawImage = await rootBundle.load('assets/someImage.png');
final bytes = await resizeImage(Uint8List.view(rawImage.buffer), width: 150);
if (bytes != null) {
    final imageWidget = Image.memory(Uint8List.view(bytes.buffer));
    showDialog(
        context: context,
        builder: (BuildContext context) {
            return AlertDialog(
            title: const Text("Image"),
            content: imageWidget,
            );
        }
    );
}

or

final ImagePicker _picker = ImagePicker();
final XFile? image =
    await _picker.pickImage(source: ImageSource.gallery);
if (image != null) {
    final rawImage = await image.readAsBytes();
    final bytes = await resizeImage(Uint8List.view(rawImage.buffer), height: 250);
    if (bytes != null) {
        final testing = Image.memory(Uint8List.view(bytes.buffer));
        showDialog(
            context: context,
            builder: (BuildContext context) {
                return AlertDialog(
                    title: Text("Image"),
                    content: testing,
                );
            }
        );
    }
}

Known Issues

  • This currently does not work on web, because of this issue: https://github.com/flutter/flutter/issues/34075

Categories

Source repository

Projects using this package