Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev0.8.0

native_exif

Um plugin para ler e gravar dados EXIF de imagens.

AndroidiOS
Downloads em 30 dias
54,7 mil
Curtidas
50
Pontos Pub
150

Instalar pacote

flutter pub add native_exif

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

NativeExif é um plugin do Flutter que permite ler e gravar metadados EXIF de imagens no Android e no iOS. Ele fornece uma interface de nível nativo para acessar propriedades da imagem, como coordenadas GPS, configurações da câmera, marcas de tempo e muito mais. O plugin foi projetado para desenvolvedores que precisam manipular ou extrair informações detalhadas das imagens sem depender de bibliotecas de terceiros. Ele se integra perfeitamente ao sistema de recursos e gerenciamento de arquivos do Flutter, garantindo desempenho eficiente e compatibilidade entre plataformas.

Casos de uso

  • Lendo metadados de imagem para geotagging
  • Editando dados EXIF para aplicativos de gerenciamento de fotos
  • Preservando detalhes da câmera nos recursos de compartilhamento de imagens
  • Automatizando fluxos de trabalho de processamento de fotos
  • Integração com aplicativos de fotografia ou arquivamento

Principais recursos

  • Suporta leitura e escrita de dados EXIF
  • Compatibilidade multiplataforma (Android e iOS)
  • Leve e eficiente
  • Integração direta com recursos e arquivos do Flutter
  • Sem dependências externas

Indicado para

  • desenvolvedores de aplicativos de fotografia
  • Ferramentas de metadados de imagem
  • utilitários de edição de fotos
  • Software de arquivamento e documentação
  • Aplicativos que exigem manipulação de imagens com geotagging

Considerações

  • Requer permissões apropriadas para acesso a arquivos
  • Limitado a arquivos de imagem com tags EXIF
  • Pode não suportar todos os campos EXIF em todos os dispositivos
  • Depende das implementações nativas da plataforma
  • Não adequado para tipos de arquivo não-imagem

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

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.

Categorias

Dependências

Lista de dependências 1 itens

  • intl>=0.19.0 <0.21.0

Repositório-fonte

Projetos que usam este pacote