カテゴリー・パッケージ・リポジトリを検索

image_painter のカバー
パッケージ詳細v0.7.1

image_painter

画像の上に描画するためのFlutterパッケージです。色、線幅、さまざまなペイントモードおよび画像のエクスポートをサポートしています。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
7050
いいね数
214
Pub ポイント
150

パッケージをインストール

flutter pub add image_painter

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

カスタマイズ可能な色、線の太さ、ペイントモードで画像に描画できるFlutterパッケージです。画像上でのインタラクティブな描画をサポートし、結果をエクスポートできます。画像の注釈、スケッチ、クリエイティブな編集が必要なアプリケーションに最適です。このパッケージはクロスプラットフォームであり、Android、iOS、macOS、Windows、Linuxでスムーズに動作します。

用途

  • 画像の注釈
  • クリエイティブスケッチ
  • デジタル署名のキャプチャ
  • 写真編集ツール
  • インタラクティブな描画アプリ

主な機能

  • カスタマイズ可能なペイントカラー
  • 調整可能なストローク幅
  • 複数のペイントモード
  • 描画された画像をエクスポート
  • クロスプラットフォーム対応

適している対象

  • 描画機能が必要なアプリ開発者
  • 教育またはデザインアプリ
  • ユーザー生成コンテンツプラットフォーム
  • モバイルおよびデスクトップマルチメディアアプリ

注意事項

  • 画像の読み込みとレンダリングの処理が必要です
  • 大きな画像ではパフォーマンスが異なる場合があります
  • 基本的なペイント操作に限定
  • 組み込みの元に戻す/やり直し機能なし
  • 外部画像ソース管理に依存しています

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

image_painter

pub package style: effective dart Platform Badge License: MIT

A flutter implementation of painting over image.

Overview

demo!

Features

  • Seven available paint modes. Line, Box/Rectangle, Circle, Freestyle/Signature, Dotted Line, Arrow and Text.
  • Four constructors for adding image from Network Url, Asset Image, Image from file and from memory.
  • Export image as memory bytes which can be converted to image. Implementation provided on example
  • Ability to undo and clear drawings.
  • Built in control bar.

[Note] Tested and working only on flutter stable channel. Please make sure you are on stable channel of flutter before using the package.

Getting started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  image_painter: latest

In your library add the following import:

import 'package:image_painter/image_painter.dart';

For help getting started with Flutter, view the online documentation.

Using the library

Check out the example

Basic usage of the libary:

  • ImagePainter.network: Painting over image from network url.
/// Initialize `ImagePainterController`. 
final imagePainterController = ImagePainterController();

/// Provide controller to the painter.
ImagePainter.network("https://sample_image.png",
                  controller: imagePainterController,scalable: true),

///Export the image:
Uint8List byteArray = await imagePainterController.exportImage();

/// Create a file or create a File instance of existing file. 
File imgFile =  File('directoryPath/fileName.png');

/// Now you use `Uint8List` data and write it into the file.
imgFile.writeAsBytesSync(image);

For more thorough implementation guide, check the example.

Issues and Support.

For any issues or support please visit the Issues.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。