From: SourceForge.net <no...@so...> - 2009-12-04 19:27:06
|
Patches item #2908996, was opened at 2009-12-04 14:27 Message generated for change (Tracker Item Submitted) made by lcalmes You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=308874&aid=2908996&group_id=8874 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Laurent Calmes (lcalmes) Assigned to: Nobody/Anonymous (nobody) Summary: Nikon D300 capture_preview fix Initial Comment: libgphoto2 discards first 128 bytes of data returned by Nikon cameras in function camera_capture_preview () in camlibs/ptp2/library.c Unfortunately, on my Nikon D300, this discards the first 64 bytes of the JPEG header, rendering capture_preview unusable. The following patch fixes this by looking for the JPEG start of image marker in the returned data. Although not necessary (in my case), it also looks for the end of image marker. camera_capture_preview() now returns the data between (and including) the two markers instead of the camera data minus first 128 bytes. Of course, this assumes that Nikon cameras return JPEG data in LiveView mode (this only applies to LiveView-capable Nikons). If no JPEG data is found, an error is returned. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=308874&aid=2908996&group_id=8874 |