Derive lens name from 0xA434 and 0xA433 if other means fail (#5157)

Implemented for
- Pentax
- Canon
- "Unknown"

Also constified `toString()` methods in `rtexif`.
This commit is contained in:
Flössie
2019-03-07 19:29:11 +01:00
parent a91acfacf2
commit 70475f781a
9 changed files with 156 additions and 104 deletions

View File

@@ -1767,7 +1767,7 @@ std::string Tag::nameToString (int i)
return buffer;
}
std::string Tag::valueToString ()
std::string Tag::valueToString () const
{
if (attrib && attrib->interpreter) {
@@ -3439,7 +3439,7 @@ short int int2_to_signed (short unsigned int i)
* <focal>-<focal>mm f/<aperture>-<aperture>
* NB: no space between separator '-'; no space between focal length and 'mm'
*/
bool extractLensInfo (std::string &fullname, double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal)
bool extractLensInfo (const std::string &fullname, double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal)
{
minFocal = 0.0;
maxFocal = 0.0;