Photo Organizer

Notice: Undefined index: tasklist_type in /var/www/flyspray/includes/class.tpl.php(128) : eval()'d code on line 85 Notice: Undefined index: tasklist_type in /var/www/flyspray/includes/class.tpl.php(128) : eval()'d code on line 90
  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Backend / Core
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Normal
  • Reported Version 2.34-rc1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 0
  • Private No
Attached to Project: Photo Organizer
Opened by Robert Hendrickx (robert.hendrickx) - 2007-08-04
Last edited by Solomon Peachy (pizza) - 2007-08-16

FS#228 - Cannot import NEF raw when orientation is portrait

when trying to upload NEF raw images (nikon) shoted in portrait mode, the "transfering metadata" phase fail.

Importing 'DSC_0019.NEF' (Nikon Raw Format) into folder test .

* Extracting Image Metadata (EXIF) ... done
* Extracting Image Metadata (XMP) ... done
* Extracting Image Metadata (IPTC) ... done
* Copying original image DSC_0019.NEF into repository ... done
* Decoding RAW image using ExifTool ... done.
* Decoding RAW image using ufraw ... done.
* Generating preview image ... done. (700 pixels)
* Transferring metadata ... failed.
*

/usr/bin/exiftool -q -overwrite_original -Orientation=1 -n '/data/photoorganizer_image_repository/v0000/00001/42_2.jpeg'

* Cleaning up the mess.

No problem with landscape ones

This task does not depend on any other tasks.

Closed by  Solomon Peachy (pizza)
Thursday, 16 August 2007, 13:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  see last comment.
Solomon Peachy (pizza)
Saturday, 04 August 2007, 18:52 GMT
Odd. NEF imports are 95% of what I do, so this code path is pretty heavily tested.

Just to be sure, I just imported three portrait NEFs with no problems, straight from my D200.

What version of exiftool are you using? Was there anything logged in your http error_log?

(on line 238 of include/import.php, getting rid of the '-q' might result in a useful error message)

If possible, you could send me the actual image you're having problems with.
Robert Hendrickx (robert.hendrickx)
Sunday, 05 August 2007, 15:24 GMT
My exiftool is version 6.77, and these are pictures taken by a D80.

No special log when removing the "-q" from the exiftool invocation...
* Extracting Image Metadata (EXIF) ... done
* Extracting Image Metadata (XMP) ... done
* Extracting Image Metadata (IPTC) ... done
* Copying original image DSC_0022.NEF into repository ... done
* Decoding RAW image using ExifTool ... done.
* Decoding RAW image using ufraw ... done.
* Generating preview image ... done. (700 pixels)
* Transferring metadata ... 0 image files updated 1 files weren't updated due to errors failed.
*

/usr/bin/exiftool -overwrite_original -Orientation=1 -n '/data/photoorganizer_image_repository/v0000/00001/100_2.jpeg'

* Cleaning up the mess.

and in the httpd error log:
Warning: Error rebuilding maker notes (may be corrupt) - /data/photoorganizer_image_repository/v0000/00000/100_3_orig.nef
Error: [minor] Truncated NikonPreview directory - /data/photoorganizer_image_repository/v0000/00001/100_2.jpeg

I join you the file.
Robert Hendrickx (robert.hendrickx)
Sunday, 05 August 2007, 15:34 GMT
I tried twice to join the file, but I can't see it ! If you want, I can send it directly by email (>9Mb...)
Solomon Peachy (pizza)
Monday, 06 August 2007, 02:01 GMT
Yeah, soething's wrong with the attachment system here.

mail it to: pizza@shaftnet.org
Solomon Peachy (pizza)
Monday, 06 August 2007, 13:11 GMT
According to my logs, this is what's going on:

// Extracting Image Metadata [...]
Warning: Ignored bad IFD linked from SubIFD - /tmp/phpTe28DO
// Transferring metadata
Warning: Error rebuilding maker notes (may be corrupt) - /mnt/bulk2/po/v0192/00000/47272_3_orig.nef
Error: [minor] Truncated NikonPreview directory - /mnt/bulk2/po/v0192/00001/47272_2.jpeg

It would seem that the Nikon software (Picture Project &| Capture) is mangling the images so that exiftool can't do the right thing.

I've added code to work around this for now (svn r1501), and it seems to work okay. You can apply the patch directly from svn, or you can wait for -rc3, and in the mean time diable 'transfer metadata' in your settings .

Can I pass this image onto the exiftool author so he can try to fix it there?
Robert Hendrickx (robert.hendrickx)
Monday, 06 August 2007, 13:47 GMT
Thanks

No problem to pass the image.

For the record, it was taken with a Nikon D80 firmware version 1.01, and transfered with Nikon Picture Project v1.7
Robert Hendrickx (robert.hendrickx)
Monday, 06 August 2007, 14:31 GMT
I confirm it's working.

Thanks
Solomon Peachy (pizza)
Thursday, 16 August 2007, 13:31 GMT
According to the author of ExifTool:

> This is a result of rewriting the maker notes which have been written
> incorrectly by PictureProject. ExifTool warns you that they may be
> corrupt, and issues a minor error if you try to rewrite them
> afterward. But you can use the -m option to downgrade minor errors
> to warnings, allowing you to rewrite this image.

Apparently it's a bug in PictureProject. PO already has a coded workaround, but I figure I should document the originator of the bug properly.

Loading...