Sony A7 II and LibRaw 0.19

When I am processing raw files using LibRaw I check that the camera is supported by looking it up in the array of supported cameras pointed to by LibRaw::cameraList(). For most cameras so far this has worked well so long as I use a case independent comparison (e.g. Fujifilm versus FujiFilm). I do this so that I can warn users that their camera isn't supported by LibRaw because the results may not be as expected.

I've just been sent a Raw file taken with a Sony A7 II where the EXIF data reports the camera as "Sony ILCE-7M2" which of course doesn't match "Sony A7 II" which is what's in the supported camera array.

Looking at the code where LibRaw is checking for the camera model internally it's clearly using "ILCE-7M2" as the comparison string rather than "A7 II".

Given this is there a "better way" to check that a camera is actually supported than binary seach of the supported camera array?

If I am using a good approach to checking camera support, please could I request that you add the ILCE name variants to the supported camera array for checking by external code. Maybe you could change the relevant strings to read (e.g.) "Sony ILCE-7M2 / Sony A7 II") in a similar way to how you handled some of the Canon cameras?

Thanks
David

Forums: 

Dear Sir:

Dear Sir:

Checking camera support against the list of names isn't going to provide a definitive "not supported" answer, because, for example, not all the camera aliases are known (for example, Leica C-Lux can have CAM-DC25 as a name in EXIF). We add such aliases as we discover them.

Unfortunately, we don't have a better solution at the moment, and it's not easy to come up with a one.

You are absolutely right re Sony, we will take care of this, thank you for your suggestion.

--
Iliah Borg

Many thanks - probably better

Many thanks - probably better to use "Sony ILCE-7M2 / A7 II" no point in replicating the Sony word!

A thought just occurred to me - by the time you have completed the unpack() operation, does the LibRaw code know if the camera is/isn't supported. If it does know that, it would be simple to add a new function:

bool LibRaw::isSupported()

method that a client application can call after calling unpack() ...

Thanks again
David

David Partridge

> by the time you have

> by the time you have completed the unpack() operation, does the LibRaw code know if the camera is/isn't supported

The philosophy is to try to support those cameras that are "not listed" too, even if the support is limited. In a lot of cases a file coming from a non-listed camera can be unpacked, but the support is limited. IsSupported implies yes or no as an answer. Grau, teurer Freund, ist alle Theorie, Und grün des Lebens goldner Baum.

--
Iliah Borg

Oh yes absolutely so, I

Oh yes absolutely so, I fully understand that! That's why I only issue a warning and allow the user to continue. It's more a case of did you recognise the camera or not!

I love the (Goethe?) quote too!

David Partridge

Goethe ...

... Faust 1, Chapter 7, Mephistopheles to a student on the topic of medicine (the student believes), but actually about how to "deal with women" (what Mephistopheles actually says) ...