flutter_mozjpeg 0.0.4 flutter_mozjpeg: ^0.0.4 copied to clipboard
A Flutter wrapper for mozjpeg.
flutter_mozjpeg #
A Flutter wrapper for mozjpeg.
Getting Started #
iOS #
The pod mozjpeg
must be redirected to my own fork just now. Add the following line to your ios/Podfile
:
pod 'mozjpeg', :git => "https://github.com/espresso3389/mozjpeg.git"
Your Podfile
may be like the following after adding the line:
...
target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'mozjpeg', :git => "https://github.com/espresso3389/mozjpeg.git"
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
...
Android #
Nothing to do.
Example #
import 'package:flutter_mozjpeg/flutter_mozjpeg.dart';
...
await FlutterMozjpeg.jpegCompressFileToFile(File('input.jpg'), File('output.jpg'));