Can't get original dimensions of RAW image
Submitted by Lucas Beeler
Link to original bug (#718971)
Description
---- Reported by lucas@yorba.org 2013-03-15 13:11:00 -0700 ----
Original Redmine bug id: 6585
Original URL: http://redmine.yorba.org/issues/6585
Searchable id: yorba-bug-6585
Original author: Lucas Beeler
Original description:
Steps to reproduce:
Open the Extended Information pane and note that the "Original Dimensions:" field of some RAW images is blank. This isn't right. Photos should always have an original dimension. I'm emailing a photo that exhibits this problem to shotwell@yorba.org now...
Related issues:
- related to shotwell - 6594: [interim] Don't use embedded camera preview JPEG if it's ... (Fixed)
---- Additional Comments From shotwell-maint@gnome.bugs 2013-10-13 07:34:00 -0700 ----
History
Comment 1
Updated by Clinton Rogers 8 months ago
- Status changed from Open to Review
Part one - fall back to the pixbuf dimensions if there's absolutely nothing else.
As for part two, it looks like the image in question lists its real size in
the fields Exif.SubImage2.ImageWidth
and Exif.SubImage2.ImageLength
;
getting guidance from team lead about how to proceed.
Comment 2
Updated by Clinton Rogers 8 months ago
- Status changed from Review to Open
We're rejecting - the right way to fix this is #6594.
Comment 3
Updated by Jim Nelson 8 months ago
-
Assignee deleted (
<strike>
_Clinton Rogers_</strike>
)
Comment 4
Updated by Jim Nelson 8 months ago
- Target version changed from 0.14.0 to 0.15.0
Comment 5
Updated by Jim Nelson 8 months ago
- Assignee set to Clinton Rogers
#6594 is fixed now -- does that fix this as well, Clinton?
Comment 6
Updated by Clinton Rogers 8 months ago
@jim - not quite; there are some raw files whose true width and height aren't found in the usual spot (and, unfortunately, but perhaps predictably, this differs by manufacturer), and they either leave the fields we use for this unset, or put the size of the (first) preview there, so even with that fix in place, while the image will still display correctly, the fields will either be wrong or won't contain anything meaningful.
Comment 7
Updated by Jim Nelson 7 months ago
-
Assignee deleted (
<strike>
_Clinton Rogers_</strike>
)
The Original Dimensions are supposed to be the dimensions of the baseline image (rotated but otherwise untransformed), and so in the case of RAW this should be the developed image. That means this value can change when the developer changes.
As a rule, we should never be using dimensions from the metadata unless we're explicitly displaying them as metadata from the EXIF/IPTC/XMP/etc.
Comment 8
Updated by Jim Nelson 6 months ago
-
Target version deleted (
<strike>
_0.15.0_</strike>
)
Comment 9
Updated by Joe Bylund about 1 month ago
Jim,
I'm confused on this one. In my mind original dimensions of a raw image are the full resolution image, rotated. Shouldn't that mean the camera & Shotwell developer give the same dimensions, which would also be equal to the width/height from the exif of the raw?
-Joe
Comment 10
Updated by Jim Nelson about 1 month ago
There's a couple of issues at play.
First, metadata is easily manipulated by applications. We learned early on that some programs would alter these values in bad ways. We've also seen cameras not properly write metadata values out (although I don't think we've ever seen dimensions wrongly encoded.) The point is, we decided early on in Shotwell's development to treat metadata like user input, that is, with a bit of distrust. That's why we shouldn't use the metadata dimensions but rather store in the database the actual decoded dimensions and display that.
Second, with RAW, there are 2 - 3 "actual" dimensions, which confuses things further. The RAW-raw image (the pixels stored straight from the CCD) have "bleed-over" border pixels that may be cropped off by the camera when developing its JPEG. Cameras may not store a full-sized development inside the RAW image. There's also optimizations with JPEG that can be obtained by using pixel dimensions that are a factor of some power of 2 (I think 8) that cameras may use; either one of these will yield dimensions different than the RAW-raw image. And there's no guarantee that LibRaw will trim off the same border pixels as any particular camera. That's why we have potentially three different dimensions for a RAW image.
That's why we need to show the untransformed-but-rotated dimensions of the developed image (which may change based on the developer) and can't use the metadata values.
I realize this complicates what should be a simple issue, but RAW throws a lot of monkey wrenches into photo management, and this is one of them.
--- Bug imported by chaz@yorba.org 2013-11-25 21:59 UTC ---
This bug was previously known as bug 6585 at http://redmine.yorba.org/show_bug.cgi?id=6585
Unknown version " in product shotwell. Setting version to "!unspecified". Unknown milestone "unknown in product shotwell. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. Resolution set on an open status. Dropping resolution CC member joseph.bylund+shotwell@gmail.com does not have an account here