パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.8.0

native_exif

画像の EXIF データを読み書きするためのプラグインです。

AndroidiOS
30日間ダウンロード
5.5万
いいね数
50
Pub ポイント
150

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

flutter pub add native_exif

パッケージ概要

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

NativeExif は、Android および iOS で画像の EXIF メタデータを読み書きできる Flutter プラグインです。GPS 座標、カメラ設定、タイムスタンプなど、画像のプロパティにアクセスするためのネイティブレベルのインターフェースを提供します。このプラグインは、サードパーティライブラリに頼らずに詳細な画像情報を操作または抽出したい開発者向けに設計されています。Flutter のアセットおよびファイル処理システムとシームレスに統合され、クロスプラットフォームでの効率的なパフォーマンスと互換性を確保しています。

用途

  • ジオタグ付けのための画像メタデータの読み取り
  • 写真管理アプリ向けにEXIFデータを編集する
  • 画像共有機能でカメラの詳細を保持する
  • 写真処理ワークフローの自動化
  • 写真またはアーカイブアプリケーションとの統合

主な機能

  • EXIFデータの読み取りおよび書き込みをサポートしています
  • クロスプラットフォーム互換性(AndroidおよびiOS)
  • 軽量で効率的
  • Flutter のアセットおよびファイルとの直接統合
  • 外部の依存関係なし

適している対象

  • 写真アプリ開発者
  • 画像メタデータツール
  • 写真編集ユーティリティ
  • アーカイブおよびドキュメンテーションソフトウェア
  • ジオタグ付き画像の処理を必要とするアプリ

注意事項

  • ファイルアクセスに適切な権限が必要です
  • EXIF タグを含む画像ファイルに限定
  • すべてのデバイスですべての EXIF フィールドをサポートするとは限りません
  • ネイティブプラットフォームの実装に依存する
  • 画像以外のファイル形式には適していません

元の README

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

native_exif

A simple EXIF metadata reader/writer for Flutter using native functions from iOS and Android.

Usage

First create a EXIF reader instance by reading out an image path:

final exif = await Exif.fromPath(pickedFile!.path);
Reading attributes

Now you can run either pre-defined functions or get all attributes:

final originalDate = await exif.getOriginalDate();
final latLong = await exif.getLatLong();
final attribute = await exif.getAttribute("key");
final attributes = await exif.getAttributes();
Writing attributes

It is possible to write raw EXIF data of type String to specific EXIF keys. The keys are limited to the EXIF keys provided by the platform. See "Platform notes" for more details.

await exif.writeAttribute("key", "value");
await exif.writeAttributes({"key1": "value1", "key2": "value2"});
Close the exif interface
await exif.close();

Platform notes

This plugin does only work on iOS and Android. Other platforms are not yet supported.

Android

This plugin uses the androidx ExifInterface.

[!IMPORTANT] Only specific EXIF and GPS attributes are supported. Please look for val tags = ... at android/src/main/kotlin/com/cloudacy/native_exif/NativeExifPlugin.kt for a list of supported attributes.

All raw attribute values must be of type String.

[!IMPORTANT] Currently this plugin can only write ASCII characters correctly due to ExifInterface limitations.

Values for GPSLatitude and GPSLongitude can be written as negative values but will be returned as positive values. Use GPSLatitudeRef and GPSLongitudeRef or getLatLong() to determine the correct coordinates.

iOS

[!IMPORTANT] Only specific EXIF and GPS attributes are supported. Please look at EXIF dictionary keys and GPS dictionary keys for supported attributes.

Please note that all GPS dictionary keys need to be prefixed with GPS. For example: kCGImagePropertyGPSLatitude == "Latitude", which equals to "GPSLatitude" in native_exif.

Values for GPSLatitude and GPSLongitude should be of type String and can be written as negative values but will be returned as positive values. Use GPSLatitudeRef and GPSLongitudeRef or getLatLong() to determine the correct coordinates.

API Docs

For code docs, you can use the automatically generated reference on pub.dev.

Example

For a better usage example, see the example folder or use the example page on pub.dev.

カテゴリー

依存関係

依存関係一覧 1 件

  • intl>=0.19.0 <0.21.0

ソースリポジトリ

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