CanWrite returns 1 on arw-File

Started by Archive, May 12, 2010, 08:54:19 AM

Previous topic - Next topic

Archive

[Originally posted by springm on 2008-04-11 21:23:11-07]

Looking for a possibility to discern writable files from not writable ones, I got stuck with the CanWrite method:

Code:
 $img1 = 'dsc00877.jpg';
  $img2 = 'dsc00878.arw';

  for my $img ($img1, $img2) {
     print "$img: ", Image::ExifTool::CanWrite($img), "\n";
  }

results in

Code:
 dsc00877.jpg: 1
  dsc00878.arw: 1

which can't be correct as .arw files are not writable according to the docs.

Any hints what's going on there would be appreciated very much

Thanks - Markus

Archive

[Originally posted by exiftool on 2008-04-11 22:37:00-07]

Hi Markus,

This is an issue I have to resolve.  From the code:

Code:
# Return true if we can write the specified file type
# Inputs: 0) file name or ext,
# Returns: true if writable, 0 if not writable, undef if unrecognized
# Note: This will return true for some TIFF-based RAW images which we shouldn't really write

The problem is that ARW actually identifies as a TIFF-format file,
which exiftool can write.  I have added extra logic later to avoid writing
ARW images, but I have to add this to the CanWrite routine.

Thanks for reminding me of this.  I will fix this in the next release.

- Phil

Archive

[Originally posted by springm on 2008-04-12 07:04:04-07]

Hi Phil,

thanks for the confirmation. So I'll do some manual workaround.

Other than that, let me state that Image::ExifTool is a really great piece of software and excellently documented, too. It lets me really work magic on my pictures regarding GPS data, and I still have only touched the surface of it.

Regards - Markus