dart_image_01 1.0.3

  • README.md
  • Installing
  • Versions
  • new54

#dart_image - Image and graphics library for server side applications.

The image library aims to provide server-side programs the ability to load, manipulate, and save various image file formats.

Simple usage example to load a jpeg, resize it, and save it as a jpeg.

import 'dart:io' as Io;
import 'package:dart_image/dart_image.dart';
main() {
  Io.File file = new Io.File('res/cat-eye04.jpg');
  var bytes = file.readAsBytesSync();
  if (bytes == null) {

  var jpegDecode = new JpegDecoder();
  var image = jpegDecode.decode(bytes);

  var thumbnail = image.resized(image.width ~/ 2, image.height ~/ 2);

  var jpegEncode = new JpegEncoder(100);
  var jpeg = jpegEncode.encode(thumbnail);

  Io.File fp = new Io.File('res/thumbnail-cat-eye04.jpg');
  fp.createSync(recursive: true);

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  dart_image_01: ^1.0.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:dart_image_01/dart_image_01.dart';
Version Uploaded Documentation Archive
1.0.3 Dec 24, 2018 Go to the documentation of dart_image_01 1.0.3 Download dart_image_01 1.0.3 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10


Detected platforms: Flutter, other

Primary library: package:dart_image_01/dart_image_01.dart with components: io.

Health suggestions

Fix lib/src/png_decoder.dart. (-1.49 points)

Analysis of lib/src/png_decoder.dart reported 3 hints:

line 17 col 15: The value of the local variable 'palette' isn't used.

line 23 col 12: The value of the local variable 'colorSpace' isn't used.

line 165 col 11: The value of the local variable 'crc' isn't used.

Fix lib/src/jpeg/_jpeg_data.dart. (-0.50 points)

Analysis of lib/src/jpeg/_jpeg_data.dart reported 1 hint:

line 272 col 8: The method '_skipBlock' isn't used.

Fix lib/src/jpeg_encoder.dart. (-0.50 points)

Analysis of lib/src/jpeg_encoder.dart reported 1 hint:

line 61 col 13: The value of the local variable 'start' isn't used.

Fix additional 10 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/_byte_buffer.dart (Run dartfmt to format lib/src/_byte_buffer.dart.)
  • lib/src/color.dart (Run dartfmt to format lib/src/color.dart.)
  • lib/src/encoder.dart (Run dartfmt to format lib/src/encoder.dart.)
  • lib/src/image.dart (Run dartfmt to format lib/src/image.dart.)
  • lib/src/jpeg/_jpeg.dart (Run dartfmt to format lib/src/jpeg/_jpeg.dart.)
  • lib/src/jpeg/_jpeg_frame.dart (Run dartfmt to format lib/src/jpeg/_jpeg_frame.dart.)
  • lib/src/jpeg/_jpeg_scan.dart (Run dartfmt to format lib/src/jpeg/_jpeg_scan.dart.)
  • lib/src/jpeg_decoder.dart (Run dartfmt to format lib/src/jpeg_decoder.dart.)
  • lib/src/png_encoder.dart (Run dartfmt to format lib/src/png_encoder.dart.)
  • lib/src/tga_encoder.dart (Run dartfmt to format lib/src/tga_encoder.dart.)

Maintenance issues and suggestions

Maintain CHANGELOG.md. (-20 points)

Changelog entries help clients to follow the progress in your code.

Homepage URL does not exists. (-20 points)

We were unable to access http://bitbucket.org/brendan_duncan/dart_image at the time of the analysis.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use dart_image_01.dart. Packages with multiple examples should use example/readme.md.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
benchmark_harness ^1.0.5 1.0.5