On 20 Dez., 18:47, "T. Modes" <[email protected]> wrote: > The tag LensModel is a string and can therefore used for images of all > makers (don't mix this with the tag with same name in the Canon > makernotes). > Maybe some newer camera (compatible with exif version 2.3) do already > write this tag. > I modified the code to read first this new tag, if this is not found > then it should use the lens from the maker notes. > > So you can use > exiftool -LensModel=YOUR LENS NAME image > to patch the image file.
Thomas, the new code doesn't work for me. Hugin crashes as soon as I open a project or try to load an image. Console output tells me that: terminate called after throwing an instance of 'Exiv2::BasicError<char>' what(): Ungültiger Feldname oder IFD-ID `LensModel', IFD-ID 5 Abgebrochen This is correct. There is no such tag. In SrcPanoImage.cpp I found (in line 375): if(getExiv2Value(exifData,"Exif.Photo.LensModel",lensName)) ... the tag which should be read, in my case, is Exif.Canon.LensModel, and when I modify the code to if(getExiv2Value(exifData,"Exif.Canon.LensModel",lensName)) ... it works fine for me and the lens name I've patched into the EXIF data shows correctly. But that is me, using a Canon Camera. Nevertheless, I suppose that the important bit is that "Exif.Canon.LensModel" a valid tag identifier string recognized by exiv2, and if the image isn't done with a Canon camera, I suppose it'll just not find any value for it. Maybe there are analogous tags in the maker-specific parts for other manufacturers? Omitting the prefixes, i.e. only look for "LensModel" instead of the fully qualified string, doesn't work (crashes as well). Is the Samyang 8mm already in the database? And if so, what is the string used to identify it? Kay -- You received this message because you are subscribed to the Google Groups "Hugin and other free panoramic software" group. A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hugin-ptx
