klauspost / rawspeed

Raw Image Decoder Library
GNU Lesser General Public License v2.1
72 stars 20 forks source link

getCamera() with prefix-search issue #166

Closed LebedevRI closed 7 years ago

LebedevRI commented 7 years ago

I added that api in https://github.com/klauspost/rawspeed/commit/a45724ec3c201b67f5ff732317921c0feca878c6 and https://github.com/klauspost/rawspeed/commit/e1b5ccae3515773755621cee305170fa5ea63808. And now i have just discovered how it backfires. With raw file from https://redmine.darktable.org/issues/11354 from Canon EOS Rebel T6, which currently has broken alias, it matches to Canon EOS Rebel T6i. That happens because internally "make model mode" is a string, https://github.com/klauspost/rawspeed/blob/a45724ec3c201b67f5ff732317921c0feca878c6/RawSpeed/CameraMetaData.h#L37

@klauspost would you be ok if that is to be changed to something that stores all three elements separately, so thing faulty match can not happen?