image_size_getter 0.1.0 copy "image_size_getter: ^0.1.0" to clipboard
image_size_getter: ^0.1.0 copied to clipboard

outdated

Get image width and height, the library does not completely decode the image file, just read the metadata to get the image width and height.

image_size_getter #

Do not completely decode the image file, just read the metadata to get the image width and height.

Just support jpeg, git, png, webp.

Usage #

import 'dart:io';

import 'package:image_size_getter/image_size_getter.dart';

main(List<String> arguments) async {
  File file = File("asset/IMG_20180908_080245.jpg");
  final size = ImageSizGetter.getSize(file);
  print("jpg = $size");

  File pngFile = File("asset/ic_launcher.png");
  final pngSize = ImageSizGetter.getSize(pngFile);
  print("png = $pngSize");

  File webpFile = File("asset/demo.webp");
  final webpSize = ImageSizGetter.getSize(webpFile);
  print("webp = $webpSize");

  File gifFile = File("asset/dialog.gif");
  final gifSize = ImageSizGetter.getSize(gifFile);
  print("gif = $gifSize");
}

106
likes
0
pub points
97%
popularity

Publisher

verified publisherkikt.top

Get image width and height, the library does not completely decode the image file, just read the metadata to get the image width and height.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

collection

More

Packages that depend on image_size_getter