Subject: | FileSource tag bug |
Date: | Mon, 29 Oct 2007 15:53:44 +0000 |
To: | bug-Image-ExifTool [...] rt.cpan.org |
From: | "David Manley" <manleyd [...] gmail.com> |
OS: Linux server 2.6.22-gentoo-r5 #2 SMP PREEMPT Tue Oct 9 19:05:05 BST 2007
i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
Perl : This is perl, v5.8.8 built for i686-linux
ExifTool release: exiftool-6.90
I have an .ExifTool_config file in my home directory with the following
contents:
%Image::ExifTool::UserDefined = (
# All EXIF tags are added to the Main table, and WriteGroup is used to
# specify where the tag is written (default is ExifIFD if not
specified):
'Image::ExifTool::Exif::Main' => {
0xd000 => {
Name => 'ImageSource',
Writable => 'int16u',
PrintConv => {
0 => 'Camera',
1 => 'Print Scanner',
2 => 'Film Scanner',
3 => 'Email',
4 => 'Internet',
},
},
},
);
Bug:
Changing or setting the FileSource EXIF tag always results in a value of
'Digital Camera' whatever value is passed.
manleyd~/tmp> exiftool 09-125-scan.jpg
ExifTool Version Number : 6.90
File Name : 09-125-scan.jpg
Directory : .
File Size : 51 kB
File Modification Date/Time : 2007:10:29 15:32:45
File Type : JPEG
MIME Type : image/jpeg
Image Width : 588
Image Height : 388
Image Size : 588x388
manleyd~/tmp> exiftool -FileSource='Reflection Print Scanner'
09-125-scan.jpg
1 image files updated
manleyd~/tmp> exiftool 09-125-scan.jpg
ExifTool Version Number : 6.90
File Name : 09-125-scan.jpg
Directory : .
File Size : 51 kB
File Modification Date/Time : 2007:10:29 15:33:21
File Type : JPEG
MIME Type : image/jpeg
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Y Cb Cr Positioning : Centered
Exif Version : 0220
Components Configuration : YCbCr
Flashpix Version : 0100
Color Space : Uncalibrated
File Source : Digital Camera
Image Width : 588
Image Height : 388
Image Size : 588x388
manleyd~/tmp> exiftool -FileSource='Film Scanner' 09-125-scan.jpg
1 image files updated
manleyd~/tmp> exiftool 09-125-scan.jpg
ExifTool Version Number : 6.90
File Name : 09-125-scan.jpg
Directory : .
File Size : 51 kB
File Modification Date/Time : 2007:10:29 15:35:57
File Type : JPEG
MIME Type : image/jpeg
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Y Cb Cr Positioning : Centered
Exif Version : 0220
Components Configuration : YCbCr
Flashpix Version : 0100
Color Space : Uncalibrated
File Source : Digital Camera
Image Width : 588
Image Height : 388
Image Size : 588x388
I have found a work-round. The file
/usr/lib/perl5/site_perl/5.8.8/Image/ExifTool/WriteExif.pl contains the
code:
0xa300 => { # FileSource
Writable => 'undef',
ValueConvInv => 'chr($val)',
PrintConvInv => 3,
},
Changing the PrintConvInv => 3 to PrintConvInv => 2, for example, will
(always) create a FileSource tag with a value of 'Reflection Print Scanner'.
I have had no problems changing any other tags with exiftool.
David Manley
Message body is not shown because it is too large.