Skip to content

exif datas not found with CR3 pictures #48

@alaindeseine

Description

@alaindeseine

Hi,
I am trying to extract exif data to get the DateTimeOriginal information.
The script work very well with JPEG and Nikon NEF files.
But with Canon CR3 files, i get an empty list from the readExifFromBytes function.

Here is the script i use:

import 'dart:io';
import 'package:exif/exif.dart';
import 'package:exif_test/exif_test.dart' as exif_test;

void main(List<String> arguments) async {
  // String filename = './DSC_0700_038.JPG';
  // String filename = './DSC_1270.NEF';
  String filename = './OD2_2676.CR3';

  print("read $filename ...");

  final fileBytes = File(filename).readAsBytesSync();
  final data = await readExifFromBytes(
    fileBytes,
    // debug: true,
  );

  if (data.isEmpty) {
    print("No EXIF information found");
    return;
  }

  if (data.containsKey('JPEGThumbnail')) {
    print('File has JPEG thumbnail');
    data.remove('JPEGThumbnail');
  }
  if (data.containsKey('TIFFThumbnail')) {
    print('File has TIFF thumbnail');
    data.remove('TIFFThumbnail');
  }

  for (final entry in data.entries) {
    print("${entry.key}: ${entry.value}");
  }
}

Do I miss something? Or is there a restriction for extracting EXIF data from Canon CR3 files?

Il also try with a node.js script i wrote with the npmjs exiftools-vendored package and i can réead exif datas from CR3 file with this javascript package. So i am shure that EXC-IF datas are present in this CR3 file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions