Giter VIP home page Giter VIP logo

prongbang / flutter_resizer_image Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 79.06 MB

Flutter Resizer Image using Rust library for fast image resizing.

Home Page: https://pub.dev/packages/flutter_resizer_image

License: MIT License

Kotlin 0.06% Swift 1.13% Objective-C 0.01% Dart 68.68% Ruby 2.62% Makefile 0.17% Rust 4.90% C 0.60% CMake 9.51% C++ 8.76% HTML 0.74% Shell 1.62% PowerShell 0.27% Batchfile 0.94%
resize-image fast-resize-image flutter-resize-image

flutter_resizer_image's Introduction

flutter_resizer_image

Flutter Resizer Image using Rust library for fast image resizing.

Usage

  • pubspec.yml
dependencies:
  flutter_resizer_image: ^1.0.0

or

dependencies:
  flutter_resizer_image:
    git: https://github.com/prongbang/flutter_resizer_image
  • Initial
import 'package:flutter_resizer_image/flutter_resizer_image.dart';

void main() async {
  await FlutterResizerImage.init();
  runApp(const MyApp());
}
  • New Instance
final resizerImage = FlutterResizerImage.instance();
  • Resize with Percent
String image = "iVBORw0KGgoA....AAANS=";
final image = await resizerImage.resizerWithPercent(image: image, percent: 50);
  • Resize with Width x Height
String image = "iVBORw0KGgoA....AAANS=";
final image = await resizerImage.resizer(image: image, width: 100, height: 100);

flutter_resizer_image's People

Contributors

prongbang avatar

Stargazers

 avatar

Watchers

 avatar

flutter_resizer_image's Issues

Dart appears to be faster

Hi, I tried your app, and the times on a phone used for testing were about 110ms. I ran a test using Flutter and dart:ui, and the times were about 16ms. This was to resize your image file which is 64928bytes to an image of 80x80 which is 21120 bytes.

Using my same Flutter test and using an image from an android phone which is 3.26mb to an 80x80 image which is 33920 bytes, took 175ms. I haven't had time to test your program on that file, but based on the above, I would presume it would take much longer than dart takes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.