Skip to content

ftrl/flutter_image_utilities

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_image_utilities

Image file related utilities for saving an image as JPEG with the specified quality and size and for getting image properties.

Features

  • Supports Android and iOS.
  • Modern plugin implementation based on Kotlin (Android) and Swift (iOS).
  • Uses background processing to keep UI responsive.
  • Save an image file as JPEG using the specified JPEG quality.
  • Resize saved image to a given size.
  • Get image width and height.
  • Get image orientation (Android).

Examples

Save image as JPEG

final jpegFile = await FlutterImageUtilities.saveAsJpeg(
  sourceFile: File("source_image_file"),
  destinationFilePath: "path/to/dest/file.jpg",
  quality: 60,
  maxWidth: 1920,
  maxHeight: 1080,
  canScaleUp: false);

Get image properties

final imageProperties =
  await FlutterImageUtilities.getImageProperties(File("source_image_file"));

About

Utility methods for saving an image as JPEG with the specified quality, size and scale mode and for getting image properties.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 41.4%
  • Swift 30.6%
  • Dart 23.7%
  • Ruby 3.3%
  • Objective-C 1.0%