[KPhotoAlbum] More patches
Johannes Zarl-Zierl
johannes at zarl-zierl.at
Sat Aug 15 15:47:36 BST 2015
...resending because I was sending from the wrong address before..
On Sunday 09 August 2015 14:11:01 Robert Krawitz wrote:
> The logic is still not right. This structuring, in particular, is
> incorrect:
Yes, it is:
for(datum : data)
{
if (datum.key == *.LensModel)
{
value = datum.value;
break;
}
if (datum.key == *.LensIDNumber)
value = datum.value;
if (datum.key == *.LensType && value.isEmpty())
value = datum.value;
}
Ordering A:
Exif.LensType = "lt"
Exif.LensIDNumber = "id"
Exif.LensModel = "lm"
step 1:
datum.key == *.LensType
-> assign value = lt
step 2:
datum.key == *.LensIDNumber
-> assign value = id
step 3:
datum.key == *.LensModel
-> assign value = lm ; break loop
final value: lm
Ordering B:
Exif.LensType = "lt"
Exif.LensModel = "lm"
Exif.LensIDNumber = "id"
step 1:
datum.key == *.LensType
-> assign value = lt
step 2:
datum.key == *.LensModel
-> assign value = lm ; break loop
final value: lm
Ordering C:
Exif.LensIDNumber = "id"
Exif.LensModel = "lm"
Exif.LensType = "lt"
step 1:
datum.key == *.LensIDNumber
-> assign value = id
step 2:
datum.key == *.LensModel
-> assign value = lm ; break loop
final value: lm
Ordering D:
Exif.LensIDNumber = "id"
Exif.LensType = "lt"
Exif.LensModel = "lm"
step 1:
datum.key == *.LensIDNumber
-> assign value = id
step 2:
datum.key == *.LensType
-> no assignment
step 3:
datum.key == *.LensModel
-> assign value = lm ; break loop
final value: lm
Ordering E:
Exif.LensModel = "lm"
Exif.LensType = "lt"
Exif.LensIDNumber = "id"
step 1:
datum.key == *.LensModel
-> assign value = lm ; break loop
final value: lm
Ordering F:
Exif.LensModel = "lm"
Exif.LensIDNumber = "id"
Exif.LensType = "lt"
step 1:
datum.key == *.LensModel
-> assign value = lm ; break loop
final value: lm
> Also, the canonHack thing isn't the right way to go about it; other
> cameras may return bogus values. Those need to be detected and
> ignored.
How do you propose we detect arbitrary bogus values?
> Finally, Exif.CanonCS.Lens is a triple of elements. If it's converted
> directly to a string, it will look something like
>
> 135 18 1
If you call ExifDatum::toString() this is true. Calling
ExifDatum::print(ExifData) interpretes the value and gives something like
this:
"5.4 - 16.2 mm"
Cheers,
Johannes
More information about the Kphotoalbum
mailing list