패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.8.0

native_exif

이미지의 EXIF 데이터를 읽고 쓰는 플러그인입니다.

AndroidiOS
30일 다운로드
5.5만
좋아요
50
Pub 점수
150

패키지 설치

flutter pub add native_exif

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

NativeExif는 Android 및 iOS에서 이미지의 EXIF 메타데이터를 읽고 쓸 수 있는 Flutter 플러그인입니다. GPS 좌표, 카메라 설정, 타임스탬프 등 이미지 속성에 접근하기 위한 네이티브 레벨 인터페이스를 제공합니다. 제3자 라이브러리에 의존하지 않고 세부 이미지 정보를 조작하거나 추출해야 하는 개발자를 위해 설계되었습니다. 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

소스 저장소

이 패키지를 사용하는 프로젝트