diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index a0ab14f7a..3d0505772 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -6920,6 +6920,7 @@ void CLASS identify() fseek (ifp, 100, SEEK_SET); parse_tiff (data_offset = get4()); parse_tiff (thumb_offset+12); +/*RT*/ exif_base = thumb_offset+12; apply_tiff(); } else if (!memcmp (head,"RIFF",4)) { fseek (ifp, 0, SEEK_SET); diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index b93dc93f5..645e5e6d9 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -219,40 +219,24 @@ void ImageData::extractInfo () { } } else if (mnote && !make.compare (0, 5, "Canon")) { - bool lensOk = false; - if (mnote->getTag ("LensType")) { - std::string ldata = mnote->getTag ("LensType")->valueToString (); + int found=false; + // canon EXIF have a string for lens model + rtexif::Tag *lt = mnote->getTag("LensType"); + if ( lt ) { + std::string ldata = lt->valueToString (); if (ldata.size()>1) { - lens = ldata; - lensOk = true; + found=true; + lens = "Canon " + ldata; } } - if (!lensOk && mnote->getTag ("CanonCameraSettings")) { - std::string ccs = mnote->getTag ("CanonCameraSettings")->valueToString (); - int i = ccs.find ("LongFocal = "); - double a = 0; - if (i!=ccs.npos) { - i += 12; - int j = i; - while (j!=ccs.npos && ccs[j]!='\n' && ccs[j]!=' ') j++; - a = atof (ccs.substr (i, j-i).c_str()); + if( !found ){ + lt = mnote->findTag("LensID"); + if ( lt ) { + std::string ldata = lt->valueToString (); + if (ldata.size()>1) { + lens = ldata; + } } - i = ccs.find ("ShortFocal = "); - double b = 0; - if (i!=ccs.npos) { - i += 13; - int j = i; - while (j!=ccs.npos && ccs[j]!='\n' && ccs[j]!=' ') j++; - b = atof (ccs.substr (i, j-i).c_str()); - } - if (a>0 && b>0) { - std::ostringstream str; - if (a==b) - str << "Unknown " << a << "mm"; - else - str << "Unknown " << b << "-" << a << "mm"; - lens = str.str(); - } } } else if (mnote && !make.compare (0, 6, "PENTAX")) { diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 4cc5fd3e5..6770e5d3f 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -743,8 +743,8 @@ if (keyFile.has_group ("RAW")) { if (keyFile.has_key ("RAW", "DarkFrame")) raw.dark_frame = keyFile.get_string ("RAW", "DarkFrame" ); if (keyFile.has_key ("RAW", "DarkFrameAuto")) raw.df_autoselect = keyFile.get_boolean ("RAW", "DarkFrameAuto" ); if (keyFile.has_key ("RAW", "CA")) raw.ca_autocorrect = keyFile.get_boolean ("RAW", "CA" ); - if (keyFile.has_key ("RAW", "CARed")) raw.cared = keyFile.get_boolean ("RAW", "CARed" ); - if (keyFile.has_key ("RAW", "CABlue")) raw.cablue = keyFile.get_boolean ("RAW", "CABlue" ); + if (keyFile.has_key ("RAW", "CARed")) raw.cared = keyFile.get_double ("RAW", "CARed" ); + if (keyFile.has_key ("RAW", "CABlue")) raw.cablue = keyFile.get_double ("RAW", "CABlue" ); if (keyFile.has_key ("RAW", "HotDeadPixels")) raw.hotdeadpix_filt = keyFile.get_boolean ("RAW", "HotDeadPixels" ); if (keyFile.has_key ("RAW", "LineDenoise")) raw.linenoise = keyFile.get_integer ("RAW", "LineDenoise" ); if (keyFile.has_key ("RAW", "GreenEqThreshold")) raw.greenthresh= keyFile.get_integer ("RAW", "GreenEqThreshold"); @@ -831,128 +831,128 @@ bool operator==(const IPTCPair& a, const IPTCPair& b) { } bool ProcParams::operator== (const ProcParams& other) { - return - toneCurve.curve == other.toneCurve.curve - && toneCurve.brightness == other.toneCurve.brightness - && toneCurve.black == other.toneCurve.black - && toneCurve.contrast == other.toneCurve.contrast + return + toneCurve.curve == other.toneCurve.curve + && toneCurve.brightness == other.toneCurve.brightness + && toneCurve.black == other.toneCurve.black + && toneCurve.contrast == other.toneCurve.contrast && toneCurve.saturation == other.toneCurve.saturation - && toneCurve.shcompr == other.toneCurve.shcompr - && toneCurve.hlcompr == other.toneCurve.hlcompr - && toneCurve.autoexp == other.toneCurve.autoexp - && toneCurve.clip == other.toneCurve.clip - && toneCurve.expcomp == other.toneCurve.expcomp - && labCurve.lcurve == other.labCurve.lcurve - && labCurve.acurve == other.labCurve.acurve - && labCurve.bcurve == other.labCurve.bcurve - && labCurve.brightness == other.labCurve.brightness - && labCurve.contrast == other.labCurve.contrast + && toneCurve.shcompr == other.toneCurve.shcompr + && toneCurve.hlcompr == other.toneCurve.hlcompr + && toneCurve.autoexp == other.toneCurve.autoexp + && toneCurve.clip == other.toneCurve.clip + && toneCurve.expcomp == other.toneCurve.expcomp + && labCurve.lcurve == other.labCurve.lcurve + && labCurve.acurve == other.labCurve.acurve + && labCurve.bcurve == other.labCurve.bcurve + && labCurve.brightness == other.labCurve.brightness + && labCurve.contrast == other.labCurve.contrast && labCurve.saturation == other.labCurve.saturation - && sharpening.enabled == other.sharpening.enabled - && sharpening.radius == other.sharpening.radius - && sharpening.amount == other.sharpening.amount - && sharpening.threshold == other.sharpening.threshold - && sharpening.edgesonly == other.sharpening.edgesonly - && sharpening.edges_radius == other.sharpening.edges_radius - && sharpening.edges_tolerance == other.sharpening.edges_tolerance - && sharpening.halocontrol == other.sharpening.halocontrol - && sharpening.halocontrol_amount== other.sharpening.halocontrol_amount - && sharpening.method == other.sharpening.method - && sharpening.deconvamount == other.sharpening.deconvamount - && sharpening.deconvradius == other.sharpening.deconvradius - && sharpening.deconviter == other.sharpening.deconviter - && sharpening.deconvdamping == other.sharpening.deconvdamping - && colorBoost.amount == other.colorBoost.amount - && colorBoost.avoidclip == other.colorBoost.avoidclip - && colorBoost.enable_saturationlimiter == other.colorBoost.enable_saturationlimiter - && colorBoost.saturationlimit == other.colorBoost.saturationlimit - && wb.method == other.wb.method - && wb.green == other.wb.green - && wb.temperature == other.wb.temperature - && colorShift.a == other.colorShift.a - && colorShift.b == other.colorShift.b - && impulseDenoise.enabled == other.impulseDenoise.enabled - && impulseDenoise.thresh == other.impulseDenoise.thresh - && dirpyrDenoise.enabled == other.dirpyrDenoise.enabled - && dirpyrDenoise.luma == other.dirpyrDenoise.luma - && dirpyrDenoise.chroma == other.dirpyrDenoise.chroma - && dirpyrDenoise.gamma == other.dirpyrDenoise.gamma - && defringe.enabled == other.defringe.enabled - && defringe.radius == other.defringe.radius - && defringe.threshold == other.defringe.threshold - && lumaDenoise.enabled == other.lumaDenoise.enabled - && lumaDenoise.radius == other.lumaDenoise.radius - && lumaDenoise.edgetolerance == other.lumaDenoise.edgetolerance - && colorDenoise.enabled == other.colorDenoise.enabled - && colorDenoise.radius == other.colorDenoise.radius - && colorDenoise.edgetolerance == other.colorDenoise.edgetolerance - && colorDenoise.edgesensitive == other.colorDenoise.edgesensitive - && sh.enabled == other.sh.enabled - && sh.hq == other.sh.hq - && sh.highlights == other.sh.highlights - && sh.htonalwidth == other.sh.htonalwidth - && sh.shadows == other.sh.shadows - && sh.stonalwidth == other.sh.stonalwidth - && sh.localcontrast == other.sh.localcontrast - && sh.radius == other.sh.radius - && crop.enabled == other.crop.enabled - && crop.x == other.crop.x - && crop.y == other.crop.y - && crop.w == other.crop.w - && crop.h == other.crop.h - && crop.fixratio == other.crop.fixratio - && crop.ratio == other.crop.ratio - && crop.orientation == other.crop.orientation - && crop.guide == other.crop.guide - && coarse.rotate == other.coarse.rotate - && coarse.hflip == other.coarse.hflip - && coarse.vflip == other.coarse.vflip - && rotate.degree == other.rotate.degree - && commonTrans.autofill == other.commonTrans.autofill - && distortion.uselensfun == other.distortion.uselensfun - && distortion.amount == other.distortion.amount - && perspective.horizontal == other.perspective.horizontal - && perspective.vertical == other.perspective.vertical - && cacorrection.red == other.cacorrection.red - && cacorrection.blue == other.cacorrection.blue - && vignetting.amount == other.vignetting.amount - && vignetting.radius == other.vignetting.radius - && vignetting.strength == other.vignetting.strength - && vignetting.centerX == other.vignetting.centerX - && vignetting.centerY == other.vignetting.centerY - && !memcmp (&chmixer.red, &other.chmixer.red, 3*sizeof(int)) - && !memcmp (&chmixer.green, &other.chmixer.green, 3*sizeof(int)) - && !memcmp (&chmixer.blue, &other.chmixer.blue, 3*sizeof(int)) - && hlrecovery.enabled == other.hlrecovery.enabled - && hlrecovery.method == other.hlrecovery.method - && resize.scale == other.resize.scale + && sharpening.enabled == other.sharpening.enabled + && sharpening.radius == other.sharpening.radius + && sharpening.amount == other.sharpening.amount + && sharpening.threshold == other.sharpening.threshold + && sharpening.edgesonly == other.sharpening.edgesonly + && sharpening.edges_radius == other.sharpening.edges_radius + && sharpening.edges_tolerance == other.sharpening.edges_tolerance + && sharpening.halocontrol == other.sharpening.halocontrol + && sharpening.halocontrol_amount== other.sharpening.halocontrol_amount + && sharpening.method == other.sharpening.method + && sharpening.deconvamount == other.sharpening.deconvamount + && sharpening.deconvradius == other.sharpening.deconvradius + && sharpening.deconviter == other.sharpening.deconviter + && sharpening.deconvdamping == other.sharpening.deconvdamping + && colorBoost.amount == other.colorBoost.amount + && colorBoost.avoidclip == other.colorBoost.avoidclip + && colorBoost.enable_saturationlimiter == other.colorBoost.enable_saturationlimiter + && colorBoost.saturationlimit == other.colorBoost.saturationlimit + && wb.method == other.wb.method + && wb.green == other.wb.green + && wb.temperature == other.wb.temperature + && colorShift.a == other.colorShift.a + && colorShift.b == other.colorShift.b + && impulseDenoise.enabled == other.impulseDenoise.enabled + && impulseDenoise.thresh == other.impulseDenoise.thresh + && dirpyrDenoise.enabled == other.dirpyrDenoise.enabled + && dirpyrDenoise.luma == other.dirpyrDenoise.luma + && dirpyrDenoise.chroma == other.dirpyrDenoise.chroma + && dirpyrDenoise.gamma == other.dirpyrDenoise.gamma + && defringe.enabled == other.defringe.enabled + && defringe.radius == other.defringe.radius + && defringe.threshold == other.defringe.threshold + && lumaDenoise.enabled == other.lumaDenoise.enabled + && lumaDenoise.radius == other.lumaDenoise.radius + && lumaDenoise.edgetolerance == other.lumaDenoise.edgetolerance + && colorDenoise.enabled == other.colorDenoise.enabled + && colorDenoise.radius == other.colorDenoise.radius + && colorDenoise.edgetolerance == other.colorDenoise.edgetolerance + && colorDenoise.edgesensitive == other.colorDenoise.edgesensitive + && sh.enabled == other.sh.enabled + && sh.hq == other.sh.hq + && sh.highlights == other.sh.highlights + && sh.htonalwidth == other.sh.htonalwidth + && sh.shadows == other.sh.shadows + && sh.stonalwidth == other.sh.stonalwidth + && sh.localcontrast == other.sh.localcontrast + && sh.radius == other.sh.radius + && crop.enabled == other.crop.enabled + && crop.x == other.crop.x + && crop.y == other.crop.y + && crop.w == other.crop.w + && crop.h == other.crop.h + && crop.fixratio == other.crop.fixratio + && crop.ratio == other.crop.ratio + && crop.orientation == other.crop.orientation + && crop.guide == other.crop.guide + && coarse.rotate == other.coarse.rotate + && coarse.hflip == other.coarse.hflip + && coarse.vflip == other.coarse.vflip + && rotate.degree == other.rotate.degree + && commonTrans.autofill == other.commonTrans.autofill + && distortion.uselensfun == other.distortion.uselensfun + && distortion.amount == other.distortion.amount + && perspective.horizontal == other.perspective.horizontal + && perspective.vertical == other.perspective.vertical + && cacorrection.red == other.cacorrection.red + && cacorrection.blue == other.cacorrection.blue + && vignetting.amount == other.vignetting.amount + && vignetting.radius == other.vignetting.radius + && vignetting.strength == other.vignetting.strength + && vignetting.centerX == other.vignetting.centerX + && vignetting.centerY == other.vignetting.centerY + && !memcmp (&chmixer.red, &other.chmixer.red, 3*sizeof(int)) + && !memcmp (&chmixer.green, &other.chmixer.green, 3*sizeof(int)) + && !memcmp (&chmixer.blue, &other.chmixer.blue, 3*sizeof(int)) + && hlrecovery.enabled == other.hlrecovery.enabled + && hlrecovery.method == other.hlrecovery.method + && resize.scale == other.resize.scale && resize.appliesTo == other.resize.appliesTo - && resize.method == other.resize.method - && resize.dataspec == other.resize.dataspec - && resize.width == other.resize.width - && resize.height == other.resize.height - && raw.dark_frame == other.raw.dark_frame - && raw.df_autoselect == other.raw.df_autoselect - && raw.dcb_enhance == other.raw.dcb_enhance - && raw.dcb_iterations == other.raw.dcb_iterations - && raw.ccSteps == other.raw.ccSteps - && raw.ca_autocorrect == other.raw.ca_autocorrect - && raw.cared == other.raw.cared - && raw.cablue == other.raw.cablue - && raw.hotdeadpix_filt == other.raw.hotdeadpix_filt - && raw.dmethod == other.raw.dmethod - && raw.greenthresh == other.raw.greenthresh - && raw.linenoise == other.raw.linenoise - && icm.input == other.icm.input - && icm.gammaOnInput == other.icm.gammaOnInput - && icm.working == other.icm.working - && icm.output == other.icm.output - && equalizer == other.equalizer - && dirpyrequalizer == other.dirpyrequalizer - && hsvequalizer == other.hsvequalizer - && exif==other.exif - && iptc==other.iptc; - } + && resize.method == other.resize.method + && resize.dataspec == other.resize.dataspec + && resize.width == other.resize.width + && resize.height == other.resize.height + && raw.dark_frame == other.raw.dark_frame + && raw.df_autoselect == other.raw.df_autoselect + && raw.dcb_enhance == other.raw.dcb_enhance + && raw.dcb_iterations == other.raw.dcb_iterations + && raw.ccSteps == other.raw.ccSteps + && raw.ca_autocorrect == other.raw.ca_autocorrect + && raw.cared == other.raw.cared + && raw.cablue == other.raw.cablue + && raw.hotdeadpix_filt == other.raw.hotdeadpix_filt + && raw.dmethod == other.raw.dmethod + && raw.greenthresh == other.raw.greenthresh + && raw.linenoise == other.raw.linenoise + && icm.input == other.icm.input + && icm.gammaOnInput == other.icm.gammaOnInput + && icm.working == other.icm.working + && icm.output == other.icm.output + && equalizer == other.equalizer + && dirpyrequalizer == other.dirpyrequalizer + && hsvequalizer == other.hsvequalizer + && exif==other.exif + && iptc==other.iptc; +} bool ProcParams::operator!= (const ProcParams& other) { diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 7ef889652..8e735296e 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -30,7 +30,6 @@ #include - #ifdef _OPENMP #include #endif @@ -235,38 +234,74 @@ void RawImageSource::getImage (ColorTemp ctemp, int tran, Image16* image, Previe imwidth = maximwidth; if (!fuji && imheight>maximheight) imheight = maximheight; - - // render the requested image part - unsigned short* red = new unsigned short[imwidth]; - unsigned short* grn = new unsigned short[imwidth]; - unsigned short* blue = new unsigned short[imwidth]; + int maxx=this->W,maxy=this->H,skip=pp.skip; - for (int i=sy1,ix=0; ixisBayer()) { - for (int j=0,jx=sx1; jred[i][jx]); - grn[j] = CLIP(gm*this->green[i][jx]); - blue[j] = CLIP(bm*this->blue[i][jx]); + if (sx1+skip*imwidth>maxx) imwidth --; // very hard to fix this situation without an 'if' in the loop. + double area=skip*skip; + rm/=area; + gm/=area; + bm/=area; + +#ifdef _OPENMP +#pragma omp parallel + { +#endif + // render the requested image part + unsigned short* line_red = new unsigned short [imwidth]; + unsigned short* line_grn = new unsigned short [imwidth]; + unsigned short* line_blue = new unsigned short [imwidth]; + + + +#ifdef _OPENMP +#pragma omp for +#endif + for (int ix=0; ixmaxy-skip) i=maxy-skip; // avoid trouble + if (ri->isBayer()) { + for (int j=0,jx=sx1; jwidth%2==0) || ((tran & TR_ROT) == TR_R180 && image->height%2+image->width%2==1) || ((tran & TR_ROT) == TR_R270 && image->height%2==0); // first row @@ -2395,99 +2430,6 @@ void RawImageSource::vng4_demosaic () { #define LIM(x,min,max) MAX(min,MIN(x,max)) #define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) -/* - Patterned Pixel Grouping Interpolation by Alain Desbiolles -*/ -void RawImageSource::ppg_demosaic() -{ - int width=W, height=H; - int dir[5] = { 1, width, -1, -width, 1 }; - int row, col, diff[2], guess[2], c, d, i; - ushort (*pix)[4]; - - ushort (*image)[4]; - int colors = 3; - - if (plistener) { - plistener->setProgressStr ("Demosaicing..."); - plistener->setProgress (0.0); - } - - image = (ushort (*)[4]) calloc (H*W, sizeof *image); - for (int ii=0; ii 0; i++) { - guess[i] = (pix[-d][1] + pix[0][c] + pix[d][1]) * 2 - - pix[-2*d][c] - pix[2*d][c]; - diff[i] = ( ABS(pix[-2*d][c] - pix[ 0][c]) + - ABS(pix[ 2*d][c] - pix[ 0][c]) + - ABS(pix[ -d][1] - pix[ d][1]) ) * 3 + - ( ABS(pix[ 3*d][1] - pix[ d][1]) + - ABS(pix[-3*d][1] - pix[-d][1]) ) * 2; - } - d = dir[i = diff[0] > diff[1]]; - pix[0][1] = ULIM(guess[i] >> 2, pix[d][1], pix[-d][1]); - } - if(plistener) plistener->setProgress(0.33*row/(height-3)); - } -/* Calculate red and blue for each green pixel: */ - for (row=1; row < height-1; row++) { - for (col=1+(FC(row,2) & 1), c=FC(row,col+1); col < width-1; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]) > 0; c=2-c, i++) - pix[0][c] = CLIP((pix[-d][c] + pix[d][c] + 2*pix[0][1] - - pix[-d][1] - pix[d][1]) >> 1); - } - if(plistener) plistener->setProgress(0.33 + 0.33*row/(height-1)); - } -/* Calculate blue for red pixels and vice versa: */ - for (row=1; row < height-1; row++) { - for (col=1+(FC(row,1) & 1), c=2-FC(row,col); col < width-1; col+=2) { - pix = image + row*width+col; - for (i=0; (d=dir[i]+dir[i+1]) > 0; i++) { - diff[i] = ABS(pix[-d][c] - pix[d][c]) + - ABS(pix[-d][1] - pix[0][1]) + - ABS(pix[ d][1] - pix[0][1]); - guess[i] = pix[-d][c] + pix[d][c] + 2*pix[0][1] - - pix[-d][1] - pix[d][1]; - } - if (diff[0] != diff[1]) - pix[0][c] = CLIP(guess[diff[0] > diff[1]] >> 1); - else - pix[0][c] = CLIP((guess[0]+guess[1]) >> 2); - } - if(plistener) plistener->setProgress(0.67 + 0.33*row/(height-1)); - } - - red = new unsigned short*[H]; - for (int i=0; iget_FujiWidth() != 0){ + if (fixwh == 1) // fix height, scale width + skip = ((ri->get_height() - ri->get_FujiWidth()) / sqrt(0.5) - firstgreen - 1) / h; + else + skip = (ri->get_FujiWidth()/sqrt(0.5) - firstgreen - 1) / w; + }else{ if (fixwh == 1) // fix height, scale width skip = (ri->get_height() - firstgreen - 1) / h; else skip = (ri->get_width() - firstgreen - 1) / w; + } if (skip % 2) skip--; if (skip < 1) @@ -362,6 +369,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati } delete tmpImg; tmpImg = fImg; + tmpw = wide; + tmph = high; } if (fixwh == 1) // fix height, scale width @@ -943,10 +952,10 @@ bool Thumbnail::writeImage (const Glib::ustring& fname, int format) { // If it's not gamma corrected (usually a JPG) we take the normal maximum max=0; - for (int row=0; rowheight; row++) - for (int col=0; colwidth; col++) { - if (thumbImg->r[row][col]>max) max = thumbImg->r[row][col]; - if (thumbImg->g[row][col]>max) max = thumbImg->g[row][col]; + for (int row=0; rowheight; row++) + for (int col=0; colwidth; col++) { + if (thumbImg->r[row][col]>max) max = thumbImg->r[row][col]; + if (thumbImg->g[row][col]>max) max = thumbImg->g[row][col]; if (thumbImg->b[row][col]>max) max = thumbImg->b[row][col]; } diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index 695814790..e35154bdd 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -157,72 +157,97 @@ void StdImageSource::getImage_ (ColorTemp ctemp, int tran, Image16* image, Previ int sx1, sy1, sx2, sy2; transform (pp, tran, sx1, sy1, sx2, sy2); - +/* the sizes are already known: image->width and image->height int imwidth = (sx2 - sx1) / pp.skip + ((sx2 - sx1) % pp.skip > 0); int imheight = (sy2 - sy1) / pp.skip + ((sy2 - sy1) % pp.skip > 0); - - int istart = sy1, iend = sy2, ix = 0; - if (first) { - iend = istart; - while (iend<(sy1+sy2)/2) { - iend+=pp.skip; - } - } - else { - while (istart<(sy1+sy2)/2) { - ix++; - istart+=pp.skip; - } - } - +*/ + int imwidth=image->width,imheight=image->height; + int istart = sy1; + int maxx=img->width,maxy=img->height; int mtran = tran; int skip = pp.skip; - unsigned short* red = new unsigned short[imwidth]; - unsigned short* grn = new unsigned short[imwidth]; - unsigned short* blue = new unsigned short[imwidth]; - - for (int i=istart; ir[i][jx]; - grn[j] = img->g[i][jx]; - blue[j] = img->b[i][jx]; - } + if ((sx1 + skip*imwidth)>maxx) imwidth -- ; // we have a boundary condition that can cause errors + + // improve speed by integrating the area division into the multipliers + // switched to using ints for the red/green/blue channel buffer. + // Incidentally this improves accuracy too. + double area=skip*skip; + rm/=area; + gm/=area; + bm/=area; + +#ifdef _OPENMP +#pragma omp parallel + { +#endif + int *line_red = new int[imwidth]; + int *line_green = new int[imwidth]; + int *line_blue = new int[imwidth]; + +#ifdef _OPENMP +#pragma omp for +#endif + for (int ix=0;ixmaxy-skip) i=maxy-skip; // avoid trouble + for (int j=0,jx=sx1; jr[i+m][jx+n]); + gtot += CurveFactory::igamma_srgb(img->g[i+m][jx+n]); + btot += CurveFactory::igamma_srgb(img->b[i+m][jx+n]); + } + line_red[j] = rtot; + line_green[j] = gtot; + line_blue[j] = btot; + } + +// covert back to gamma and clip +#define GCLIP( x ) CurveFactory::gamma_srgb(CLIP(x)) + // if (hrp.enabled) // hlRecovery (red, grn, blue, i, sx1, sx2, pp.skip); if ((mtran & TR_ROT) == TR_R180) for (int j=0; jr[imheight-1-ix][imwidth-1-j] = (int)CLIP(rm*red[j]); - image->g[imheight-1-ix][imwidth-1-j] = (int)CLIP(gm*grn[j]); - image->b[imheight-1-ix][imwidth-1-j] = (int)CLIP(bm*blue[j]); + image->r[imheight-1-ix][imwidth-1-j] = (int)GCLIP(rm*line_red[j]); + image->g[imheight-1-ix][imwidth-1-j] = (int)GCLIP(gm*line_green[j]); + image->b[imheight-1-ix][imwidth-1-j] = (int)GCLIP(bm*line_blue[j]); } else if ((mtran & TR_ROT) == TR_R90) for (int j=0,jx=sx1; jr[j][imheight-1-ix] = (int)CLIP(rm*red[j]); - image->g[j][imheight-1-ix] = (int)CLIP(gm*grn[j]); - image->b[j][imheight-1-ix] = (int)CLIP(bm*blue[j]); + image->r[j][imheight-1-ix] = (int)GCLIP(rm*line_red[j]); + image->g[j][imheight-1-ix] = (int)GCLIP(gm*line_green[j]); + image->b[j][imheight-1-ix] = (int)GCLIP(bm*line_blue[j]); } else if ((mtran & TR_ROT) == TR_R270) for (int j=0,jx=sx1; jr[imwidth-1-j][ix] = (int)CLIP(rm*red[j]); - image->g[imwidth-1-j][ix] = (int)CLIP(gm*grn[j]); - image->b[imwidth-1-j][ix] = (int)CLIP(bm*blue[j]); + image->r[imwidth-1-j][ix] = (int)GCLIP(rm*line_red[j]); + image->g[imwidth-1-j][ix] = (int)GCLIP(gm*line_green[j]); + image->b[imwidth-1-j][ix] = (int)GCLIP(bm*line_blue[j]); } else { for (int j=0,jx=sx1; jr[ix][j] = (int)CLIP(rm*red[j]); - image->g[ix][j] = (int)CLIP(gm*grn[j]); - image->b[ix][j] = (int)CLIP(bm*blue[j]); + image->r[ix][j] = (int)GCLIP(rm*line_red[j]); + image->g[ix][j] = (int)GCLIP(gm*line_green[j]); + image->b[ix][j] = (int)GCLIP(bm*line_blue[j]); } } } - - delete [] red; - delete [] grn; - delete [] blue; +#undef GCLIP + delete [] line_red; + delete [] line_green; + delete [] line_blue; +#ifdef _OPENMP + } +#endif } + void StdImageSource::getImage (ColorTemp ctemp, int tran, Image16* image, PreviewProps pp, HRecParams hrp, ColorManagementParams cmp, RAWParams raw) { MyTime t1,t2; @@ -231,16 +256,8 @@ void StdImageSource::getImage (ColorTemp ctemp, int tran, Image16* image, Previe // if (hrp.enabled==true && hrmap[0]==NULL) // updateHLRecoveryMap (); - if (settings->dualThreadEnabled) { - Glib::Thread *thread1 = Glib::Thread::create(sigc::bind(sigc::mem_fun(*this, &StdImageSource::getImage_), ctemp, tran, image, pp, true, hrp), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); - Glib::Thread *thread2 = Glib::Thread::create(sigc::bind(sigc::mem_fun(*this, &StdImageSource::getImage_), ctemp, tran, image, pp, false, hrp), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); - thread1->join (); - thread2->join (); - } - else { - getImage_ (ctemp, tran, image, pp, true, hrp); - getImage_ (ctemp, tran, image, pp, false, hrp); - } + // the code will use OpenMP as of now. + getImage_ (ctemp, tran, image, pp, true, hrp); colorSpaceConversion (image, cmp, embProfile); diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index a1fa3c99c..5c27cb56b 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -28,6 +28,18 @@ namespace rtexif { +class CAOnOffInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) + { + int n = t->toInt(); + if( n==0 ) return "OFF"; + else if( n == 1) return "ON"; + else return "undef"; + } +}; +CAOnOffInterpreter caOnOffInterpreter; + class CAIntSerNumInterpreter : public Interpreter { public: CAIntSerNumInterpreter () {} @@ -36,647 +48,992 @@ class CAIntSerNumInterpreter : public Interpreter { CAIntSerNumInterpreter caIntSerNumInterpreter; -class CAFocalLengthInterpreter : public Interpreter { +class CAApertureInterpreter : public Interpreter { public: - CAFocalLengthInterpreter () {} + CAApertureInterpreter () {} virtual std::string toString (Tag* t) { - std::ostringstream str; - str << "FocalType = " << t->toInt(0,SHORT) << std::endl; - str << "FocalLength = " << t->toInt(2,SHORT) << std::endl; - str << "FocalPlaneXSize = " << t->toInt(4,SHORT) << std::endl; - str << "FocalPlaneYSize = " << t->toInt(6,SHORT); - return str.str(); + char buffer[32]; + sprintf (buffer, "%0.1f", pow(2.0, t->toDouble()/64.0)); + return buffer; } }; -CAFocalLengthInterpreter caFocalLengthInterpreter; +CAApertureInterpreter caApertureInterpreter; +class CAMacroModeInterpreter : public ChoiceInterpreter { +public: + CAMacroModeInterpreter(){ + choices[1] = "Macro"; + choices[2] = "Normal"; + } +}; +CAMacroModeInterpreter caMacroModeInterpreter; -class CACameraSettingsInterpreter : public Interpreter { - std::map machoices; - std::map qlchoices; - std::map fmchoices; - std::map cdchoices; - std::map fochoices; - std::map rmchoices; - std::map ischoices; - std::map mmchoices; - std::map dzchoices; - std::map emchoices; - std::map frchoices; - std::map afchoices; - std::map exchoices; - std::map fcchoices; - std::map aechoices; - std::map stchoices; - std::map smchoices; - std::map pechoices; - std::map mfchoices; - std::map choices; +class CASelfTimerInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + int sec = t->toInt(0,SHORT); + if( !sec ) return "OFF"; + char buffer[32]; + sprintf (buffer, "%0.1fs %s", sec/10., sec&0x4000?",Custom":""); + return buffer; + } +}; +CASelfTimerInterpreter caSelfTimerInterpreter; + +class CAQualityInterpreter : public ChoiceInterpreter { +public: + CAQualityInterpreter(){ + choices[1] = "Economy"; + choices[2] = "Normal"; + choices[3] = "Fine"; + choices[4] = "RAW"; + choices[5] = "Superfine"; + } +}; +CAQualityInterpreter caQualityInterpreter; + +class CAFlashModeInterpreter : public ChoiceInterpreter { +public: + CAFlashModeInterpreter(){ + choices[0] = "Off"; + choices[1] = "Auto"; + choices[2] = "On"; + choices[3] = "Red-eye reduction"; + choices[4] = "Slow-sync"; + choices[5] = "Red-eye reduction (Auto)"; + choices[6] = "Red-eye reduction (On)"; + choices[16]= "External flash"; + } +}; +CAFlashModeInterpreter caFlashModeInterpreter; + +class CAContinuousDriveInterpreter : public ChoiceInterpreter { +public: + CAContinuousDriveInterpreter(){ + choices[0] = "Single"; + choices[1] = "Continuous"; + choices[2] = "Movie"; + choices[3] = "Continuous, Speed Priority"; + choices[4] = "Continuous, Low"; + choices[5] = "Continuous, High"; + } +}; +CAContinuousDriveInterpreter caContinuousDriveInterpreter; + +class CAFocusModeInterpreter : public ChoiceInterpreter { +public: + CAFocusModeInterpreter(){ + choices[0] = "One-shot AF"; + choices[1] = "AI Servo AF"; + choices[2] = "AI Focus AF"; + choices[3] = "Manual Focus"; + choices[4] = "Single"; + choices[5] = "Continuous"; + choices[6] = "Manual Focus"; + choices[16] = "Pan Focus"; + } +}; +CAFocusModeInterpreter caFocusModeInterpreter; + +class CARecordModeInterpreter : public ChoiceInterpreter { +public: + CARecordModeInterpreter(){ + choices[1] = "JPEG"; + choices[2] = "CRW+THM"; + choices[3] = "AVI+THM"; + choices[4] = "TIF"; + choices[5] = "TIF+JPEG"; + choices[6] = "CR2"; + choices[7] = "CR2+JPEG"; + choices[9] = "Video"; + } +}; +CARecordModeInterpreter caRecordModeInterpreter; + +class CAImageSizeInterpreter : public ChoiceInterpreter { +public: + CAImageSizeInterpreter (){ + choices[0] = "Large"; + choices[1] = "Medium"; + choices[2] = "Small"; + choices[5] = "Medium 1"; + choices[6] = "Medium 2"; + choices[7] = "Medium 3"; + choices[8] = "Postcard"; + choices[9] = "Widescreen"; + choices[10] = "Medium Widescreen"; + choices[128] = "640x480 Movie"; + choices[129] = "Medium Movie"; + choices[130] = "Small Movie"; + choices[137] = "1280x720 Movie"; + choices[142] = "1920x1080 Movie"; + } +}; +CAImageSizeInterpreter caImageSizeInterpreter; + +class CAEasyModeInterpreter : public ChoiceInterpreter { +public: + CAEasyModeInterpreter (){ + choices[0] = "Full auto "; + choices[1] = "Manual "; + choices[2] = "Landscape "; + choices[3] = "Fast shutter "; + choices[4] = "Slow shutter "; + choices[5] = "Night "; + choices[6] = "Gray Scale "; + choices[7] = "Sepia "; + choices[8] = "Portrait "; + choices[9] = "Sports "; + choices[10] = "Macro "; + choices[11] = "Black & White"; + choices[12] = "Pan focus"; + choices[13] = "Vivid"; + choices[14] = "Neutral"; + choices[15] = "Flash Off"; + choices[16] = "Long Shutter"; + choices[17] = "Super Macro"; + choices[18] = "Foliage"; + choices[19] = "Indoor"; + choices[20] = "Fireworks"; + choices[21] = "Beach"; + choices[22] = "Underwater"; + choices[23] = "Snow"; + choices[24] = "Kids & Pets"; + choices[25] = "Night Snapshot"; + choices[26] = "Digital Macro"; + choices[27] = "My Colors"; + choices[28] = "Still Image"; + choices[30] = "Color Accent"; + choices[31] = "Color Swap"; + choices[32] = "Aquarium"; + choices[33] = "ISO 3200"; + choices[38] = "Creative Auto"; + choices[42] = "Super Vivid"; + choices[43] = "Poster"; + choices[47] = "Fisheye"; + choices[48] = "Miniature"; + choices[261]= "Sunset"; + } +}; +CAEasyModeInterpreter caEasyModeInterpreter; + +class CADigitalZoomInterpreter : public ChoiceInterpreter { +public: + CADigitalZoomInterpreter(){ + choices[0] = "None"; + choices[1] = "2x"; + choices[2] = "4x"; + choices[3] = "Other"; + } +}; +CADigitalZoomInterpreter caDigitalZoomInterpreter; + +class CAMeteringModeInterpreter : public ChoiceInterpreter { +public: + CAMeteringModeInterpreter(){ + choices[0] = "Default"; + choices[1] = "Spot"; + choices[2] = "Average"; + choices[3] = "Evaluative"; + choices[4] = "Partial"; + choices[5] = "Center-weighted averaging"; + } +}; +CAMeteringModeInterpreter caMeteringModeInterpreter; + +class CAFocusRangeInterpreter : public ChoiceInterpreter { +public: + CAFocusRangeInterpreter(){ + choices[0] = "Manual"; + choices[1] = "Auto"; + choices[2] = "Not Known"; + choices[3] = "Macro"; + choices[4] = "Very Close"; + choices[5] = "Close"; + choices[6] = "Middle Range"; + choices[7] = "Far Range"; + choices[8] = "Pan Focus"; + choices[9] = "Super Macro"; + choices[10] = "Infinity"; + } +}; +CAFocusRangeInterpreter caFocusRangeInterpreter; + +class CAAFPointInterpreter : public ChoiceInterpreter { +public: + CAAFPointInterpreter(){ + choices[0x2005] = "Manual AF point selection "; + choices[0x3000] = "None (MF)"; + choices[0x3001] = "Auto AF point selection "; + choices[0x3002] = "Right "; + choices[0x3003] = "Center "; + choices[0x3004] = "Left "; + choices[0x4001] = "Auto AF point selection "; + choices[0x4006] = "Face Detect"; + } +}; +CAAFPointInterpreter caAFPointInterpreter; + +class CAExposureModeInterpreter : public ChoiceInterpreter { +public: + CAExposureModeInterpreter(){ + choices[0] = "Easy"; + choices[1] = "Program AE"; + choices[2] = "Shutter speed priority AE"; + choices[3] = "Aperture-priority AE"; + choices[4] = "Manual"; + choices[5] = "Depth-of-field AE"; + choices[6] = "M-Dep"; + choices[7] = "Bulb"; + } +}; +CAExposureModeInterpreter caExposureModeInterpreter; + +class CAFlashBitsInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + std::ostringstream s; + unsigned bits = t->toInt(0,SHORT); + if( bits & 0x0001 ) s << "Manual "; + if( bits & 0x0002 ) s << "TTL "; + if( bits & 0x0004 ) s << "A-TTL "; + if( bits & 0x0008 ) s << "E-TTL "; + if( bits & 0x0010 ) s << "FP sync enabled "; + if( bits & 0x0080 ) s << "2nd curtain "; + if( bits & 0x0800 ) s << "FP sync used "; + if( bits & 0x2000 ) s << "Built-in "; + if( bits & 0x4000 ) s << "External "; + return s.str(); + } +}; +CAFlashBitsInterpreter caFlashBitsInterpreter; + +class CAFocusContinuousInterpreter : public ChoiceInterpreter { +public: + CAFocusContinuousInterpreter(){ + choices[0] = "Single"; + choices[1] = "Continuous"; + choices[8] = "Manual"; + } +}; +CAFocusContinuousInterpreter caFocusContinuousInterpreter; + +class CAAESettingsInterpreter : public ChoiceInterpreter { +public: + CAAESettingsInterpreter(){ + choices[0] = "Normal AE"; + choices[1] = "Exposure Compensation"; + choices[2] = "AE Lock"; + choices[3] = "AE Lock + Exposure Comp."; + choices[4] = "No AE"; + } +}; +CAAESettingsInterpreter caAESettingsInterpreter; + +class CAStabilizationInterpreter : public ChoiceInterpreter { +public: + CAStabilizationInterpreter(){ + choices[0] = "Off"; + choices[1] = "On"; + choices[2] = "On, Shot Only"; + choices[3] = "On, Panning"; + choices[4] = "On, Video"; + } +}; +CAStabilizationInterpreter caStabilizationInterpreter; + +class CASpotMeteringInterpreter : public ChoiceInterpreter { +public: + CASpotMeteringInterpreter(){ + choices[0] = "Center"; + choices[1] = "AF Point"; + } +}; +CASpotMeteringInterpreter caSpotMeteringInterpreter; + +class CAPhotoEffectInterpreter : public ChoiceInterpreter { +public: + CAPhotoEffectInterpreter(){ + choices[0] = "Off"; + choices[1] = "Vivid"; + choices[2] = "Neutral"; + choices[3] = "Smooth"; + choices[4] = "Sepia"; + choices[5] = "B&W"; + choices[6] = "Custom"; + choices[100] = "My Color Data"; + } +}; +CAPhotoEffectInterpreter caPhotoEffectInterpreter; + +class CAManualFlashInterpreter : public ChoiceInterpreter { +public: + CAManualFlashInterpreter(){ + choices[0] = "N/A"; + choices[0x500] = "Full"; + choices[0x502] = "Medium"; + choices[0x504] = "Low"; + choices[0x7fff] = "N/A"; + } +}; +CAManualFlashInterpreter caManualFlashInterpreter; + +class CARAWQualityInterpreter : public ChoiceInterpreter { +public: + CARAWQualityInterpreter(){ + choices[0] = "N/A"; + choices[1] = "sRAW1 (mRAW)"; + choices[2] = "sRAW2 (sRAW)"; + } +}; +CARAWQualityInterpreter caRAWQualityInterpreter; + +class CAFocalInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + Tag *unitTag = t->getParent()->getRoot()->findTag("FocalUnits"); + double unit = unitTag->toDouble(); + char buffer[32]; + sprintf (buffer, "%0.1f", (unit>0. ? t->toDouble()/unit : t->toDouble())); + return buffer; + } +}; +CAFocalInterpreter caFocalInterpreter; + +class CALensInterpreter : public IntLensInterpreter< int > { public: - CACameraSettingsInterpreter () { - machoices[1] = "Macro"; - machoices[2] = "Normal"; - qlchoices[1] = "Economy"; - qlchoices[2] = "Normal"; - qlchoices[3] = "Fine"; - qlchoices[4] = "RAW"; - qlchoices[5] = "Superfine"; - fmchoices[0] = "Off"; - fmchoices[1] = "Auto"; - fmchoices[2] = "On"; - fmchoices[3] = "Red-eye reduction"; - fmchoices[4] = "Slow-sync"; - fmchoices[5] = "Red-eye reduction (Auto)"; - fmchoices[6] = "Red-eye reduction (On)"; - fmchoices[16] = "External flash"; - cdchoices[0] = "Single"; - cdchoices[1] = "Continuous"; - cdchoices[2] = "Movie"; - cdchoices[3] = "Continuous, Speed Priority"; - cdchoices[4] = "Continuous, Low"; - cdchoices[5] = "Continuous, High"; - fochoices[0] = "One-shot AF"; - fochoices[1] = "AI Servo AF"; - fochoices[2] = "AI Focus AF"; - fochoices[3] = "Manual Focus"; - fochoices[4] = "Single"; - fochoices[5] = "Continuous"; - fochoices[6] = "Manual Focus"; - fochoices[16] = "Pan Focus"; - rmchoices[1] = "JPEG"; - rmchoices[2] = "CRW+THM"; - rmchoices[3] = "AVI+THM"; - rmchoices[4] = "TIF"; - rmchoices[5] = "TIF+JPEG"; - rmchoices[6] = "CR2"; - rmchoices[7] = "CR2+JPEG"; - ischoices[0] = "Large"; - ischoices[1] = "Medium"; - ischoices[2] = "Small"; - ischoices[5] = "Medium 1"; - ischoices[6] = "Medium 2"; - ischoices[7] = "Medium 3"; - ischoices[8] = "Postcard"; - ischoices[9] = "Widescreen"; - emchoices[0] = "Full auto "; - emchoices[1] = "Manual "; - emchoices[2] = "Landscape "; - emchoices[3] = "Fast shutter "; - emchoices[4] = "Slow shutter "; - emchoices[5] = "Night "; - emchoices[6] = "Gray Scale "; - emchoices[7] = "Sepia "; - emchoices[8] = "Portrait "; - emchoices[9] = "Sports "; - emchoices[10] = "Macro "; - emchoices[11] = "Black & White"; - emchoices[12] = "Pan focus"; - emchoices[13] = "Vivid"; - emchoices[14] = "Neutral"; - emchoices[15] = "Flash Off"; - emchoices[16] = "Long Shutter"; - emchoices[17] = "Super Macro"; - emchoices[18] = "Foliage"; - emchoices[19] = "Indoor"; - emchoices[20] = "Fireworks"; - emchoices[21] = "Beach"; - emchoices[22] = "Underwater"; - emchoices[23] = "Snow"; - emchoices[24] = "Kids & Pets"; - emchoices[25] = "Night Snapshot"; - emchoices[26] = "Digital Macro"; - emchoices[27] = "My Colors"; - emchoices[28] = "Still Image"; - emchoices[30] = "Color Accent"; - emchoices[31] = "Color Swap"; - emchoices[32] = "Aquarium"; - emchoices[33] = "ISO 3200"; - dzchoices[0] = "None"; - dzchoices[1] = "2x"; - dzchoices[2] = "4x"; - dzchoices[3] = "Other"; - mmchoices[0] = "Default"; - mmchoices[1] = "Spot"; - mmchoices[2] = "Average"; - mmchoices[3] = "Evaluative"; - mmchoices[4] = "Partial"; - mmchoices[5] = "Center-weighted averaging"; - frchoices[0] = "Manual"; - frchoices[1] = "Auto"; - frchoices[2] = "Not Known"; - frchoices[3] = "Macro"; - frchoices[4] = "Very Close"; - frchoices[5] = "Close"; - frchoices[6] = "Middle Range"; - frchoices[7] = "Far Range"; - frchoices[8] = "Pan Focus"; - frchoices[9] = "Super Macro"; - frchoices[10] = "Infinity"; - afchoices[0x2005] = "Manual AF point selection "; - afchoices[0x3000] = "None (MF)"; - afchoices[0x3001] = "Auto AF point selection "; - afchoices[0x3002] = "Right "; - afchoices[0x3003] = "Center "; - afchoices[0x3004] = "Left "; - afchoices[0x4001] = "Auto AF point selection "; - afchoices[0x4006] = "Face Detect"; - exchoices[0] = "Easy"; - exchoices[1] = "Program AE"; - exchoices[2] = "Shutter speed priority AE"; - exchoices[3] = "Aperture-priority AE"; - exchoices[4] = "Manual"; - exchoices[5] = "Depth-of-field AE"; - exchoices[6] = "M-Dep"; - fcchoices[0] = "Single"; - fcchoices[1] = "Continuous"; - aechoices[0] = "Normal AE"; - aechoices[1] = "Exposure Compensation"; - aechoices[2] = "AE Lock"; - aechoices[3] = "AE Lock + Exposure Comp."; - aechoices[4] = "No AE"; - stchoices[0] = "Off"; - stchoices[1] = "On"; - stchoices[2] = "On, Shot Only"; - stchoices[3] = "On, Panning"; - smchoices[0] = "Center"; - smchoices[1] = "AF Point"; - pechoices[0] = "Off"; - pechoices[1] = "Vivid"; - pechoices[2] = "Neutral"; - pechoices[3] = "Smooth"; - pechoices[4] = "Sepia"; - pechoices[5] = "B&W"; - pechoices[6] = "Custom"; - pechoices[100] = "My Color Data"; - mfchoices[0] = "N/A"; - mfchoices[0x500] = "Full"; - mfchoices[0x502] = "Medium"; - mfchoices[0x504] = "Low"; - mfchoices[0x7fff] = "N/A"; - choices[1] = "Canon EF 50mm f/1.8"; - choices[2] = "Canon EF 28mm f/2.8"; - choices[3] = "Canon EF 135mm f/2.8 Soft"; - choices[4] = "Canon EF 35-105mm f/3.5-4.5 or Sigma Lens"; - choices[5] = "Canon EF 35-70mm f/3.5-4.5"; - choices[6] = "Canon EF 28-70mm f/3.5-4.5 or Sigma or Tokina Lens"; - choices[7] = "Canon EF 100-300mm F5.6L"; - choices[8] = "Canon EF 100-300mm f/5.6 or Sigma or Tokina Lens"; - choices[9] = "Canon EF 70-210mm f/4 orSigma Lens"; - choices[10] = "Canon EF 50mm f/2.5 Macro or Sigma Lens"; - choices[11] = "Canon EF 35mm f/2"; - choices[13] = "Canon EF 15mm f/2.8"; - choices[14] = "Canon EF 50-200mm f/3.5-4.5L"; - choices[15] = "Canon EF 50-200mm f/3.5-4.5"; - choices[16] = "Canon EF 35-135mm f/3.5-4.5"; - choices[17] = "Canon EF 35-70mm f/3.5-4.5A"; - choices[18] = "Canon EF 28-70mm f/3.5-4.5"; - choices[20] = "Canon EF 100-200mm f/4.5A"; - choices[21] = "Canon EF 80-200mm f/2.8L"; - choices[22] = "Canon EF 20-35mm f/2.8L or Tokina 28-80mm F2.8"; - choices[23] = "Canon EF 35-105mm f/3.5-4.5"; - choices[24] = "Canon EF 35-80mm f/4-5.6 Power Zoom"; - choices[25] = "Canon EF 35-80mm f/4-5.6 Power Zoom"; - choices[26] = "Canon EF 100mm f/2.8 Macro or Cosina 100mm f/3.5 Macro AF or Tamron"; - choices[28] = "Tamron AF Aspherical 28-200mm f/3.8-5.6 or 28-75mm f/2.8 or 28-105mm f/2.8"; - choices[27] = "Canon EF 35-80mm f/4-5.6"; - choices[28] = "Canon EF 80-200mm f/4.5-5.6 or Tamron Lens"; - choices[29] = "Canon EF 50mm f/1.8 MkII"; - choices[30] = "Canon EF 35-105mm f/4.5-5.6"; - choices[31] = "Tamron SP AF 300mm f/2.8 LD IF"; - choices[32] = "Canon EF 24mm f/2.8 or Sigma 15mm f/2.8 EX Fisheye"; - choices[33] = "Voigtlander Ultron 40mm f/2 SLII Aspherical"; - choices[35] = "Canon EF 35-80mm f/4-5.6"; - choices[36] = "Canon EF 38-76mm f/4.5-5.6"; - choices[37] = "Canon EF 35-80mm f/4-5.6 or Tamron Lens"; - choices[38] = "Canon EF 80-200mm f/4.5-5.6"; - choices[39] = "Canon EF 75-300mm f/4-5.6"; - choices[40] = "Canon EF 28-80mm f/3.5-5.6"; - choices[41] = "Canon EF 28-90mm f/4-5.6"; - choices[42] = "Canon EF 28-200mm f/3.5-5.6 or Tamron AF 28-300mm f/3.5-6.3"; - choices[43] = "Canon EF 28-105mm f/4-5.6"; - choices[44] = "Canon EF 90-300mm f/4.5-5.6"; - choices[45] = "Canon EF-S 18-55mm f/3.5-5.6"; - choices[46] = "Canon EF 28-90mm f/4-5.6"; - choices[48] = "Canon EF-S 18-55mm f/3.5-5.6 IS"; - choices[49] = "Canon EF-S 55-250mm f/4-5.6 IS"; - choices[50] = "Canon EF-S 18-200mm f/3.5-5.6 IS"; - choices[51] = "Canon EF-S 18-135mm f/3.5-5.6 IS"; - choices[94] = "Canon TS-E 17mm f/4L"; - choices[95] = "Canon TS-E 24.0mm f/3.5 L II"; - choices[124] = "Canon MP-E 65mm f/2.8 1-5x Macro Photo"; - choices[125] = "Canon TS-E 24mm f/3.5L"; - choices[126] = "Canon TS-E 45mm f/2.8"; - choices[127] = "Canon TS-E 90mm f/2.8"; - choices[129] = "Canon EF 300mm f/2.8L"; - choices[130] = "Canon EF 50mm f/1.0L"; - choices[131] = "Canon EF 28-80mm f/2.8-4L or Sigma Lens"; - choices[132] = "Canon EF 1200mm f/5.6L"; - choices[134] = "Canon EF 600mm f/4L IS"; - choices[135] = "Canon EF 200mm f/1.8L"; - choices[136] = "Canon EF 300mm f/2.8L"; - choices[137] = "Canon EF 85mm f/1.2L or Sigma Lens"; - choices[138] = "Canon EF 28-80mm f/2.8-4L"; - choices[139] = "Canon EF 400mm f/2.8L"; - choices[140] = "Canon EF 500mm f/4.5L"; - choices[141] = "Canon EF 500mm f/4.5L"; - choices[142] = "Canon EF 300mm f/2.8L IS"; - choices[143] = "Canon EF 500mm f/4L IS"; - choices[144] = "Canon EF 35-135mm f/4-5.6 USM"; - choices[145] = "Canon EF 100-300mm f/4.5-5.6 USM"; - choices[146] = "Canon EF 70-210mm f/3.5-4.5 USM"; - choices[147] = "Canon EF 35-135mm f/4-5.6 USM"; - choices[148] = "Canon EF 28-80mm f/3.5-5.6 USM"; - choices[149] = "Canon EF 100mm f/2"; - choices[150] = "Canon EF 14mm f/2.8L or Sigma Lens"; - choices[151] = "Canon EF 200mm f/2.8L"; - choices[152] = "Canon EF 300mm f/4L IS or Sigma Lens"; - choices[153] = "Canon EF 35-350mm f/3.5-5.6L or Tamron or Sigma Lens"; - choices[154] = "Canon EF 20mm f/2.8 USM"; - choices[155] = "Canon EF 85mm f/1.8 USM"; - choices[156] = "Canon EF 28-105mm f/3.5-4.5 USM"; - choices[160] = "Canon EF 20-35mm f/3.5-4.5 USM or Tamron AF 19-35mm f/3.5-4.5"; - choices[161] = "Canon EF 28-70mm f/2.8L or Sigma or Tamron Lens"; - choices[162] = "Canon EF 200mm f/2.8L"; - choices[163] = "Canon EF 300mm f/4L"; - choices[164] = "Canon EF 400mm f/5.6L"; - choices[165] = "Canon EF 70-200mm f/2.8 L"; - choices[166] = "Canon EF 70-200mm f/2.8 L + x1.4"; - choices[167] = "Canon EF 70-200mm f/2.8 L + x2"; - choices[168] = "Canon EF 28mm f/1.8 USM"; - choices[169] = "Canon EF17-35mm f/2.8L or Sigma Lens"; - choices[170] = "Canon EF 200mm f/2.8L II"; - choices[171] = "Canon EF 300mm f/4L"; - choices[172] = "Canon EF 400mm f/5.6L"; - choices[173] = "Canon EF 180mm Macro f/3.5L or Sigma 180mm F3.5 or 150mm f/2.8 Macro"; - choices[174] = "Canon EF 135mm f/2L"; - choices[175] = "Canon EF 400mm f/2.8L"; - choices[176] = "Canon EF 24-85mm f/3.5-4.5 USM"; - choices[177] = "Canon EF 300mm f/4L IS"; - choices[178] = "Canon EF 28-135mm f/3.5-5.6 IS"; - choices[179] = "Canon EF 24mm f/1.4L USM"; - choices[180] = "Canon EF 35mm f/1.4L"; - choices[181] = "Canon EF 100-400mm f/4.5-5.6L IS + x1.4"; - choices[182] = "Canon EF 100-400mm f/4.5-5.6L IS + x2"; - choices[183] = "Canon EF 100-400mm f/4.5-5.6L IS"; - choices[184] = "Canon EF 400mm f/2.8L + x2"; - choices[185] = "Canon EF 600mm f/4L IS"; - choices[186] = "Canon EF 70-200mm f/4L"; - choices[187] = "Canon EF 70-200mm f/4L + 1.4x"; - choices[188] = "Canon EF 70-200mm f/4L + 2x"; - choices[189] = "Canon EF 70-200mm f/4L + 2.8x"; - choices[190] = "Canon EF 100mm f/2.8 Macro"; - choices[191] = "Canon EF 400mm f/4 DO IS"; - choices[193] = "Canon EF 35-80mm f/4-5.6 USM"; - choices[194] = "Canon EF 80-200mm f/4.5-5.6 USM"; - choices[195] = "Canon EF 35-105mm f/4.5-5.6 USM"; - choices[196] = "Canon EF 75-300mm f/4-5.6 USM"; - choices[197] = "Canon EF 75-300mm f/4-5.6 IS"; - choices[198] = "Canon EF 50mm f/1.4 USM"; - choices[199] = "Canon EF 28-80mm f/3.5-5.6 USM"; - choices[200] = "Canon EF 75-300mm f/4-5.6 USM"; - choices[201] = "Canon EF 28-80mm f/3.5-5.6 USM"; - choices[202] = "Canon EF 28-80 f/3.5-5.6 USM IV"; - choices[208] = "Canon EF 22-55mm f/4-5.6 USM"; - choices[209] = "Canon EF 55-200mm f/4.5-5.6"; - choices[210] = "Canon EF 28-90mm f/4-5.6 USM"; - choices[211] = "Canon EF 28-200mm f/3.5-5.6"; - choices[212] = "Canon EF 28-105mm f/4-5.6 USM"; - choices[213] = "Canon EF 90-300mm f/4.5-5.6"; - choices[214] = "Canon EF-S 18-55mm f/3.5-4.5 USM"; - choices[215] = "Canon EF 55-200mm f/4.5-5.6 II USM"; - choices[224] = "Canon EF 70-200mm f/2.8L IS USM"; - choices[225] = "Canon EF 70-200mm f/2.8L IS USM + x1.4"; - choices[226] = "Canon EF 70-200mm f/2.8L IS USM + x2"; - choices[227] = "Canon EF 70-200mm f/2.8L IS + 2.8x"; - choices[228] = "Canon EF 28-105mm f/3.5-4.5 USM"; - choices[229] = "Canon EF 16-35mm f/2.8L"; - choices[230] = "Canon EF 24-70mm f/2.8L"; - choices[231] = "Canon EF 17-40mm f/4L"; - choices[232] = "Canon EF 70-300mm f/4.5-5.6 DO IS USM"; - choices[233] = "Canon EF 28-300mm f/3.5-5.6L IS"; - choices[234] = "Canon EF-S 17-85mm f4-5.6 IS USM"; - choices[235] = "Canon EF-S10-22mm F3.5-4.5 USM"; - choices[236] = "Canon EF-S60mm F2.8 Macro USM"; - choices[237] = "Canon EF 24-105mm f/4L IS"; - choices[238] = "Canon EF 70-300mm f/4-5.6 IS USM"; - choices[239] = "Canon EF 85mm f/1.2L II USM"; - choices[240] = "Canon EF-S 17-55mm f/2.8 IS USM"; - choices[241] = "Canon EF 50mm f/1.2L USM"; - choices[242] = "Canon EF 70-200mm f/4L IS USM"; - choices[243] = "Canon EF 70-200mm f/4L IS + 1.4x"; - choices[244] = "Canon EF 70-200mm f/4L IS + 2x"; - choices[245] = "Canon EF 70-200mm f/4L IS + 2.8x"; - choices[246] = "Canon EF 16-35mm f/2.8L II"; - choices[247] = "Canon EF 14mm f/2.8L II USM"; - choices[248] = "Canon EF 200mm f/2L IS"; - choices[249] = "Canon EF 800mm f/5.6L IS"; - choices[250] = "Canon EF 24 f/1.4L II"; - choices[254] = "Canon EF 100mm f/2.8L Macro IS USM"; - choices[488] = "Canon EF-S 15-85mm f/3.5-5.6 IS USM"; + CALensInterpreter () { + choices.insert(p_t(1, "Canon EF 50mm f/1.8")); + choices.insert(p_t(2, "Canon EF 28mm f/2.8")); + choices.insert(p_t(3, "Canon EF 135mm f/2.8 Soft")); + choices.insert(p_t(4, "Canon EF 35-105mm f/3.5-4.5")); + choices.insert(p_t(4, "Sigma UC Zoom 35.135mm f/4-5.6")); + choices.insert(p_t(5, "Canon EF 35-70mm f/3.5-4.5")); + choices.insert(p_t(6, "Canon EF 28-70mm f/3.5-4.5")); + choices.insert(p_t(6, "Sigma 18-50mm f/3.5-5.6 DC")); + choices.insert(p_t(6, "Sigma 18-125mm f/3.5-5.6 DC IF ASP")); + choices.insert(p_t(6, "Sigma 28-80mm f/3.5-5.6 II Macro")); + choices.insert(p_t(6, "Tokina AF 193-2 19-35mm f/3.5-4.5")); + choices.insert(p_t(7, "Canon EF 100-300mm f/5.6L")); + choices.insert(p_t(8, "Canon EF 100-300mm f/5.6")); + choices.insert(p_t(8, "Sigma 70-300mm f/4-5.6 APO DG Macro")); + choices.insert(p_t(8, "Tokina AT-X242AF 24-200mm f/3.5-5.6")); + choices.insert(p_t(9, "Canon EF 70-210mm f/4")); + choices.insert(p_t(9, "Sigma 55-200mm f/4-5.6 DC")); + choices.insert(p_t(10, "Canon EF 50mm f/2.5 Macro")); + choices.insert(p_t(10, "Sigma 50mm f/2.8 EX")); + choices.insert(p_t(10, "Sigma 28mm f/1.8")); + choices.insert(p_t(10, "Sigma 105mm f/2.8 Macro EX")); + choices.insert(p_t(11, "Canon EF 35mm f/2")); + choices.insert(p_t(13, "Canon EF 15mm f/2.8")); + choices.insert(p_t(14, "Canon EF 50-200mm f/3.5-4.5L")); + choices.insert(p_t(15, "Canon EF 50-200mm f/3.5-4.5")); + choices.insert(p_t(16, "Canon EF 35-135mm f/3.5-4.5")); + choices.insert(p_t(17, "Canon EF 35-70mm f/3.5-4.5A")); + choices.insert(p_t(18, "Canon EF 28-70mm f/3.5-4.5")); + choices.insert(p_t(20, "Canon EF 100-200mm f/4.5A")); + choices.insert(p_t(21, "Canon EF 80-200mm f/2.8L")); + choices.insert(p_t(22, "Canon EF 20-35mm f/2.8L")); + choices.insert(p_t(22, "Tokina AT-X280AF PRO 28-80mm f/2.8 Aspherical")); + choices.insert(p_t(23, "Canon EF 35-105mm f/3.5-4.5")); + choices.insert(p_t(24, "Canon EF 35-80mm f/4-5.6 Power Zoom")); + choices.insert(p_t(25, "Canon EF 35-80mm f/4-5.6 Power Zoom")); + choices.insert(p_t(26, "Canon EF 100mm f/2.8 Macro")); + choices.insert(p_t(26, "Cosina 100mm f/3.5 Macro AF")); + choices.insert(p_t(26, "Tamron SP AF 90mm f/2.8 Di Macro")); + choices.insert(p_t(26, "Tamron SP AF 180mm f/3.5 Di Macro")); + choices.insert(p_t(26, "Carl Zeiss Planar T* 50mm f/1.4")); + choices.insert(p_t(27, "Canon EF 35-80mm f/4-5.6")); + choices.insert(p_t(28, "Canon EF 80-200mm f/4.5-5.6")); + choices.insert(p_t(28, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical IF Macro")); + choices.insert(p_t(28, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF")); + choices.insert(p_t(28, "Tamron AF 28-200mm f/3.8-5.6 Aspherical")); + choices.insert(p_t(28, "Tamron AF 70-300mm f/4.5-5.6 Di LD 1:2 Macro Zoom")); + choices.insert(p_t(29, "Canon EF 50mm f/1.8 II")); + choices.insert(p_t(30, "Canon EF 35-105mm f/4.5-5.6")); + choices.insert(p_t(31, "Canon EF 75-300mm f/4-5.6")); + choices.insert(p_t(31, "Tamron SP AF 300mm f/2.8 LD IF")); + choices.insert(p_t(32, "Canon EF 24mm f/2.8")); + choices.insert(p_t(32, "Sigma 15mm f/2.8 EX Fisheye")); + choices.insert(p_t(33, "Voigtlander Ultron 40mm f/2 SLII Aspherical")); + choices.insert(p_t(33, "Carl Zeiss Distagon T* 35mm f/2 ZE")); + choices.insert(p_t(35, "Canon EF 35-80mm f/4-5.6")); + choices.insert(p_t(36, "Canon EF 38-76mm f/4.5-5.6")); + choices.insert(p_t(37, "Canon EF 35-80mm f/4-5.6")); + choices.insert(p_t(37, "Tamron 70-200mm f/2.8 Di LD IF Macro")); + choices.insert(p_t(37, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical IF Macro (A20)")); + choices.insert(p_t(37, "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical IF")); + choices.insert(p_t(37, "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical IF Macro")); + choices.insert(p_t(38, "Canon EF 80-200mm f/4.5-5.6")); + choices.insert(p_t(39, "Canon EF 75-300mm f/4-5.6")); + choices.insert(p_t(40, "Canon EF 28-80mm f/3.5-5.6")); + choices.insert(p_t(41, "Canon EF 28-90mm f/4-5.6")); + choices.insert(p_t(42, "Canon EF 28-200mm f/3.5-5.6")); + choices.insert(p_t(42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical IF Macro (A20)")); + choices.insert(p_t(43, "Canon EF 28-105mm f/4-5.6")); + choices.insert(p_t(44, "Canon EF 90-300mm f/4.5-5.6")); + choices.insert(p_t(45, "Canon EF-S 18-55mm f/3.5-5.6")); + choices.insert(p_t(46, "Canon EF 28-90mm f/4-5.6")); + choices.insert(p_t(48, "Canon EF-S 18-55mm f/3.5-5.6 IS")); + choices.insert(p_t(49, "Canon EF-S 55-250mm f/4-5.6 IS")); + choices.insert(p_t(50, "Canon EF-S 18-200mm f/3.5-5.6 IS")); + choices.insert(p_t(51, "Canon EF-S 18-135mm f/3.5-5.6 IS")); + choices.insert(p_t(94, "Canon TS-E 17mm f/4L")); + choices.insert(p_t(95, "Canon TS-E 24mm f/3.5 L II")); + choices.insert(p_t(124, "Canon MP-E 65mm f/2.8 1-5x Macro Photo")); + choices.insert(p_t(125, "Canon TS-E 24mm f/3.5L")); + choices.insert(p_t(126, "Canon TS-E 45mm f/2.8")); + choices.insert(p_t(127, "Canon TS-E 90mm f/2.8")); + choices.insert(p_t(129, "Canon EF 300mm f/2.8L")); + choices.insert(p_t(130, "Canon EF 50mm f/1.0L")); + choices.insert(p_t(131, "Canon EF 28-80mm f/2.8-4L")); + choices.insert(p_t(131, "Sigma 8mm f/3.5 EX DG Circular Fisheye")); + choices.insert(p_t(131, "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM")); + choices.insert(p_t(131, "Sigma 17-70mm f/2.8-4.5 DC Macro")); + choices.insert(p_t(131, "Sigma APO 50-150mm f/2.8 EX DC HSM II")); + choices.insert(p_t(131, "Sigma APO 120-300mm f/2.8 EX DG HSM")); + choices.insert(p_t(132, "Canon EF 1200mm f/5.6L")); + choices.insert(p_t(134, "Canon EF 600mm f/4L IS")); + choices.insert(p_t(135, "Canon EF 200mm f/1.8L")); + choices.insert(p_t(136, "Canon EF 300mm f/2.8L")); + choices.insert(p_t(137, "Canon EF 85mm f/1.2L")); + choices.insert(p_t(137, "Sigma 18-50mm f/2.8-4.5 DC OS HSM")); + choices.insert(p_t(137, "Sigma 50-200mm f/4-5.6 DC OS HSM")); + choices.insert(p_t(137, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); + choices.insert(p_t(137, "Sigma 24-70mm f/2.8 IF EX DG HSM")); + choices.insert(p_t(137, "Sigma 18-125mm f/3.8-5.6 DC OS HSM")); + choices.insert(p_t(137, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM")); + choices.insert(p_t(138, "Canon EF 28-80mm f/2.8-4L")); + choices.insert(p_t(139, "Canon EF 400mm f/2.8L")); + choices.insert(p_t(140, "Canon EF 500mm f/4.5L")); + choices.insert(p_t(141, "Canon EF 500mm f/4.5L")); + choices.insert(p_t(142, "Canon EF 300mm f/2.8L IS")); + choices.insert(p_t(143, "Canon EF 500mm f/4L IS")); + choices.insert(p_t(144, "Canon EF 35-135mm f/4-5.6 USM")); + choices.insert(p_t(145, "Canon EF 100-300mm f/4.5-5.6 USM")); + choices.insert(p_t(146, "Canon EF 70-210mm f/3.5-4.5 USM")); + choices.insert(p_t(147, "Canon EF 35-135mm f/4-5.6 USM")); + choices.insert(p_t(148, "Canon EF 28-80mm f/3.5-5.6 USM")); + choices.insert(p_t(149, "Canon EF 100mm f/2")); + choices.insert(p_t(150, "Canon EF 14mm f/2.8L")); + choices.insert(p_t(150, "Sigma 20mm f/1.8 EX")); + choices.insert(p_t(150, "Sigma 24mm f/1.8 DG Macro EX")); + choices.insert(p_t(150, "Sigma 30mm f/1.4 DC HSM")); + choices.insert(p_t(151, "Canon EF 200mm f/2.8L")); + choices.insert(p_t(152, "Canon EF 300mm f/4L IS")); + choices.insert(p_t(152, "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM")); + choices.insert(p_t(152, "Sigma 14mm f/2.8 EX Aspherical HSM")); + choices.insert(p_t(152, "Sigma 10-20mm f/4-5.6")); + choices.insert(p_t(152, "Sigma 100-300mm f/4")); + choices.insert(p_t(153, "Canon EF 35-350mm f/3.5-5.6L")); + choices.insert(p_t(153, "Sigma APO 50-500mm f/4-6.3 HSM EX")); + choices.insert(p_t(153, "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical IF Macro")); + choices.insert(p_t(153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical IF Macro (A14)")); + choices.insert(p_t(153, "Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical IF Macro")); + choices.insert(p_t(154, "Canon EF 20mm f/2.8 USM")); + choices.insert(p_t(155, "Canon EF 85mm f/1.8 USM")); + choices.insert(p_t(156, "Canon EF 28-105mm f/3.5-4.5 USM")); + choices.insert(p_t(156, "Tamron SP 70-300mm f/4-5.6 Di VC USD")); + choices.insert(p_t(160, "Canon EF 20-35mm f/3.5-4.5 USM")); + choices.insert(p_t(160, "Tamron AF 19-35mm f/3.5-4.5")); + choices.insert(p_t(161, "Canon EF 28-70mm f/2.8L")); + choices.insert(p_t(161, "Sigma 24-70mm f/2.8 EX")); + choices.insert(p_t(161, "Sigma 28-70mm f/2.8 EX")); + choices.insert(p_t(161, "Tamron AF 17-50mm f/2.8 Di-II LD Aspherical")); + choices.insert(p_t(161, "Tamron 90mm f/2.8")); + choices.insert(p_t(162, "Canon EF 200mm f/2.8L")); + choices.insert(p_t(163, "Canon EF 300mm f/4L")); + choices.insert(p_t(164, "Canon EF 400mm f/5.6L")); + choices.insert(p_t(165, "Canon EF 70-200mm f/2.8 L")); + choices.insert(p_t(166, "Canon EF 70-200mm f/2.8 L + x1.4")); + choices.insert(p_t(167, "Canon EF 70-200mm f/2.8 L + x2")); + choices.insert(p_t(168, "Canon EF 28mm f/1.8 USM")); + choices.insert(p_t(169, "Canon EF 17-35mm f/2.8L")); + choices.insert(p_t(169, "Sigma 18-200mm f/3.5-6.3 DC OS")); + choices.insert(p_t(169, "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical")); + choices.insert(p_t(169, "Sigma 18-50mm f/2.8 Macro")); + choices.insert(p_t(169, "Sigma 50mm f/1.4 EX DG HSM")); + choices.insert(p_t(169, "Sigma 85mm f/1.4 EX DG HSM")); + choices.insert(p_t(170, "Canon EF 200mm f/2.8L II")); + choices.insert(p_t(171, "Canon EF 300mm f/4L")); + choices.insert(p_t(172, "Canon EF 400mm f/5.6L")); + choices.insert(p_t(173, "Canon EF 180mm f/3.5L Macro")); + choices.insert(p_t(173, "Sigma 180mm f/3.5 EX HSM Macro")); + choices.insert(p_t(173, "Sigma APO 150mm f/2.8 EX DG HSM Macro")); + choices.insert(p_t(174, "Canon EF 135mm f/2L")); + choices.insert(p_t(174, "Sigma APO 70-200mm f/2.8 EX DG OS HSM")); + choices.insert(p_t(175, "Canon EF 400mm f/2.8L")); + choices.insert(p_t(176, "Canon EF 24-85mm f/3.5-4.5 USM")); + choices.insert(p_t(177, "Canon EF 300mm f/4L IS")); + choices.insert(p_t(178, "Canon EF 28-135mm f/3.5-5.6 IS")); + choices.insert(p_t(179, "Canon EF 24mm f/1.4L USM")); + choices.insert(p_t(180, "Canon EF 35mm f/1.4L")); + choices.insert(p_t(181, "Canon EF 100-400mm f/4.5-5.6L IS + x1.4")); + choices.insert(p_t(182, "Canon EF 100-400mm f/4.5-5.6L IS + x2")); + choices.insert(p_t(183, "Canon EF 100-400mm f/4.5-5.6L IS")); + choices.insert(p_t(184, "Canon EF 400mm f/2.8L + x2")); + choices.insert(p_t(185, "Canon EF 600mm f/4L IS")); + choices.insert(p_t(186, "Canon EF 70-200mm f/4L")); + choices.insert(p_t(187, "Canon EF 70-200mm f/4L + 1.4x")); + choices.insert(p_t(188, "Canon EF 70-200mm f/4L + 2x")); + choices.insert(p_t(189, "Canon EF 70-200mm f/4L + 2.8x")); + choices.insert(p_t(190, "Canon EF 100mm f/2.8 Macro")); + choices.insert(p_t(191, "Canon EF 400mm f/4 DO IS")); + choices.insert(p_t(193, "Canon EF 35-80mm f/4-5.6 USM")); + choices.insert(p_t(194, "Canon EF 80-200mm f/4.5-5.6 USM")); + choices.insert(p_t(195, "Canon EF 35-105mm f/4.5-5.6 USM")); + choices.insert(p_t(196, "Canon EF 75-300mm f/4-5.6 USM")); + choices.insert(p_t(197, "Canon EF 75-300mm f/4-5.6 IS")); + choices.insert(p_t(198, "Canon EF 50mm f/1.4 USM")); + choices.insert(p_t(199, "Canon EF 28-80mm f/3.5-5.6 USM")); + choices.insert(p_t(200, "Canon EF 75-300mm f/4-5.6 USM")); + choices.insert(p_t(201, "Canon EF 28-80mm f/3.5-5.6 USM")); + choices.insert(p_t(202, "Canon EF 28-80mm f/3.5-5.6 USM IV")); + choices.insert(p_t(208, "Canon EF 22-55mm f/4-5.6 USM")); + choices.insert(p_t(209, "Canon EF 55-200mm f/4.5-5.6")); + choices.insert(p_t(210, "Canon EF 28-90mm f/4-5.6 USM")); + choices.insert(p_t(211, "Canon EF 28-200mm f/3.5-5.6")); + choices.insert(p_t(212, "Canon EF 28-105mm f/4-5.6 USM")); + choices.insert(p_t(213, "Canon EF 90-300mm f/4.5-5.6")); + choices.insert(p_t(214, "Canon EF-S 18-55mm f/3.5-4.5 USM")); + choices.insert(p_t(215, "Canon EF 55-200mm f/4.5-5.6 II USM")); + choices.insert(p_t(224, "Canon EF 70-200mm f/2.8L IS USM")); + choices.insert(p_t(225, "Canon EF 70-200mm f/2.8L IS USM + x1.4")); + choices.insert(p_t(226, "Canon EF 70-200mm f/2.8L IS USM + x2")); + choices.insert(p_t(227, "Canon EF 70-200mm f/2.8L IS + 2.8x")); + choices.insert(p_t(228, "Canon EF 28-105mm f/3.5-4.5 USM")); + choices.insert(p_t(229, "Canon EF 16-35mm f/2.8L")); + choices.insert(p_t(230, "Canon EF 24-70mm f/2.8L")); + choices.insert(p_t(231, "Canon EF 17-40mm f/4L")); + choices.insert(p_t(232, "Canon EF 70-300mm f/4.5-5.6 DO IS USM")); + choices.insert(p_t(233, "Canon EF 28-300mm f/3.5-5.6L IS")); + choices.insert(p_t(234, "Canon EF-S 17-85mm f4-5.6 IS USM")); + choices.insert(p_t(235, "Canon EF-S 10-22mm f/3.5-4.5 USM")); + choices.insert(p_t(236, "Canon EF-S 60mm f/2.8 Macro USM")); + choices.insert(p_t(237, "Canon EF 24-105mm f/4L IS")); + choices.insert(p_t(238, "Canon EF 70-300mm f/4-5.6 IS USM")); + choices.insert(p_t(239, "Canon EF 85mm f/1.2L II USM")); + choices.insert(p_t(240, "Canon EF-S 17-55mm f/2.8 IS USM")); + choices.insert(p_t(241, "Canon EF 50mm f/1.2L USM")); + choices.insert(p_t(242, "Canon EF 70-200mm f/4L IS USM")); + choices.insert(p_t(243, "Canon EF 70-200mm f/4L IS + 1.4x")); + choices.insert(p_t(244, "Canon EF 70-200mm f/4L IS + 2x")); + choices.insert(p_t(245, "Canon EF 70-200mm f/4L IS + 2.8x")); + choices.insert(p_t(246, "Canon EF 16-35mm f/2.8L II")); + choices.insert(p_t(247, "Canon EF 14mm f/2.8L II USM")); + choices.insert(p_t(248, "Canon EF 200mm f/2L IS")); + choices.insert(p_t(249, "Canon EF 800mm f/5.6L IS")); + choices.insert(p_t(250, "Canon EF 24mm f/1.4L II")); + choices.insert(p_t(251, "Canon EF 70-200mm f/2.8L IS II USM")); + choices.insert(p_t(254, "Canon EF 100mm f/2.8L Macro IS USM")); + choices.insert(p_t(488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM")); } - virtual std::string toString (Tag* t) { - std::ostringstream str; - str << "MacroMode = " << machoices[t->toInt(2,SHORT)] << std::endl; - str << "Self-timer = " << t->toInt(4,SHORT) << std::endl; - str << "Quality = " << qlchoices[t->toInt(6,SHORT)] << std::endl; - str << "CanonFlashMode = " << fmchoices[t->toInt(8,SHORT)] << std::endl; - str << "ContinuousDrive = " << cdchoices[t->toInt(10,SHORT)] << std::endl; - str << "FocusMode = " << fochoices[t->toInt(14,SHORT)] << std::endl; - str << "RecordMode = " << rmchoices[t->toInt(18,SHORT)] << std::endl; - str << "CanonImageSize = " << ischoices[t->toInt(20,SHORT)] << std::endl; - str << "EasyMode = " << emchoices[t->toInt(22,SHORT)] << std::endl; - str << "DigitalZoom = " << dzchoices[t->toInt(24,SHORT)] << std::endl; - str << "Contrast = " << t->toInt(26,SHORT) << std::endl; - str << "Saturation = " << t->toInt(28,SHORT) << std::endl; - str << "Sharpness = " << t->toInt(30,SHORT) << std::endl; - str << "CameraISO = " << t->toInt(32,SHORT) << std::endl; - str << "MeteringMode = " << mmchoices[t->toInt(34,SHORT)] << std::endl; - str << "FocusRange = " << frchoices[t->toInt(36,SHORT)] << std::endl; - str << "AFPoint = " << afchoices[t->toInt(38,SHORT)] << std::endl; - str << "CanonExposureMode = " << exchoices[t->toInt(40,SHORT)] << std::endl; - str << "LensType = " << choices[t->toInt(44,SHORT)] << " (" << t->toInt(44,SHORT) << ")" << std::endl; - str << "LongFocal = " << (double)t->toInt(46,SHORT)/t->toInt(50,SHORT) << " mm" << std::endl; - str << "ShortFocal = " << (double)t->toInt(48,SHORT)/t->toInt(50,SHORT) << " mm" << std::endl; - str << "FocalUnits = " << t->toInt(50,SHORT) << std::endl; - str << "MaxAperture = " << pow (2, t->toInt(52,SHORT)/64.0) << std::endl; - str << "MinAperture = " << pow (2, t->toInt(54,SHORT)/64.0) << std::endl; - str << "FlashActivity = " << t->toInt(56,SHORT) << std::endl; - str << "FlashBits = "; - int f = t->toInt(58,SHORT); - if (f&1) - str << "Manual "; - if (f&2) - str << "TTL "; - if (f&4) - str << "A-TTL "; - if (f&8) - str << "E-TTL "; - if (f&16) - str << "FP sync enabled "; - if (f&(1<<7)) - str << "2nd-curtain sync used "; - if (f&(1<<11)) - str << "FP sync used "; - if (f&(1<<13)) - str << "Built-in "; - if (f&(1<<14)) - str << "External "; - str << std::endl; - str << "FocusContinuous = " << fcchoices[t->toInt(64,SHORT)] << std::endl; - str << "AESetting = " << aechoices[t->toInt(66,SHORT)] << std::endl; - str << "ImageStabilization = " << stchoices[t->toInt(68,SHORT)] << " (" << t->toInt(68,SHORT) << ")" << std::endl; - str << "DisplayAperture = " << t->toInt(70,SHORT) << std::endl; - str << "ZoomSourceWidth = " << t->toInt(72,SHORT) << std::endl; - str << "ZoomTargetWidth = " << t->toInt(74,SHORT) << std::endl; - str << "SpotMeteringMode = " << smchoices[t->toInt(78,SHORT)] << std::endl; - str << "PhotoEffect = " << pechoices[t->toInt(80,SHORT)] << std::endl; - str << "ManualFlashOutput = " << mfchoices[t->toInt(82,SHORT)] << std::endl; - str << "ColorTone = " << t->toInt(84,SHORT); - return str.str(); + + virtual std::string toString (Tag* t) + { + int lensID = t->toInt(); + + it_t r; + size_t nFound = choices.count( lensID ); + if( 1== nFound ) { + r = choices.find ( lensID ); + return r->second; + } + + Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxAperture"); + Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength"); + Tag *focalLengthMaxTag = t->getParent()->getRoot()->findTag("LongFocal"); + Tag *focalLengthMinTag = t->getParent()->getRoot()->findTag("ShortFocal"); + Tag *unitTag = t->getParent()->getRoot()->findTag("FocalUnits"); + double maxApertureAtFocal = 0.; + double focalLength = 0.; + double focalLengthMin = 0.; + double focalLengthMax = 0.; + if( apertureTag ) + maxApertureAtFocal = pow(2.0, apertureTag->toDouble()/64.0); + if( unitTag ){ + double unit = unitTag->toDouble(); + if( unit==0. ) unit=1; + if( focalLengthTag ) + focalLength = focalLengthTag->toDouble(); + if( focalLengthMinTag ) + focalLengthMin = focalLengthMinTag->toDouble()/unit; + if( focalLengthMaxTag ) + focalLengthMax = focalLengthMaxTag->toDouble()/unit; + } + + if (0 == nFound) { + std::ostringstream s; + s << "Unknown "; + if (focalLengthMin > 0.) + s << focalLengthMin; + if (focalLengthMax > 0. && focalLengthMax != focalLengthMin) + s << "-" << focalLengthMax; + if (focalLengthMin > 0.) + s << "mm"; + + s << " (" << lensID << ")"; + return s.str(); + } + double deltaMin = 1000.; + + std::string bestMatch("Unknown"); + std::ostringstream candidates; + for (r = choices.lower_bound(lensID); r != choices.upper_bound(lensID); r++) { + double a1,a2,f1,f2,lensAperture,dif; + + if( !extractLensInfo( r->second ,f1,f2,a1,a2) ) + continue; + if( f1 == 0. || a1 == 0.) + continue; + + if( focalLength < f1 - .5 || focalLength > f2 + 0.5 ) + continue; + if( focalLengthMin>0. && fabs(f1-focalLengthMin) > 0.5 ) + continue; + if( focalLengthMax>0. && fabs(f2-focalLengthMax) > 0.5 ) + continue; + if( maxApertureAtFocal > 0.1){ + if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 +0.15) + continue; + + if( a1 == a2 || f1 == f2) + lensAperture = a1; + else + lensAperture = exp( log(a1)+(log(a2)-log(a1))/(log(f2)-log(f1))*(log(focalLength)-log(f1)) ); + + dif = abs(lensAperture - maxApertureAtFocal); + }else + dif = 0; + + if( dif < deltaMin ){ + deltaMin = dif; + bestMatch = r->second; + } + if( dif < 0.15){ + if( candidates.tellp() ) + candidates << "\n or " << r->second; + else + candidates << r->second; + } + + } + if( !candidates.tellp() ) + return bestMatch; + else + return candidates.str(); } }; -CACameraSettingsInterpreter caCameraSettingsInterpreter; +CALensInterpreter caLensInterpreter; - -class CAProcessingInfoInterpreter : public Interpreter { - std::map tcchoices; - std::map sfchoices; - std::map wbchoices; - std::map pschoices; - public: - CAProcessingInfoInterpreter () { - tcchoices[0] = "Standard"; - tcchoices[1] = "Manual"; - tcchoices[2] = "Custom"; - sfchoices[0] = "N/A"; - sfchoices[1] = "Lowest"; - sfchoices[2] = "Low"; - sfchoices[3] = "Standard"; - sfchoices[4] = "High"; - sfchoices[5] = "Highest"; - wbchoices[0] = "Auto"; - wbchoices[1] = "Daylight"; - wbchoices[2] = "Cloudy"; - wbchoices[3] = "Tungsten"; - wbchoices[4] = "Fluorescent"; - wbchoices[5] = "Flash"; - wbchoices[6] = "Custom"; - wbchoices[7] = "Black & White"; - wbchoices[8] = "Shade"; - wbchoices[9] = "Manual Temperature (Kelvin)"; - wbchoices[10] = "PC Set1"; - wbchoices[11] = "PC Set2"; - wbchoices[12] = "PC Set3"; - wbchoices[14] = "Daylight Fluorescent"; - wbchoices[15] = "Custom 1"; - wbchoices[16] = "Custom 2"; - wbchoices[17] = "Underwater"; - pschoices[0] = "None"; - pschoices[1] = "Standard "; - pschoices[2] = "Set 1"; - pschoices[3] = "Set 2"; - pschoices[4] = "Set 3"; - pschoices[0x21] = "User Def. 1"; - pschoices[0x22] = "User Def. 2"; - pschoices[0x23] = "User Def. 3"; - pschoices[0x41] = "External 1"; - pschoices[0x42] = "External 2"; - pschoices[0x43] = "External 3"; - pschoices[0x81] = "Standard"; - pschoices[0x82] = "Portrait"; - pschoices[0x83] = "Landscape"; - pschoices[0x84] = "Neutral"; - pschoices[0x85] = "Faithful"; - pschoices[0x86] = "Monochrome"; - } - virtual std::string toString (Tag* t) { - std::ostringstream str; - str << "ToneCurve = " << tcchoices[t->toInt(2,SHORT)] << std::endl; - str << "Sharpness = " << t->toInt(4,SHORT) << std::endl; - str << "SharpnessFrequency = " << sfchoices[t->toInt(6,SHORT)] << std::endl; - str << "SensorRedLevel = " << t->toInt(8,SHORT) << std::endl; - str << "SensorBlueLevel = " << t->toInt(10,SHORT) << std::endl; - str << "WhiteBalanceRed = " << t->toInt(12,SHORT) << std::endl; - str << "WhiteBalanceBlue = " << t->toInt(14,SHORT) << std::endl; - str << "WhiteBalance = " << wbchoices[t->toInt(16,SHORT)] << std::endl; - str << "ColorTemperature = " << t->toInt(18,SHORT) << std::endl; - str << "PictureStyle = " << pschoices[t->toInt(20,SHORT)] << std::endl; - str << "DigitalGain = " << t->toInt(22,SHORT) << std::endl; - str << "WBShiftAB = " << t->toInt(24,SHORT) << std::endl; - str << "WBShiftGM = " << t->toInt(26,SHORT); - return str.str(); - } +class CAFocalTypeInterpreter : public ChoiceInterpreter { +public: + CAFocalTypeInterpreter(){ + choices[0] = "undef"; + choices[1] = "Fixed"; + choices[2] = "Zoom"; + } }; -CAProcessingInfoInterpreter caProcessingInfoInterpreter; +CAFocalTypeInterpreter caFocalTypeInterpreter; -class CAShotInfoInterpreter : public Interpreter { - std::map sschoices; - std::map afchoices; - std::map aechoices; - std::map wbchoices; - std::map ctchoices; - std::map cmchoices; - std::map archoices; - std::map ndchoices; - public: - CAShotInfoInterpreter () { - sschoices[0] = "Off"; - sschoices[1] = "Night Scene"; - sschoices[2] = "On"; - sschoices[3] = "None"; - afchoices[0x3000] = "None (MF)"; - afchoices[0x3001] = "Right"; - afchoices[0x3002] = "Center"; - afchoices[0x3003] = "Center+Right"; - afchoices[0x3004] = "Left"; - afchoices[0x3005] = "Left+Right"; - afchoices[0x3006] = "Left+Center"; - afchoices[0x3007] = "All"; - wbchoices[0] = "Auto"; - wbchoices[1] = "Daylight"; - wbchoices[2] = "Cloudy"; - wbchoices[3] = "Tungsten"; - wbchoices[4] = "Fluorescent"; - wbchoices[5] = "Flash"; - wbchoices[6] = "Custom"; - wbchoices[7] = "Black & White"; - wbchoices[8] = "Shade"; - wbchoices[9] = "Manual Temperature (Kelvin)"; - wbchoices[10] = "PC Set1"; - wbchoices[11] = "PC Set2"; - wbchoices[12] = "PC Set3"; - wbchoices[14] = "Daylight Fluorescent"; - wbchoices[15] = "Custom 1"; - wbchoices[16] = "Custom 2"; - wbchoices[17] = "Underwater"; - aechoices[-1] = "On "; - aechoices[0] = "Off "; - aechoices[1] = "On (shot 1)"; - aechoices[2] = "On (shot 2)"; - aechoices[3] = "On (shot 3)"; - cmchoices[0] = "n/a"; - cmchoices[1] = "Camera Local Control"; - cmchoices[3] = "Computer Remote Control"; - ctchoices[248] = "EOS High-end"; - ctchoices[250] = "Compact"; - ctchoices[252] = "EOS Mid-end"; - ctchoices[255] = "DV Camera"; - ctchoices[0x23] = "User Def. 3"; - archoices[-1] = "Rotated by Software"; - archoices[0] = "None"; - archoices[1] = "Rotate 90 CW"; - archoices[2] = "Rotate 180"; - archoices[3] = "Rotate 270 CW"; - ndchoices[0] = "Off"; - ndchoices[1] = "On"; - } - virtual std::string toString (Tag* t) { - std::ostringstream str; - str << "AutoISO = " << t->toInt(2,SHORT) << std::endl; - str << "BaseISO = " << pow (2, t->toInt(4,SHORT)/32.0 - 4) * 50 << std::endl; - str << "MeasuredEV = " << t->toInt(6,SHORT) << std::endl; - str << "TargetAperture = " << pow (2, t->toInt(8,SHORT)/64.0) << std::endl; - str << "TargetExposureTime = " << pow (2, -t->toInt(10,SHORT)/32.0) << std::endl; - str << "ExposureCompensation = " << t->toInt(12,SHORT)/32.0 << std::endl; - str << "WhiteBalance = " << wbchoices[t->toInt(14,SHORT)] << std::endl; - str << "SlowShutter = " << sschoices[t->toInt(16,SHORT)] << std::endl; - str << "SequenceNumber = " << t->toInt(18,SHORT) << std::endl; - str << "OpticalZoomCode = " << t->toInt(20,SHORT) << std::endl; - str << "FlashGuideNumber = " << t->toInt(26,SHORT) << std::endl; - str << "AFPointsInFocus = " << afchoices[t->toInt(28,SHORT)] << std::endl; - str << "FlashExposureComp = " << t->toInt(30,SHORT) << std::endl; - str << "AutoExposureBracketing = " << afchoices[t->toInt(32,SHORT)] << std::endl; - str << "AEBBracketValue = " << t->toInt(34,SHORT) << std::endl; - str << "ControlMode = " << cmchoices[t->toInt(36,SHORT)] << std::endl; - str << "FocusDistanceUpper = " << t->toInt(38,SHORT) << std::endl; - str << "FocusDistanceLower = " << t->toInt(40,SHORT) << std::endl; - str << "FNumber = " << pow (2, t->toInt(42,SHORT)/64.0) << std::endl; - str << "ExposureTime = " << pow (2, -t->toInt(44,SHORT)/32.0) << std::endl; - str << "BulbDuration = " << t->toInt(48,SHORT) << std::endl; - str << "CameraType = " << ctchoices[t->toInt(52,SHORT)] << std::endl; - str << "AutoRotate = " << archoices[t->toInt(54,SHORT)] << std::endl; - str << "NDFilter = " << ndchoices[t->toInt(56,SHORT)] << std::endl; - str << "Self-timer2 = " << t->toInt(58,SHORT) << std::endl; - str << "FlashOutput = " << t->toInt(66,SHORT); - return str.str(); - } +class CAFocalPlaneInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + int val = t->toInt(); + if( val <40 ) return "undef"; + char buffer[32]; + sprintf (buffer, "%0.2fmm", val *25.4 / 1000); + return buffer; + } }; -CAShotInfoInterpreter caShotInfoInterpreter; +CAFocalPlaneInterpreter caFocalPlaneInterpreter; - -class CAFileInfoInterpreter : public Interpreter { - std::map bmchoices; - std::map rjqchoices; - std::map rjschoices; - std::map nrchoices; - std::map wbchoices; - std::map fechoices; - std::map techoices; - public: - CAFileInfoInterpreter () { - bmchoices[0] = "Off"; - bmchoices[1] = "AEB"; - bmchoices[2] = "FEB"; - bmchoices[3] = "ISO"; - bmchoices[4] = "WB"; - - rjqchoices[1] = "Economy"; - rjqchoices[2] = "Normal"; - rjqchoices[3] = "Fine"; - rjqchoices[4] = "RAW"; - rjqchoices[5] = "Superfine"; - - rjschoices[0] = "Large"; - rjschoices[1] = "Medium"; - rjschoices[2] = "Small"; - rjschoices[5] = "Medium 1"; - rjschoices[6] = "Medium 2"; - rjschoices[7] = "Medium 3"; - rjschoices[8] = "Postcard"; - rjschoices[9] = "Widescreen"; - - nrchoices[0] = "Off"; - nrchoices[1] = "On (mode 1)"; - nrchoices[2] = "On (mode 2)"; - nrchoices[3] = "On (mode 3)"; - nrchoices[4] = "On (mode 4)"; - - wbchoices[0] = "Off"; - wbchoices[1] = "On (shift AB)"; - wbchoices[2] = "On (shift GM)"; - - fechoices[0] = "None"; - fechoices[1] = "Yellow"; - fechoices[2] = "Orange"; - fechoices[3] = "Red"; - fechoices[4] = "Green"; - - techoices[0] = "None"; - techoices[1] = "Sepia"; - techoices[2] = "Blue"; - techoices[3] = "Purple"; - techoices[4] = "Green"; - - } - virtual std::string toString (Tag* t) { - - std::ostringstream str; - str << "FileNumber = " << t->toInt(1,SHORT) << std::endl; - str << "ShutterCount = " << t->toInt(0,LONG) << std::endl; - str << "BracketMode = " << bmchoices[t->toInt(6,SHORT)] << std::endl; - str << "BracketValue = " << t->toInt(8,SHORT) << std::endl; - str << "BracketShotNumber = " << t->toInt(10,SHORT) << std::endl; - str << "RawJpgQuality = " << rjqchoices[t->toInt(12,SHORT)] << std::endl; - str << "RawJpgSize = " << rjschoices[t->toInt(14,SHORT)] << std::endl; - str << "NoiseReduction = " << nrchoices[t->toInt(16,SHORT)] << std::endl; - str << "WBBracketMode = " << t->toInt(18,SHORT) << std::endl; - str << "WBBracketValueAB = " << t->toInt(24,SHORT) << std::endl; - str << "FilterEffect = " << fechoices[t->toInt(26,SHORT)] << std::endl; - str << "ToningEffect = " << techoices[t->toInt(30,SHORT)]; - return str.str(); - } +class CAExposureTimeInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + char buffer[32]; + sprintf (buffer, "%0.3f", pow (2, - t->toInt()/32.0) ); + return buffer; + } }; -CAFileInfoInterpreter caFileInfoInterpreter; +CAExposureTimeInterpreter caExposureTimeInterpreter; + +class CAEVInterpreter : public Interpreter { + virtual std::string toString (Tag* t) { + char buffer[32]; + sprintf (buffer, "%0.1f", t->toDouble()/32.0 ); + return buffer; + } +}; +CAEVInterpreter caEVInterpreter; + +class CABaseISOInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + char buffer[32]; + sprintf (buffer, "%0.0f", pow (2, t->toInt()/32.0 - 4) * 50 ); + return buffer; + } +}; +CABaseISOInterpreter caBaseISOInterpreter; + +class CAToneCurveInterpreter : public ChoiceInterpreter { +public: + CAToneCurveInterpreter(){ + choices[0] = "Standard"; + choices[1] = "Manual"; + choices[2] = "Custom"; + } +}; +CAToneCurveInterpreter caToneCurveInterpreter; + +class CASharpnessFrequencyInterpreter : public ChoiceInterpreter { +public: + CASharpnessFrequencyInterpreter(){ + choices[0] = "N/A"; + choices[1] = "Lowest"; + choices[2] = "Low"; + choices[3] = "Standard"; + choices[4] = "High"; + choices[5] = "Highest"; + } +}; +CASharpnessFrequencyInterpreter caSharpnessFrequencyInterpreter; + +class CAWhiteBalanceInterpreter : public ChoiceInterpreter { +public: + CAWhiteBalanceInterpreter(){ + choices[0] = "Auto"; + choices[1] = "Daylight"; + choices[2] = "Cloudy"; + choices[3] = "Tungsten"; + choices[4] = "Fluorescent"; + choices[5] = "Flash"; + choices[6] = "Custom"; + choices[7] = "Black & White"; + choices[8] = "Shade"; + choices[9] = "Manual Temperature (Kelvin)"; + choices[10] = "PC Set1"; + choices[11] = "PC Set2"; + choices[12] = "PC Set3"; + choices[14] = "Daylight Fluorescent"; + choices[15] = "Custom 1"; + choices[16] = "Custom 2"; + choices[17] = "Underwater"; + } +}; +CAWhiteBalanceInterpreter caWhiteBalanceInterpreter; + +class CAPictureStyleInterpreter : public ChoiceInterpreter { +public: + CAPictureStyleInterpreter(){ + choices[0] = "None"; + choices[1] = "Standard "; + choices[2] = "Set 1"; + choices[3] = "Set 2"; + choices[4] = "Set 3"; + choices[0x21] = "User Def. 1"; + choices[0x22] = "User Def. 2"; + choices[0x23] = "User Def. 3"; + choices[0x41] = "External 1"; + choices[0x42] = "External 2"; + choices[0x43] = "External 3"; + choices[0x81] = "Standard"; + choices[0x82] = "Portrait"; + choices[0x83] = "Landscape"; + choices[0x84] = "Neutral"; + choices[0x85] = "Faithful"; + choices[0x86] = "Monochrome"; + } +}; +CAPictureStyleInterpreter caPictureStyleInterpreter; + +class CASlowShutterInterpreter : public ChoiceInterpreter { +public: + CASlowShutterInterpreter(){ + choices[0] = "Off"; + choices[1] = "Night Scene"; + choices[2] = "On"; + choices[3] = "None"; + } +}; +CASlowShutterInterpreter caSlowShutterInterpreter; + +class CAFlashGuideNumberInterpreter : public Interpreter{ +public: + virtual std::string toString (Tag* t) { + int n= t->toInt(); + if( n==-1) return "undef"; + char buffer[32]; + sprintf (buffer, "%0.f", n/32. ); + return buffer; + } +}; +CAFlashGuideNumberInterpreter caFlashGuideNumberInterpreter; + +class CAAFPointsInFocusInterpreter : public ChoiceInterpreter { +public: + CAAFPointsInFocusInterpreter(){ + choices[0x3000] = "None (MF)"; + choices[0x3001] = "Right"; + choices[0x3002] = "Center"; + choices[0x3003] = "Center+Right"; + choices[0x3004] = "Left"; + choices[0x3005] = "Left+Right"; + choices[0x3006] = "Left+Center"; + choices[0x3007] = "All"; + } +}; +CAAFPointsInFocusInterpreter caAFPointsInFocusInterpreter; + +class CAAutoExposureBracketingInterpreter : public ChoiceInterpreter { +public: + CAAutoExposureBracketingInterpreter(){ + choices[-1] = "On "; + choices[0] = "Off "; + choices[1] = "On (shot 1)"; + choices[2] = "On (shot 2)"; + choices[3] = "On (shot 3)"; + } +}; +CAAutoExposureBracketingInterpreter caAutoExposureBracketingInterpreter; + +class CAControModeInterpreter : public ChoiceInterpreter { +public: + CAControModeInterpreter(){ + choices[0] = "n/a"; + choices[1] = "Camera Local Control"; + choices[3] = "Computer Remote Control"; + } +}; +CAControModeInterpreter caControModeInterpreter; + +class CAFocusDistanceInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + char buffer[32]; + sprintf (buffer, "%0.2f", t->toDouble()/100 ); + return buffer; + } +}; +CAFocusDistanceInterpreter caFocusDistanceInterpreter; + +class CAMeasuredEVInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + char buffer[32]; + sprintf (buffer, "%0.1f", t->toDouble()/8 - 6 ); + return buffer; + } +}; +CAMeasuredEVInterpreter caMeasuredEVInterpreter; + +class CACameraTypeInterpreter : public ChoiceInterpreter { +public: + CACameraTypeInterpreter(){ + choices[248] = "EOS High-end"; + choices[250] = "Compact"; + choices[252] = "EOS Mid-end"; + choices[255] = "DV Camera"; + } +}; +CACameraTypeInterpreter caCameraTypeInterpreter; + +class CAAutoRotateInterpreter : public ChoiceInterpreter { +public: + CAAutoRotateInterpreter(){ + choices[-1] = "Rotated by Software"; + choices[0] = "None"; + choices[1] = "Rotate 90 CW"; + choices[2] = "Rotate 180"; + choices[3] = "Rotate 270 CW"; + } +}; +CAAutoRotateInterpreter caAutoRotateInterpreter; + +class CABracketModeInterpreter : public ChoiceInterpreter { +public: + CABracketModeInterpreter(){ + choices[0] = "Off"; + choices[1] = "AEB"; + choices[2] = "FEB"; + choices[3] = "ISO"; + choices[4] = "WB"; + } +}; +CABracketModeInterpreter caBracketModeInterpreter; + +class CARAWJpegQualityInterpreter : public ChoiceInterpreter { +public: + CARAWJpegQualityInterpreter(){ + choices[1] = "Economy"; + choices[2] = "Normal"; + choices[3] = "Fine"; + choices[4] = "RAW"; + choices[5] = "Superfine"; + } +}; +CARAWJpegQualityInterpreter caRAWJpegQualityInterpreter; + +class CAJpegSizeInterpreter : public ChoiceInterpreter { +public: + CAJpegSizeInterpreter(){ + choices[0] = "Large"; + choices[1] = "Medium"; + choices[2] = "Small"; + choices[5] = "Medium 1"; + choices[6] = "Medium 2"; + choices[7] = "Medium 3"; + choices[8] = "Postcard"; + choices[9] = "Widescreen"; + } +}; +CAJpegSizeInterpreter caJpegSizeInterpreter; + +class CAWBBracketModeInterpreter : public ChoiceInterpreter { +public: + CAWBBracketModeInterpreter(){ + choices[0] = "Off"; + choices[1] = "Shift AB"; + choices[2] = "shift GM"; + } +}; +CAWBBracketModeInterpreter caWBBracketModeInterpreter; + +class CAFilterEffectInterpreter : public ChoiceInterpreter { +public: + CAFilterEffectInterpreter(){ + choices[0] = "None"; + choices[1] = "Yellow"; + choices[2] = "Orange"; + choices[3] = "Red"; + choices[4] = "Green"; + } +}; +CAFilterEffectInterpreter caFilterEffectInterpreter; + +class CAToningEffectInterpreter : public ChoiceInterpreter { +public: + CAToningEffectInterpreter(){ + choices[0] = "None"; + choices[1] = "Sepia"; + choices[2] = "Blue"; + choices[3] = "Purple"; + choices[4] = "Green"; + } +}; +CAToningEffectInterpreter caToningEffectInterpreter; + +class CAFileNumberInterpreter : public Interpreter { +public: + virtual std::string toString (Tag* t) { + unsigned long val = t->toInt(0,LONG); + char buffer[32]; + sprintf (buffer, "%ld", ((val&0xffc0)>>6)*10000+((val>>16)&0xff)+((val&0x3f)<<8) ); + return buffer; + } +}; +CAFileNumberInterpreter caFileNumberInterpreter; class CAModelIDInterpreter : public ChoiceInterpreter { public: @@ -769,12 +1126,77 @@ class CAModelIDInterpreter : public ChoiceInterpreter { choices[0x2290000] = "PowerShot SX100 IS"; choices[0x2300000] = "PowerShot SD950 IS / Digital IXUS 960 IS / IXY Digital 2000 IS"; choices[0x2310000] = "PowerShot SD870 IS / Digital IXUS 860 IS / IXY Digital 910 IS"; + choices[0x2320000] = "PowerShot SD890 IS / Digital IXUS 970 IS / IXY Digital 820 IS"; + choices[0x2360000] = "PowerShot SD790 IS / Digital IXUS 90 IS / IXY Digital 95 IS"; + choices[0x2370000] = "PowerShot SD770 IS / Digital IXUS 85 IS / IXY Digital 25 IS"; + choices[0x2380000] = "PowerShot A590 IS"; + choices[0x2390000] = "PowerShot A580"; + choices[0x2420000] = "PowerShot A470"; + choices[0x2430000] = "PowerShot SD1100 IS / Digital IXUS 80 IS / IXY Digital 20 IS"; + choices[0x2460000] = "PowerShot SX1 IS"; + choices[0x2470000] = "PowerShot SX10 IS"; + choices[0x2480000] = "PowerShot A1000 IS"; + choices[0x2490000] = "PowerShot G10"; + choices[0x2510000] = "PowerShot A2000 IS"; + choices[0x2520000] = "PowerShot SX110 IS"; + choices[0x2530000] = "PowerShot SD990 IS / Digital IXUS 980 IS / IXY Digital 3000 IS"; + choices[0x2540000] = "PowerShot SD880 IS / Digital IXUS 870 IS / IXY Digital 920 IS"; + choices[0x2550000] = "PowerShot E1"; + choices[0x2560000] = "PowerShot D10"; + choices[0x2570000] = "PowerShot SD960 IS / Digital IXUS 110 IS / IXY Digital 510 IS"; + choices[0x2580000] = "PowerShot A2100 IS"; + choices[0x2590000] = "PowerShot A480"; + choices[0x2600000] = "PowerShot SX200 IS"; + choices[0x2610000] = "PowerShot SD970 IS / Digital IXUS 990 IS / IXY Digital 830 IS"; + choices[0x2620000] = "PowerShot SD780 IS / Digital IXUS 100 IS / IXY Digital 210 IS"; + choices[0x2630000] = "PowerShot A1100 IS"; + choices[0x2640000] = "PowerShot SD1200 IS / Digital IXUS 95 IS / IXY Digital 110 IS"; + choices[0x2700000] = "PowerShot G11"; + choices[0x2710000] = "PowerShot SX120 IS"; + choices[0x2720000] = "PowerShot S90"; + choices[0x2750000] = "PowerShot SX20 IS"; + choices[0x2760000] = "PowerShot SD980 IS / Digital IXUS 200 IS / IXY Digital 930 IS"; + choices[0x2770000] = "PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS"; + choices[0x2800000] = "PowerShot A495"; + choices[0x2810000] = "PowerShot A490"; + choices[0x2820000] = "PowerShot A3100 IS"; + choices[0x2830000] = "PowerShot A3000 IS"; + choices[0x2840000] = "PowerShot SD1400 IS / IXUS 130 / IXY 400F"; + choices[0x2850000] = "PowerShot SD1300 IS / IXUS 105 / IXY 200F"; + choices[0x2860000] = "PowerShot SD3500 IS / IXUS 210 / IXY 10S"; + choices[0x2870000] = "PowerShot SX210 IS"; + choices[0x2880000] = "PowerShot SD4000 IS / IXUS 300 HS / IXY 30S"; + choices[0x2890000] = "PowerShot SD4500 IS / IXUS 1000 HS / IXY 50S"; + choices[0x2920000] = "PowerShot G12"; + choices[0x2930000] = "PowerShot SX30 IS"; + choices[0x2940000] = "PowerShot SX130 IS"; + choices[0x2950000] = "PowerShot S95"; choices[0x3010000] = "PowerShot Pro90 IS"; choices[0x4040000] = "PowerShot G1"; choices[0x6040000] = "PowerShot S100 / Digital IXUS / IXY Digital"; - choices[0x4007d675] = "HV10"; - choices[0x4007d777] = "iVIS DC50"; - choices[0x4007d778] = "iVIS HV20"; + choices[0x4007d673] = "DC19 / DC21 / DC22"; + choices[0x4007d674] = "XH A1"; + choices[0x4007d675] = "HV10"; + choices[0x4007d676] = "MD130 / MD140 / MD150 / MD160"; + choices[0x4007d777] = "iVIS DC50"; + choices[0x4007d778] = "iVIS HV20"; + choices[0x4007d779] = "DC211"; + choices[0x4007d77a] = "HG10"; + choices[0x4007d77b] = "iVIS HR10"; + choices[0x4007d878] = "HV30"; + choices[0x4007d87e] = "DC301 / DC310 / DC311 / DC320 / DC330"; + choices[0x4007d87f] = "FS100"; + choices[0x4007d880] = "iVIS HF10"; + choices[0x4007d882] = "HG20 / HG21 / VIXIA HG21"; + choices[0x4007d925] = "LEGRIA HF21"; + choices[0x4007d978] = "LEGRIA HV40"; + choices[0x4007d987] = "DC410 / DC420"; + choices[0x4007d988] = "LEGRIA FS19 / FS20 / FS21 / FS22 / FS200"; + choices[0x4007d989] = "LEGRIA HF20 / HF200"; + choices[0x4007d98a] = "VIXIA HF S10 / S100"; + choices[0x4007da8e] = "LEGRIA HF R16 / R17 / R106"; + choices[0x4007da90] = "LEGRIA HF S21 / VIXIA HF S200"; + choices[0x4007da92] = "LEGRIA FS36 / FS305 / FS306 / FS307"; choices[0x80000001] = "EOS-1D"; choices[0x80000167] = "EOS-1DS"; choices[0x80000168] = "EOS 10D"; @@ -782,28 +1204,198 @@ class CAModelIDInterpreter : public ChoiceInterpreter { choices[0x80000170] = "EOS Digital Rebel / 300D / Kiss Digital"; choices[0x80000174] = "EOS-1D Mark II"; choices[0x80000175] = "EOS 20D"; + choices[0x80000176] = "EOS Digital Rebel XSi / 450D / Kiss X2"; choices[0x80000188] = "EOS-1Ds Mark II"; choices[0x80000189] = "EOS Digital Rebel XT / 350D / Kiss Digital N"; choices[0x80000190] = "EOS 40D"; choices[0x80000213] = "EOS 5D"; choices[0x80000215] = "EOS-1Ds Mark III"; + choices[0x80000218] = "EOS 5D Mark II"; choices[0x80000232] = "EOS-1D Mark II N"; choices[0x80000234] = "EOS 30D"; choices[0x80000236] = "EOS Digital Rebel XTi / 400D / Kiss Digital X"; + choices[0x80000250] = "EOS 7D"; + choices[0x80000252] = "EOS Rebel T1i / 500D / Kiss X3"; choices[0x80000254] = "EOS Rebel XS / 1000D / Kiss F"; choices[0x80000261] = "EOS 50D"; + choices[0x80000270] = "EOS Rebel T2i / 550D / Kiss X4"; + choices[0x80000281] = "EOS-1D Mark IV"; + choices[0x80000287] = "EOS 60D"; } }; - CAModelIDInterpreter caModelIDInterpreter; +class CAPanoramaDirectionInterpreter : public ChoiceInterpreter { +public: + CAPanoramaDirectionInterpreter(){ + choices[0] = "Left to Right"; + choices[1] = "Right to Left"; + choices[2] = "Bottom to Top"; + choices[3] = "Top to Bottom"; + choices[4] = "2x2 Matrix (Clockwise)"; + } +}; +CAPanoramaDirectionInterpreter caPanoramaDirectionInterpreter; + +class CAAspectRatioInterpreter : public ChoiceInterpreter { +public: + CAAspectRatioInterpreter(){ + choices[0] = "3:2"; + choices[1] = "1:1"; + choices[2] = "4:3"; + choices[7] = "16:9"; + } + +}; +CAAspectRatioInterpreter caAspectRatioInterpreter; + +const TagAttrib canonCameraSettingsAttribs[] = { + {0, 1, 0, 0, 1, "MacroMode", &caMacroModeInterpreter}, + {0, 1, 0, 0, 2, "SelfTimer", &caSelfTimerInterpreter}, + {0, 1, 0, 0, 3, "Quality", &caQualityInterpreter}, + {0, 1, 0, 0, 4, "CanonFlashMode", &caFlashModeInterpreter}, + {0, 1, 0, 0, 5, "ContinuousDrive", &caContinuousDriveInterpreter}, + {0, 1, 0, 0, 7, "FocusMode", &caFocusModeInterpreter}, + {0, 1, 0, 0, 9, "RecordMode", &caRecordModeInterpreter}, + {0, 1, 0, 0, 10, "CanonImageSize", &caImageSizeInterpreter}, + {0, 1, 0, 0, 11, "EasyMode", &caEasyModeInterpreter}, + {0, 1, 0, 0, 12, "DigitalZoom", &caDigitalZoomInterpreter}, + {0, 1, 0, 0, 13, "Contrast", &stdInterpreter}, + {0, 1, 0, 0, 14, "Saturation", &stdInterpreter}, + {0, 1, 0, 0, 15, "Sharpness", &stdInterpreter}, + {0, 1, 0, 0, 16, "CameraISO", &stdInterpreter}, + {0, 1, 0, 0, 17, "MeteringMode", &caMeteringModeInterpreter}, + {0, 1, 0, 0, 18, "FocusRange", &caFocusRangeInterpreter}, + {0, 1, 0, 0, 19, "AFPoint", &caAFPointInterpreter}, + {0, 1, 0, 0, 20, "CanonExposureMode", &caExposureModeInterpreter}, + {0, 1, 0, 0, 22, "LensID", &caLensInterpreter}, + {0, 1, 0, 0, 23, "LongFocal", &caFocalInterpreter}, + {0, 1, 0, 0, 24, "ShortFocal", &caFocalInterpreter}, + {0, 1, 0, 0, 25, "FocalUnits", &stdInterpreter}, + {0, 1, 0, 0, 26, "MaxAperture", &caApertureInterpreter}, + {0, 1, 0, 0, 27, "MinAperture", &caApertureInterpreter}, + {0, 1, 0, 0, 28, "FlashActivity", &stdInterpreter}, + {0, 1, 0, 0, 29, "FlashBits", &caFlashBitsInterpreter}, + {0, 1, 0, 0, 32, "FocusContinuous", &caFocusContinuousInterpreter}, + {0, 1, 0, 0, 33, "AESetting", &caAESettingsInterpreter}, + {0, 1, 0, 0, 34, "ImageStabilization", &caStabilizationInterpreter}, + {0, 1, 0, 0, 35, "DisplayAperture", &stdInterpreter}, + {0, 1, 0, 0, 36, "ZoomSourceWidth", &stdInterpreter}, + {0, 1, 0, 0, 37, "ZoomTargetWidth", &stdInterpreter}, + {0, 1, 0, 0, 39, "SpotMeteringMode", &caSpotMeteringInterpreter}, + {0, 1, 0, 0, 40, "PhotoEffect", &caPhotoEffectInterpreter}, + {0, 1, 0, 0, 41, "ManualFlashOutput", &caManualFlashInterpreter}, + {0, 1, 0, 0, 42, "ColorTone", &stdInterpreter}, + {0, 1, 0, 0, 46, "SRAWQuality", &caRAWQualityInterpreter}, + {-1, 0, 0, 0, 0, "", NULL} +}; + +const TagAttrib canonFocalLengthAttribs[] = { + {0, 1, 0, 0, 0, "FocalType", &caFocalTypeInterpreter}, + {0, 1, 0, 0, 1, "FocalLength", &caFocalInterpreter}, + {0, 1, 0, 0, 2, "FocalPlaneXSize", &caFocalPlaneInterpreter}, + {0, 1, 0, 0, 3, "FocalPlaneYSize", &caFocalPlaneInterpreter}, + {-1, 0, 0, 0, 0, "", NULL} +}; + +const TagAttrib canonShotInfoAttribs[] = { + {0, 1, 0, 0, 1, "AutoISO", &stdInterpreter}, + {0, 1, 0, 0, 2, "BaseISO" ,&caBaseISOInterpreter}, + {0, 1, 0, 0, 3, "MeasuredEV", &stdInterpreter}, + {0, 1, 0, 0, 4, "TargetAperture", &caApertureInterpreter}, + {0, 1, 0, 0, 5, "TargetExposureTime",&caExposureTimeInterpreter}, + {0, 1, 0, 0, 6, "ExposureCompensation",&caEVInterpreter}, + {0, 1, 0, 0, 7, "WhiteBalance",&caWhiteBalanceInterpreter}, + {0, 1, 0, 0, 8, "SlowShutter",&caSlowShutterInterpreter}, + {0, 1, 0, 0, 9, "SequenceNumber", &stdInterpreter}, + {0, 1, 0, 0,10, "OpticalZoomCode", &stdInterpreter}, + {0, 1, 0, 0,13, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, + {0, 1, 0, 0,14, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, + {0, 1, 0, 0,15, "FlashExposureComp", &stdInterpreter}, + {0, 1, 0, 0,16, "AutoExposureBracketing",&caAutoExposureBracketingInterpreter}, + {0, 1, 0, 0,17, "AEBBracketValue", &stdInterpreter}, + {0, 1, 0, 0,18, "ControlMode", &caControModeInterpreter}, + {0, 1, 0, 0,19, "FocusDistanceUpper", &caFocusDistanceInterpreter}, + {0, 1, 0, 0,20, "FocusDistanceLower", &caFocusDistanceInterpreter}, + {0, 1, 0, 0,21, "FNumber" ,&caApertureInterpreter}, + {0, 1, 0, 0,22, "ExposureTime",&caExposureTimeInterpreter}, + {0, 1, 0, 0,24, "BulbDuration", &stdInterpreter}, + {0, 1, 0, 0,24, "MeasuredEV2", &caMeasuredEVInterpreter}, + {0, 1, 0, 0,26, "CameraType", &caCameraTypeInterpreter}, + {0, 1, 0, 0,27, "AutoRotate",&caAutoRotateInterpreter}, + {0, 1, 0, 0,28, "NDFilter",&caOnOffInterpreter}, + {0, 1, 0, 0,29, "Self-timer2", &stdInterpreter}, + {0, 1, 0, 0,33, "FlashOutput", &stdInterpreter}, + {-1, 0, 0, 0, 0, "", NULL}, +}; + +const TagAttrib canonFileInfoAttribs[] = { + {0, 1, 0, 0, 1, "FileNumber", &caFileNumberInterpreter}, + {0, 1, 0, 0, 3, "BracketMode", &caBracketModeInterpreter}, + {0, 1, 0, 0, 4, "BracketValue", &stdInterpreter}, + {0, 1, 0, 0, 5, "BracketShotNumber", &stdInterpreter}, + {0, 1, 0, 0, 6, "RawJpgQuality",&caRAWJpegQualityInterpreter}, + {0, 1, 0, 0, 7, "RawJpgSize",&caJpegSizeInterpreter}, + {0, 1, 0, 0, 8, "NoiseReduction",&stdInterpreter}, + {0, 1, 0, 0, 9, "WBBracketMode" ,&caWBBracketModeInterpreter}, + {0, 1, 0, 0,12, "WBBracketValueAB", &stdInterpreter}, + {0, 1, 0, 0,13, "WBBracketValueGM", &stdInterpreter}, + {0, 1, 0, 0,14, "FilterEffect" ,&caFilterEffectInterpreter}, + {0, 1, 0, 0,15, "ToningEffect" ,&caToningEffectInterpreter}, + {0, 1, 0, 0,19, "LiveViewShooting" ,&caOnOffInterpreter}, + {0, 1, 0, 0,25, "FlashExposureLock" ,&caOnOffInterpreter}, + {-1,0, 0, 0, 0, "", NULL}, +}; + +const TagAttrib canonProcessingInfoAttribs[] = { + {0, 1, 0, 0, 1,"ToneCurve", &caToneCurveInterpreter}, + {0, 1, 0, 0, 2,"Sharpness", &stdInterpreter}, + {0, 1, 0, 0, 3,"SharpnessFrequency", &caSharpnessFrequencyInterpreter}, + {0, 1, 0, 0, 4,"SensorRedLevel", &stdInterpreter}, + {0, 1, 0, 0, 5,"SensorBlueLevel", &stdInterpreter}, + {0, 1, 0, 0, 6,"WhiteBalanceRed", &stdInterpreter}, + {0, 1, 0, 0, 7,"WhiteBalanceBlue", &stdInterpreter}, + {0, 1, 0, 0, 8,"WhiteBalance", &caWhiteBalanceInterpreter}, + {0, 1, 0, 0, 9,"ColorTemperature", &stdInterpreter}, + {0, 1, 0, 0,10,"PictureStyle", &caPictureStyleInterpreter}, + {0, 1, 0, 0,11,"DigitalGain", &stdInterpreter}, + {0, 1, 0, 0,12,"WBShiftAB", &stdInterpreter}, + {0, 1, 0, 0,13,"WBShiftGM", &stdInterpreter}, + {-1,0, 0, 0, 0, "", NULL}, +}; + +const TagAttrib canonPanoramaInfoAttribs[] = { + {0, 1, 0, 0, 2,"PanoramaFrameNumber", &stdInterpreter}, + {0, 1, 0, 0, 5,"PanoramaDirection", &caPanoramaDirectionInterpreter}, + {-1,0, 0, 0, 0, "", NULL}, +}; + +const TagAttrib canonCropInfoAttribs[] = { + {0, 1, 0, 0, 0,"CropLeftMargin", &stdInterpreter}, + {0, 1, 0, 0, 1,"CropRightMargin", &stdInterpreter}, + {0, 1, 0, 0, 2,"CropTopMargin", &stdInterpreter}, + {0, 1, 0, 0, 3,"CropBottomMargin", &stdInterpreter}, + {-1,0, 0, 0, 0, "", NULL}, +}; + +const TagAttrib canonAspectInfoAttribs[] = { + {0, 1, 0, 0, 0,"AspectRatio", &caAspectRatioInterpreter}, + {0, 1, 0, 0, 1,"CroppedImageWidth", &stdInterpreter}, + {0, 1, 0, 0, 2,"CroppedImageHeight", &stdInterpreter}, + {-1,0, 0, 0, 0, "", NULL}, +}; + +const TagAttrib canonMicroAdjustAttrib[] = { + {0, 1, 0, 0, 1,"AFMicroAdjActive", &caOnOffInterpreter}, + {-1,0, 0, 0, 2,"AFMicroAdjValue", &stdInterpreter}, +}; const TagAttrib canonAttribs[] = { - {0, 1, 0, 0, 0x0001, "CanonCameraSettings", &caCameraSettingsInterpreter}, - {0, 1, 0, 0, 0x0002, "CanonFocalLength", &caFocalLengthInterpreter}, + {0, 1, 0, canonCameraSettingsAttribs, 0x0001, "CanonCameraSettings", &stdInterpreter}, + {0, 1, 0, canonFocalLengthAttribs, 0x0002, "CanonFocalLength", &stdInterpreter}, {0, 1, 0, 0, 0x0003, "CanonFlashInfo", &stdInterpreter}, - {0, 1, 0, 0, 0x0004, "CanonShotInfo", &caShotInfoInterpreter}, - {0, 1, 0, 0, 0x0005, "CanonPanorama", &stdInterpreter}, + {0, 1, 0, canonShotInfoAttribs, 0x0004, "CanonShotInfo", &stdInterpreter}, + {0, 1, 0, canonPanoramaInfoAttribs, 0x0005, "CanonPanorama", &stdInterpreter}, {0, 1, 0, 0, 0x0006, "CanonImageType", &stdInterpreter}, {0, 1, 0, 0, 0x0007, "CanonFirmwareVersion", &stdInterpreter}, {0, 1, 0, 0, 0x0008, "FileNumber", &stdInterpreter}, @@ -826,18 +1418,21 @@ const TagAttrib canonAttribs[] = { {0, 1, 0, 0, 0x0090, "CustomFunctions1D", &stdInterpreter}, {0, 1, 0, 0, 0x0091, "PersonalFunctions", &stdInterpreter}, {0, 1, 0, 0, 0x0092, "PersonalFunctionValues", &stdInterpreter}, - {0, 1, 0, 0, 0x0093, "CanonFileInfo", &caFileInfoInterpreter}, + {0, 1, 0, canonFileInfoAttribs, 0x0093, "CanonFileInfo", &stdInterpreter}, {0, 1, 0, 0, 0x0094, "AFPointsInFocus1D", &stdInterpreter}, {0, 1, 0, 0, 0x0095, "LensType", &stdInterpreter}, {0, 1, 0, 0, 0x0096, "InternalSerialNumber", &caIntSerNumInterpreter}, {0, 1, 0, 0, 0x0097, "DustRemovalData", &stdInterpreter}, + {0, 1, 0, canonCropInfoAttribs, 0x0098, "CropInfo", &stdInterpreter}, {0, 1, 0, 0, 0x0099, "CustomFunctions2", &stdInterpreter}, - {0, 1, 0, 0, 0x00a0, "ProccessingInfo", &caProcessingInfoInterpreter}, + {0, 1, 0, canonAspectInfoAttribs, 0x009a, "AspectInfo", &stdInterpreter}, + {0, 1, 0, canonProcessingInfoAttribs, 0x00a0, "ProcessingInfo", &stdInterpreter}, {0, 1, 0, 0, 0x00a1, "ToneCurveTable", &stdInterpreter}, {0, 1, 0, 0, 0x00a2, "SharpnessTable", &stdInterpreter}, {0, 1, 0, 0, 0x00a3, "SharpnessFreqTable", &stdInterpreter}, {0, 1, 0, 0, 0x00a4, "WhiteBalanceTable", &stdInterpreter}, {0, 1, 0, 0, 0x00a9, "ColorBalance", &stdInterpreter}, + {0, 1, 0, 0, 0x00aa, "MeasuredColor", &stdInterpreter}, {0, 1, 0, 0, 0x00ae, "ColorTemperature", &stdInterpreter}, {0, 3, 0, 0, 0x00b0, "CanonFlags", &stdInterpreter}, {0, 1, 0, 0, 0x00b1, "ModifiedInfo", &stdInterpreter}, @@ -852,8 +1447,8 @@ const TagAttrib canonAttribs[] = { {0, 1, 0, 0, 0x4003, "ColorInfo", &stdInterpreter}, {1, 1, 0, 0, 0x4005, "UnknownBlock2", &stdInterpreter}, {1, 1, 0, 0, 0x4008, "BlackLevel", &stdInterpreter}, + {1, 1, 0, canonMicroAdjustAttrib, 0x4013, "AFMicroAdj", &stdInterpreter}, {-1, 0, 0, 0, 0, "", NULL}}; - }; #endif diff --git a/rtexif/fujiattribs.cc b/rtexif/fujiattribs.cc index 062cf9a4f..224f1adf2 100644 --- a/rtexif/fujiattribs.cc +++ b/rtexif/fujiattribs.cc @@ -233,7 +233,7 @@ const TagAttrib fujiAttribs[] = { {0, 1, 0, 0, 0x1006, "Contrast2", &faContrast2Interpreter}, {0, 1, 0, 0, 0x100a, "WhiteBalanceFineTune", &stdInterpreter}, {0, 1, 0, 0, 0x100b, "NoiseReduction", &faNoiseReductionInterpreter}, - {0, 1, 0, 0, 0x100b, "FujiFlashMode", &faFlashInterpreter}, + {0, 1, 0, 0, 0x1010, "FujiFlashMode", &faFlashInterpreter}, {0, 1, 0, 0, 0x1011, "FlashExposureComp", &stdInterpreter}, {0, 1, 0, 0, 0x1020, "Macro", &faOnOffInterpreter}, {0, 1, 0, 0, 0x1021, "FocusMode", &faFocusModeInterpreter}, @@ -254,6 +254,8 @@ const TagAttrib fujiAttribs[] = { {0, 1, 0, 0, 0x1405, "MaxFocalLength", &stdInterpreter}, {0, 1, 0, 0, 0x1406, "MaxApertureAtMinFocal", &stdInterpreter}, {0, 1, 0, 0, 0x1407, "MaxApertureAtMaxFocal", &stdInterpreter}, + {0, 1, 0, 0, 0x140b, "AutoDynamicRange", &stdInterpreter}, + {0, 1, 0, 0, 0x4100, "FacesDetected", &stdInterpreter}, {0, 1, 0, 0, 0x8000, "FileSource", &stdInterpreter}, {0, 1, 0, 0, 0x8002, "OrderNumber", &stdInterpreter}, {0, 1, 0, 0, 0x8003, "FrameNumber", &stdInterpreter}, diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index 218f4f8ad..02abbb21c 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -174,102 +174,124 @@ class NALensDataInterpreter : public Interpreter { std::map lenses; public: NALensDataInterpreter () { +/* The key is a composite string made of 8 HEX bytes + * LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType */ lenses["00 00 00 00 00 00 00 01"] = "Manual Lens No CPU "; lenses["00 00 00 00 00 00 E1 12"] = "TC-17E II "; lenses["00 00 00 00 00 00 F1 0C"] = "TC-14E [II] or Sigma APO Tele Converter 1.4x EX DG or Kenko Teleplus PRO 300 DG 1.4x"; lenses["00 00 00 00 00 00 F2 18"] = "TC-20E [II] or Sigma APO Tele Converter 2x EX DG or Kenko Teleplus PRO 300 DG 2.0x"; lenses["00 36 1C 2D 34 3C 00 06"] = "Tamron SP AF11-18mm f/4.5-5.6 Di II LD Aspherical (IF)"; - lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 AF PRO DX - AF 12-24mm F4"; - lenses["00 3E 80 A0 38 3F 00 02"] = "Tamron SP AF200-500mm f/5-6.3 Di LD (IF)"; - lenses["00 3F 2D 80 2B 40 00 06"] = "Tamron AF18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)"; - lenses["00 3F 2D 80 2C 40 00 06"] = "Tamron AF18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro"; - lenses["00 3F 80 A0 38 3F 00 02"] = "Tamron SP AF200-500mm f/5-6.3 Di"; - lenses["00 40 18 2B 2C 34 00 06"] = "Tokina AT-X 107 DX Fish-Eye - AF 10-17mm F3.5-4.5"; - lenses["00 40 2A 72 2C 3C 00 06"] = "Tokina AT-X 16.5-135 DX (AF 16.5-135mm F3.5-5.6)"; - lenses["00 40 2B 2B 2C 2C 00 02"] = "Tokina AT-X 17 AF PRO - AF 17mm F3.5"; + lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 PRO DX AF 12-24mm f/4"; + lenses["00 3E 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF)"; + lenses["00 3F 2D 80 2B 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)"; + lenses["00 3F 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro"; + lenses["00 3F 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di"; + lenses["00 40 18 2B 2C 34 00 06"] = "Tokina AT-X 107 DX Fish-Eye AF 10-17mm f/3.5-4.5"; + lenses["00 40 2A 72 2C 3C 00 06"] = "Tokina AT-X 16.5-135 DX AF 16.5-135mm f/3.5-5.6"; + lenses["00 40 2B 2B 2C 2C 00 02"] = "Tokina AT-X 17 PRO AF 17mm f/3.5"; + lenses["00 40 2D 2D 2C 2C 00 00"] = "Carl Zeiss Distagon T* 18mm f/3.5 ZF.2"; lenses["00 40 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)"; lenses["00 40 2D 88 2C 40 00 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18NII)"; lenses["00 40 2D 88 2C 40 62 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18)"; - lenses["00 40 31 31 2C 2C 00 00"] = "Voigtlander Color Skopar 20mm F3.5 SLII Aspherical"; - lenses["00 44 60 98 34 3C 00 02"] = "Tokina AT-X 840D 80-400mm F4.5-5.6"; + lenses["00 40 31 31 2C 2C 00 00"] = "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical"; + lenses["00 40 37 80 2C 3C 00 02"] = "Tokina AT-X 242 AF 24-200mm f/3.5-5.6"; + lenses["00 40 64 64 2C 2C 00 00"] = "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus"; + lenses["00 44 60 98 34 3C 00 02"] = "Tokina AT-X 840D 80-400mm f/4.5-5.6"; lenses["00 47 10 10 24 24 00 00"] = "Fisheye Nikkor 8mm f/2.8 AiS"; + lenses["00 47 25 25 24 24 00 02"] = "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)"; lenses["00 47 44 44 24 24 00 06"] = "Tokina AT-X M35 PRO DX (AF 35mm f/2.8 Macro)"; lenses["00 47 53 80 30 3C 00 06"] = "Tamron AF55-200mm f/4-5.6 Di II LD"; - lenses["00 48 1C 29 24 24 00 06"] = "Tokina AT-X 116 PRO DX (AF 11-16mm f/2.8)"; - lenses["00 48 29 50 24 24 00 06"] = "Tokina AT-X 165 PRO DX - AF 16-50mm F2.8"; - lenses["00 48 3C 60 24 24 00 02"] = "Tokina AT-X 280 AF PRO 28-80mm F2.8 Aspherical"; - lenses["00 48 3C 6A 24 24 00 02"] = "Tamron SP AF28-105mm f/2.8"; + lenses["00 48 1C 29 24 24 00 06"] = "Tokina AT-X 116 PRO DX AF 11-16mm f/2.8"; + lenses["00 48 29 3C 24 24 00 06"] = "Tokina AT-X 16-28 PRO FX AF 16-28mm f/2.8"; + lenses["00 48 29 50 24 24 00 06"] = "Tokina AT-X 165 PRO DX AF 16-50mm f/2.8"; + lenses["00 48 32 32 24 24 00 00"] = "Carl Zeiss Distagon T* 21mm f/2.8 ZF.2"; + lenses["00 48 3C 60 24 24 00 02"] = "Tokina AT-X 280 PRO AF 28-80mm f/2.8 Aspherical"; + lenses["00 48 3C 6A 24 24 00 02"] = "Tamron SP AF 28-105mm f/2.8"; lenses["00 48 50 50 18 18 00 00"] = "Nikkor H 50mm f/2"; - lenses["00 48 50 72 24 24 00 06"] = "Tokina AT-X 535 PRO DX - AF 50-135mm F2.8"; + lenses["00 48 50 72 24 24 00 06"] = "Tokina AT-X 535 PRO DX AF 50-135mm f/2.8"; lenses["00 48 5C 8E 30 3C 00 06"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17)"; lenses["00 48 68 68 24 24 00 00"] = "Series E 100mm f/2.8"; lenses["00 48 80 80 30 30 00 00"] = "Nikkor 200mm f/4 AiS"; - lenses["00 49 30 48 22 2B 00 02"] = "Tamron SP AF20-40mm f/2.7-3.5"; + lenses["00 49 30 48 22 2B 00 02"] = "Tamron SP AF 20-40mm f/2.7-3.5"; lenses["00 4C 6A 6A 20 20 00 00"] = "Nikkor 105mm f/2.5 AiS"; - lenses["00 4C 7C 7C 2C 2C 00 02"] = "Tamron SP AF180mm f/3.5 Di Model B01"; - lenses["00 53 2B 50 24 24 00 06"] = "Tamron SP AF17-50mm f/2.8 (A16)"; + lenses["00 4C 7C 7C 2C 2C 00 02"] = "Tamron SP AF 180mm f/3.5 Di Model B01"; + lenses["00 53 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 (A16)"; lenses["00 54 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"; + lenses["00 54 3C 3C 18 18 00 00"] = "Carl Zeiss Distagon T* 28mm f/2 ZF.2"; lenses["00 54 44 44 0C 0C 00 00"] = "Nikkor 35mm f/1.4 AiS"; - lenses["00 54 48 48 18 18 00 00"] = "Voigtlander Ultron 40mm F2 SLII Aspherical"; - lenses["00 54 55 55 0C 0C 00 00"] = "Voigtlander Nokton 58mm F1.4 SLII"; - lenses["00 54 56 56 30 30 00 00"] = "Coastal Optical Systems 60mm 1:4 UV-VIS-IR Macro Apo"; - lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 PRO D - 100mm F2.8"; - lenses["00 54 8E 8E 24 24 00 02"] = "Tokina AT-X 300 AF PRO 300mm F2.8"; + lenses["00 54 44 44 18 18 00 00"] = "Carl Zeiss Distagon T* 35mm f/2 ZF.2"; + lenses["00 54 48 48 18 18 00 00"] = "Voigtlander Ultron 40mm f/2 SLII Aspherical"; + lenses["00 54 50 50 0C 0C 00 00"] = "Carl Zeiss Planar T* 50mm f/1.4 ZF.2"; + lenses["00 54 50 50 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 50mm f/2 ZF.2"; + lenses["00 54 55 55 0C 0C 00 00"] = "Voigtlander Nokton 58mm f/1.4 SLII"; + lenses["00 54 56 56 30 30 00 00"] = "Coastal Optical Systems 60mm f/4 UV-VIS-IR Macro Apo"; + lenses["00 54 62 62 0C 0C 00 00"] = "Carl Zeiss Planar T* 85mm f/1.4 ZF.2"; + lenses["00 54 68 68 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 100mm f/2 ZF.2"; + lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 PRO D 100mm f/2.8"; + lenses["00 54 8E 8E 24 24 00 02"] = "Tokina AT-X 300 PRO AF 300mm f/2.8"; + lenses["00 58 64 64 20 20 00 00"] = "Soligor C/D Macro MC 90mm f/2.5"; lenses["01 00 00 00 00 00 02 00"] = "AF Teleconverter TC-16A 1.6x"; lenses["01 00 00 00 00 00 08 00"] = "AF Teleconverter TC-16A 1.6x"; lenses["01 58 50 50 14 14 02 00"] = "AF Nikkor 50mm f/1.8"; - lenses["02 2F 98 98 3D 3D 02 00"] = "Sigma 400mm F5.6 APO"; - lenses["02 37 5E 8E 35 3D 02 00"] = "Sigma 75-300mm F4.5-5.6 APO"; - lenses["02 37 A0 A0 34 34 02 00"] = "Sigma APO 500mm F4.5"; - lenses["02 3A 5E 8E 32 3D 02 00"] = "Sigma 75-300mm F4.0-5.6"; - lenses["02 3B 44 61 30 3D 02 00"] = "Sigma 35-80mm F4-5.6"; - lenses["02 3F 24 24 2C 2C 02 00"] = "Sigma 14mm F3.5"; - lenses["02 3F 3C 5C 2D 35 02 00"] = "Sigma 28-70mm F3.5-4.5 UC"; - lenses["02 40 44 73 2B 36 02 00"] = "Sigma 35-135mm F3.5-4.5 a"; + lenses["02 2F 98 98 3D 3D 02 00"] = "Sigma APO 400mm f/5.6"; + lenses["02 34 A0 A0 44 44 02 00"] = "Sigma APO 500mm f/7.2"; + lenses["02 37 5E 8E 35 3D 02 00"] = "Sigma APO 75-300mm f/4.5-5.6"; + lenses["02 37 A0 A0 34 34 02 00"] = "Sigma APO 500mm f/4.5"; + lenses["02 3A 5E 8E 32 3D 02 00"] = "Sigma 75-300mm f/4-5.6"; + lenses["02 3B 44 61 30 3D 02 00"] = "Sigma 35-80mm f/4-5.6"; + lenses["02 3C B0 B0 3C 3C 02 00"] = "Sigma APO 800mm f/5.6"; + lenses["02 3F 24 24 2C 2C 02 00"] = "Sigma 14mm f/3.5"; + lenses["02 3F 3C 5C 2D 35 02 00"] = "Sigma 28-70mm f/3.5-4.5 UC"; + lenses["02 40 44 5C 2C 34 02 00"] = "Exakta AF 35-70mm f/3.5-4.5 MC"; + lenses["02 40 44 73 2B 36 02 00"] = "Sigma 35-135mm f/3.5-4.5 a"; lenses["02 42 44 5C 2A 34 02 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5"; lenses["02 42 44 5C 2A 34 08 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5"; - lenses["02 46 37 37 25 25 02 00"] = "Sigma 24mm F2.8 Macro"; - lenses["02 46 3C 5C 25 25 02 00"] = "Sigma 28-70mm F2.8"; - lenses["02 46 5C 82 25 25 02 00"] = "Sigma 70-210mm F2.8 APO"; - lenses["02 48 65 65 24 24 02 00"] = "Sigma 90mm F2.8 Macro"; - lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D ZOOM UMCS 70-210mm 1:4.5"; + lenses["02 46 37 37 25 25 02 00"] = "Sigma 24mm f/2.8 Macro"; + lenses["02 46 3C 5C 25 25 02 00"] = "Sigma 28-70mm f/2.8"; + lenses["02 46 5C 82 25 25 02 00"] = "Sigma APO 70-210mm f/2.8"; + lenses["02 48 65 65 24 24 02 00"] = "Sigma 90mm f/2.8 Macro"; + lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D ZOOM UMCS 70-210mm f/4.5"; lenses["03 48 5C 81 30 30 02 00"] = "AF Zoom-Nikkor 70-210mm f/4"; lenses["04 48 3C 3C 24 24 03 00"] = "AF Nikkor 28mm f/2.8"; lenses["05 54 50 50 0C 0C 04 00"] = "AF Nikkor 50mm f/1.4"; lenses["06 3F 68 68 2C 2C 06 00"] = "Cosina 100mm f/3.5 Macro"; lenses["06 54 53 53 24 24 06 00"] = "AF Micro-Nikkor 55mm f/2.8"; - lenses["07 36 3D 5F 2C 3C 03 00"] = "Cosina AF Zoom 28-80mm F3.5-5.6 MC Macro"; - lenses["07 3E 30 43 2D 35 03 00"] = "Soligor AF Zoom 19-35mm 1:3.5-4.5 MC"; - lenses["07 40 2F 44 2C 34 03 02"] = "Tamron AF19-35mm f/3.5-4.5 N"; - lenses["07 40 30 45 2D 35 03 02"] = "Tamron AF19-35mm f/3.5-4.5"; + lenses["07 36 3D 5F 2C 3C 03 00"] = "Cosina AF Zoom 28-80mm f/3.5-5.6 MC Macro"; + lenses["07 3E 30 43 2D 35 03 00"] = "Soligor AF Zoom 19-35mm f/3.5-4.5 MC"; + lenses["07 40 2F 44 2C 34 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 N"; + lenses["07 40 30 45 2D 35 03 02"] = "Tamron AF 19-35mm f/3.5-4.5"; + lenses["07 40 3C 5C 2C 35 03 00"] = "Tokina AF 270 II AF 28-70mm f/3.5-4.5"; lenses["07 40 3C 62 2C 34 03 00"] = "AF Zoom-Nikkor 28-85mm f/3.5-4.5"; - lenses["07 46 2B 44 24 30 03 02"] = "Tamron SP AF17-35mm f/2.8-4 Di LD Aspherical (IF)"; + lenses["07 46 2B 44 24 30 03 02"] = "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)"; lenses["07 46 3D 6A 25 2F 03 00"] = "Cosina AF Zoom 28-105mm F2.8-3.8 MC"; - lenses["07 47 3C 5C 25 35 03 00"] = "Tokina AF 287 SD (AF 28-70mm f/2.8-4.5)"; - lenses["07 48 3C 5C 24 24 03 00"] = "Tokina AT-X 287 AF (AF 28-70mm f/2.8)"; + lenses["07 47 3C 5C 25 35 03 00"] = "Tokina AF 287 SD AF 28-70mm f/2.8-4.5"; + lenses["07 48 3C 5C 24 24 03 00"] = "Tokina AT-X 287 AF 28-70mm f/2.8"; lenses["08 40 44 6A 2C 34 04 00"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5"; lenses["09 48 37 37 24 24 04 00"] = "AF Nikkor 24mm f/2.8"; lenses["0A 48 8E 8E 24 24 03 00"] = "AF Nikkor 300mm f/2.8 IF-ED"; - lenses["0B 3E 3D 7F 2F 3D 0E 00"] = "Tamron AF28-200mm f/3.8-5.6"; - lenses["0B 3E 3D 7F 2F 3D 0E 02"] = "Tamron AF28-200mm f/3.8-5.6D"; + lenses["0A 48 8E 8E 24 24 05 00"] = "AF Nikkor 300mm f/2.8 IF-ED N"; + lenses["0B 3E 3D 7F 2F 3D 0E 00"] = "Tamron AF 28-200mm f/3.8-5.6 (71D)"; + lenses["0B 3E 3D 7F 2F 3D 0E 02"] = "Tamron AF 28-200mm f/3.8-5.6D (171D)"; lenses["0B 48 7C 7C 24 24 05 00"] = "AF Nikkor 180mm f/2.8 IF-ED"; lenses["0D 40 44 72 2C 34 07 00"] = "AF Zoom-Nikkor 35-135mm f/3.5-4.5"; lenses["0E 48 5C 81 30 30 05 00"] = "AF Zoom-Nikkor 70-210mm f/4"; - lenses["0E 4A 31 48 23 2D 0E 02"] = "Tamron SP AF20-40mm f/2.7-3.5"; + lenses["0E 4A 31 48 23 2D 0E 02"] = "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"; lenses["0F 58 50 50 14 14 05 00"] = "AF Nikkor 50mm f/1.8 N"; - lenses["10 3D 3C 60 2C 3C D2 02"] = "Tamron AF28-80mm f/3.5-5.6 Aspherical"; + lenses["10 3D 3C 60 2C 3C D2 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"; lenses["10 48 8E 8E 30 30 08 00"] = "AF Nikkor 300mm f/4 IF-ED"; lenses["11 48 44 5C 24 24 08 00"] = "AF Zoom-Nikkor 35-70mm f/2.8"; - lenses["12 36 5C 81 35 3D 09 00"] = "Cosina AF Zoom 70-210mm F4.5-5.6 MC Macro"; - lenses["12 39 5C 8E 34 3D 08 02"] = "Cosina AF Zoom 70-300mm F4.5-5.6 MC Macro"; - lenses["12 3B 68 8D 3D 43 09 02"] = "Unknown 100-290mm f/5.6-6.7"; + lenses["12 36 5C 81 35 3D 09 00"] = "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro"; + lenses["12 39 5C 8E 34 3D 08 02"] = "Cosina AF Zoom 70-300mm f/4.5-5.6 MC Macro"; + lenses["12 3B 68 8D 3D 43 09 02"] = "Cosina AF Zoom 100-300mm f/5.6-6.7 MC Macro"; + lenses["12 3B 98 98 3D 3D 09 00"] = "Tokina AT-X 400 SD AF 400mm f/5.6"; lenses["12 3D 3C 80 2E 3C DF 02"] = "Tamron AF 28-200mm f/3.8-5.6 AF Aspherical LD (IF) (271D)"; + lenses["12 44 5E 8E 34 3C 09 00"] = "Tokina 730 AF 75-300mm f/4.5-5.6"; lenses["12 48 5C 81 30 3C 09 00"] = "AF Nikkor 70-210mm f/4-5.6"; - lenses["12 4A 5C 81 31 3D 09 00"] = "Soligor AF C/D Auto Zoom+Macro 70-210mm 1:4-5.6 UMCS"; + lenses["12 4A 5C 81 31 3D 09 00"] = "Soligor AF C/D Auto Zoom+Macro 70-210mm f/4-5.6 UMCS"; lenses["13 42 37 50 2A 34 0B 00"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5"; lenses["14 48 60 80 24 24 0B 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED"; - lenses["14 48 68 8E 30 30 0B 00"] = "Tokina AT-X 340 AF II 100-300mm F4"; - lenses["14 54 60 80 24 24 0B 00"] = "Tokina AT-X 828 AF 80-200mm F2.8"; + lenses["14 48 68 8E 30 30 0B 00"] = "Tokina AT-X 340 AF II 100-300mm f/4"; + lenses["14 54 60 80 24 24 0B 00"] = "Tokina AT-X 828 AF 80-200mm f/2.8"; lenses["15 4C 62 62 14 14 0C 00"] = "AF Nikkor 85mm f/1.8"; lenses["17 3C A0 A0 30 30 0F 00"] = "Nikkor 500mm f/4 P ED IF"; lenses["17 3C A0 A0 30 30 11 00"] = "Nikkor 500mm f/4 P ED IF"; @@ -279,57 +301,64 @@ class NALensDataInterpreter : public Interpreter { lenses["1C 48 30 30 24 24 12 00"] = "AF Nikkor 20mm f/2.8"; lenses["1D 42 44 5C 2A 34 12 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N"; lenses["1E 54 56 56 24 24 13 00"] = "AF Micro-Nikkor 60mm f/2.8"; - lenses["1E 5D 64 64 20 20 13 00"] = "Unknown 90mm f/2.5"; + lenses["1E 5D 64 64 20 20 13 00"] = "Tamron SP AF 90mm f/2.5 (52E)"; lenses["1F 54 6A 6A 24 24 14 00"] = "AF Micro-Nikkor 105mm f/2.8"; - lenses["20 3C 80 98 3D 3D 1E 02"] = "Tamron AF200-400mm f/5.6 LD IF"; - lenses["20 48 60 80 24 24 15 00"] = "AF Zoom-Nikkor ED 80-200mm f/2.8"; + lenses["20 3C 80 98 3D 3D 1E 02"] = "Tamron AF 200-400mm f/5.6 LD IF (75D)"; + lenses["20 48 60 80 24 24 15 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED"; lenses["21 40 3C 5C 2C 34 16 00"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5"; + lenses["21 56 8E 8E 24 24 14 00"] = "Tamron SP AF 300mm f/2.8 LD-IF (60E)"; lenses["22 48 72 72 18 18 16 00"] = "AF DC-Nikkor 135mm f/2"; + lenses["22 53 64 64 24 24 E0 02"] = "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)"; lenses["23 30 BE CA 3C 48 17 00"] = "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF"; - lenses["24 44 60 98 34 3C 1A 02"] = "Tokina AT-X 840 AF II 80-400mm F4.5-5.6"; - lenses["24 48 60 80 24 24 1A 02"] = "AF Zoom-Nikkor ED 80-200mm f/2.8D"; - lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 287 AF PRO SV 28-70mm F2.8"; + lenses["24 44 60 98 34 3C 1A 02"] = "Tokina AT-X 840 AF II 80-400mm f/4.5-5.6"; + lenses["24 48 60 80 24 24 1A 02"] = "AF Zoom-Nikkor ED 80-200mm f/2.8D ED"; + lenses["24 54 60 80 24 24 1A 02"] = "Tokina AT-X 828 AF PRO 80-200mm f/2.8"; + lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 287 AF PRO SV 28-70mm f/2.8"; lenses["25 48 44 5C 24 24 1B 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D"; lenses["25 48 44 5C 24 24 52 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D"; - lenses["26 3C 54 80 30 3C 1C 06"] = "Sigma 55-200mm F4-5.6 DC"; - lenses["26 3C 5C 82 30 3C 1C 02"] = "Sigma 70-210mm F4-5.6 UC-II"; - lenses["26 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm F4-5.6 DG Macro"; - lenses["26 3D 3C 80 2F 3D 1C 02"] = "Sigma 28-300mm F3.8-5.6 Aspherical"; - lenses["26 3E 3C 6A 2E 3C 1C 02"] = "Sigma 28-105mm F3.8-5.6 UC-III Aspherical IF"; - lenses["26 40 27 3F 2C 34 1C 02"] = "Sigma 15-30mm F3.5-4.5 EX Aspherical DG DF"; - lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35 F3.5-4.5 Aspherical"; - lenses["26 40 2D 50 2C 3C 1C 06"] = "Sigma 18-50mm F3.5-5.6 DC"; - lenses["26 40 2D 70 2B 3C 1C 06"] = "Sigma 18-125mm F3.5-5.6 DC"; - lenses["26 40 2D 80 2C 40 1C 06"] = "Sigma 18-200mm F3.5-6.3 DC"; - lenses["26 40 37 5C 2C 3C 1C 02"] = "Sigma 24-70mm F3.5-5.6 Aspherical HF"; - lenses["26 40 3C 60 2C 3C 1C 02"] = "Sigma 28-80mm F3.5-5.6 Mini Zoom Macro II Aspherical"; - lenses["26 40 3C 65 2C 3C 1C 02"] = "Sigma 28-90mm F3.5-5.6 Macro"; - lenses["26 40 3C 80 2B 3C 1C 02"] = "Sigma 28-200mm F3.5-5.6 Compact Aspherical Hyperzoom Macro"; - lenses["26 40 3C 80 2C 3C 1C 02"] = "Sigma 28-200mm F3.5-5.6 Compact Aspherical Hyperzoom Macro"; - lenses["26 40 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm F3.5-6.3 Macro"; - lenses["26 40 7B A0 34 40 1C 02"] = "Sigma APO 170-500mm F5-6.3 Aspherical RF"; - lenses["26 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm F3.5-6.3 DG Macro"; - lenses["26 44 73 98 34 3C 1C 02"] = "Sigma 135-400mm F4.5-5.6 APO Aspherical"; - lenses["26 48 11 11 30 30 1C 02"] = "Sigma 8mm F4 EX Circular Fisheye"; - lenses["26 48 27 27 24 24 1C 02"] = "Sigma 15mm F2.8 EX Diagonal Fish-Eye"; - lenses["26 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm F2.8 EX DC"; - lenses["26 48 31 49 24 24 1C 02"] = "Sigma 20-40mm F2.8"; - lenses["26 48 37 56 24 24 1C 02"] = "Sigma 24-60mm F2.8 EX DG"; - lenses["26 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm F2.8 EX DG"; - lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm F2.8-4 High Speed Zoom"; - lenses["26 48 3C 6A 24 30 1C 02"] = "Sigma 28-105mm F2.8-4 Aspherical"; - lenses["26 48 8E 8E 30 30 1C 02"] = "Sigma APO TELE MACRO 300mm F4"; - lenses["26 54 2B 44 24 30 1C 02"] = "Sigma 17-35mm F2.8-4 EX Aspherical"; - lenses["26 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm F2.8 EX DG Macro"; - lenses["26 54 37 73 24 34 1C 02"] = "Sigma 24-135mm F2.8-4.5"; - lenses["26 54 3C 5C 24 24 1C 02"] = "Sigma 28-70mm F2.8 EX"; - lenses["26 58 31 31 14 14 1C 02"] = "Sigma 20mm F1.8 EX Aspherical DG DF RF"; - lenses["26 58 37 37 14 14 1C 02"] = "Sigma 24mm F1.8 EX Aspherical DG DF MACRO"; - lenses["26 58 3C 3C 14 14 1C 02"] = "Sigma 28mm F1.8 EX DG DF"; + lenses["26 3C 54 80 30 3C 1C 06"] = "Sigma 55-200mm f/4-5.6 DC"; + lenses["26 3C 5C 82 30 3C 1C 02"] = "Sigma 70-210mm f/4-5.6 UC-II"; + lenses["26 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 DG Macro"; + lenses["26 3C 98 98 3C 3C 1C 02"] = "Sigma APO Tele Macro 400mm f/5.6"; + lenses["26 3D 3C 80 2F 3D 1C 02"] = "Sigma 28-300mm f/3.8-5.6 Aspherical"; + lenses["26 3E 3C 6A 2E 3C 1C 02"] = "Sigma 28-105mm f/3.8-5.6 UC-III Aspherical IF"; + lenses["26 40 27 3F 2C 34 1C 02"] = "Sigma 15-30mm f/3.5-4.5 EX Aspherical DG DF"; + lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35mm f/3.5-4.5 Aspherical"; + lenses["26 40 2D 50 2C 3C 1C 06"] = "Sigma 18-50mm f/3.5-5.6 DC"; + lenses["26 40 2D 70 2B 3C 1C 06"] = "Sigma 18-125mm f/3.5-5.6 DC"; + lenses["26 40 2D 80 2C 40 1C 06"] = "Sigma 18-200mm f/3.5-6.3 DC"; + lenses["26 40 37 5C 2C 3C 1C 02"] = "Sigma 24-70mm f/3.5-5.6 Aspherical HF"; + lenses["26 40 3C 5C 2C 34 1C 02"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"; + lenses["26 40 3C 60 2C 3C 1C 02"] = "Sigma 28-80mm f/3.5-5.6 Mini Zoom Macro II Aspherical"; + lenses["26 40 3C 65 2C 3C 1C 02"] = "Sigma 28-90mm f/3.5-5.6 Macro"; + lenses["26 40 3C 80 2B 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"; + lenses["26 40 3C 80 2C 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"; + lenses["26 40 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 Macro"; + lenses["26 40 7B A0 34 40 1C 02"] = "Sigma APO 170-500mm f/5-6.3 Aspherical RF"; + lenses["26 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro"; + lenses["26 44 73 98 34 3C 1C 02"] = "Sigma 135-400mm f/4.5-5.6 APO Aspherical"; + lenses["26 48 11 11 30 30 1C 02"] = "Sigma 8mm f/4 EX Circular Fisheye"; + lenses["26 48 27 27 24 24 1C 02"] = "Sigma 15mm f/2.8 EX Diagonal Fish-Eye"; + lenses["26 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC"; + lenses["26 48 31 49 24 24 1C 02"] = "Sigma 20-40mm f/2.8"; + lenses["26 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG"; + lenses["26 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm f/2.8 EX DG"; + lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm f/2.8-4 High Speed Zoom"; + lenses["26 48 3C 6A 24 30 1C 02"] = "Sigma 28-105mm f/2.8-4 Aspherical"; + lenses["26 48 8E 8E 30 30 1C 02"] = "Sigma APO TELE MACRO 300mm f/4"; + lenses["26 54 2B 44 24 30 1C 02"] = "Sigma 17-35mm f/2.8-4 EX Aspherical"; + lenses["26 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; + lenses["26 54 37 73 24 34 1C 02"] = "Sigma 24-135mm f/2.8-4.5"; + lenses["26 54 3C 5C 24 24 1C 02"] = "Sigma 28-70mm f/2.8 EX"; + lenses["26 58 31 31 14 14 1C 02"] = "Sigma 20mm f/1.8 EX Aspherical DG DF RF"; + lenses["26 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX Aspherical DG DF MACRO"; + lenses["26 58 3C 3C 14 14 1C 02"] = "Sigma 28mm f/1.8 EX DG DF"; lenses["27 48 8E 8E 24 24 1D 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED"; lenses["27 48 8E 8E 24 24 E1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-17E"; lenses["27 48 8E 8E 24 24 F1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-14E"; lenses["27 48 8E 8E 24 24 F2 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-20E"; + lenses["27 48 8E 8E 30 30 1D 02"] = "Tokina AT-X 304 AF 300mm f/4"; + lenses["27 54 8E 8E 24 24 1D 02"] = "Tamron SP AF 300mm f/2.8 LD-IF (360E)"; lenses["28 3C A6 A6 30 30 1D 02"] = "AF-I Nikkor 600mm f/4D IF-ED"; lenses["28 3C A6 A6 30 30 E1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-17E"; lenses["28 3C A6 A6 30 30 F1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-14E"; @@ -338,19 +367,20 @@ class NALensDataInterpreter : public Interpreter { lenses["2B 3C 44 60 30 3C 1F 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D"; lenses["2C 48 6A 6A 18 18 27 02"] = "AF DC-Nikkor 105mm f/2D"; lenses["2D 48 80 80 30 30 21 02"] = "AF Micro-Nikkor 200mm f/4D IF-ED"; + lenses["2E 48 5C 82 30 3C 22 02"] = "AF Nikkor 70-210mm f/4-5.6D"; lenses["2E 48 5C 82 30 3C 28 02"] = "AF Nikkor 70-210mm f/4-5.6D"; - lenses["2F 40 30 44 2C 34 29 02"] = "Unknown 20-35mm f/3.5-4.5D"; - lenses["2F 48 30 44 24 24 29 02"] = "Tokina AT-X 235 AF PRO - AF 20-35mm f/2.8"; + lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 235 II AF 20-35mm f/3.5-4.5"; + lenses["2F 48 30 44 24 24 29 02"] = "AF Zoom-Nikkor 20-35mm f/2.8D IF"; lenses["30 48 98 98 24 24 24 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED"; lenses["30 48 98 98 24 24 E1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E"; lenses["30 48 98 98 24 24 F1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E"; lenses["30 48 98 98 24 24 F2 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E"; lenses["31 54 56 56 24 24 25 02"] = "AF Micro-Nikkor 60mm f/2.8D"; - lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF90mm f/2.8 Di Macro 1:2 (272E)"; - lenses["32 54 50 50 24 24 35 02"] = "Sigma 50mm F2.8 EX DG Macro"; + lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:2 (172/272E)"; + lenses["32 54 50 50 24 24 35 02"] = "Sigma 50mm f/2.8 EX DG Macro"; lenses["32 54 6A 6A 24 24 35 02"] = "AF Micro-Nikkor 105mm f/2.8D"; lenses["33 48 2D 2D 24 24 31 02"] = "AF Nikkor 18mm f/2.8D"; - lenses["33 54 3C 5E 24 24 62 02"] = "Tamron SP AF28-75mm f/2.8 XR Di LD Aspherical (IF) Macro"; + lenses["33 54 3C 5E 24 24 62 02"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro"; lenses["34 48 29 29 24 24 32 02"] = "AF Fisheye Nikkor 16mm f/2.8D"; lenses["35 3C A0 A0 30 30 33 02"] = "AF-I Nikkor 500mm f/4D IF-ED"; lenses["35 3C A0 A0 30 30 E1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-17E"; @@ -369,51 +399,52 @@ class NALensDataInterpreter : public Interpreter { lenses["42 54 44 44 18 18 44 02"] = "AF Nikkor 35mm f/2D"; lenses["43 54 50 50 0C 0C 46 02"] = "AF Nikkor 50mm f/1.4D"; lenses["44 44 60 80 34 3C 47 02"] = "AF Zoom-Nikkor 80-200mm f/4.5-5.6D "; - lenses["45 3D 3C 60 2C 3C 48 02"] = "Tamron AF28-80mm f/3.5-5.6 Aspherical"; - lenses["45 40 3C 60 2C 3C 48 02"] = "AF Zoom-Nikkor 28-80mm F/3.5-5.6D"; - lenses["45 41 37 72 2C 3C 48 02"] = "Tamron SP AF24-135mm f/3.5-5.6 AD Aspherical (IF) Macro"; + lenses["45 3D 3C 60 2C 3C 48 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"; + lenses["45 40 3C 60 2C 3C 48 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"; + lenses["45 41 37 72 2C 3C 48 02"] = "Tamron SP AF 24-135mm f/3.5-5.6 AD Aspherical (IF) Macro (190D)"; lenses["46 3C 44 60 30 3C 49 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D N"; lenses["47 42 37 50 2A 34 4A 02"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5D"; - lenses["48 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm F4.5-5.6 EX Aspherical DG HSM"; - lenses["48 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm F4-5.6 EX DC HSM"; - lenses["48 3C 50 A0 30 40 4B 02"] = "Sigma 50-500mm F4-6.3 EX APO RF HSM"; - lenses["48 3C 8E B0 3C 3C 4B 02"] = "Sigma APO 300-800 F5.6 EX DG HSM"; - lenses["48 3C B0 B0 3C 3C 4B 02"] = "Sigma APO 800mm F5.6 EX HSM"; - lenses["48 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm F4.5 EX HSM"; - lenses["48 48 24 24 24 24 4B 02"] = "Sigma 14mm F2.8 EX Aspherical HSM"; - lenses["48 48 2B 44 24 30 4B 06"] = "Sigma 17-35mm F2.8-4 EX DG Aspherical HSM"; - lenses["48 48 68 8E 30 30 4B 02"] = "Sigma 100-300mm F4 EX IF HSM"; - lenses["48 48 76 76 24 24 4B 06"] = "Sigma 150mm F2.8 EX DG APO Macro HSM"; + lenses["48 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX Aspherical DG HSM"; + lenses["48 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; + lenses["48 3C 50 A0 30 40 4B 02"] = "Sigma 50-500mm f/4-6.3 EX APO RF HSM"; + lenses["48 3C 8E B0 3C 3C 4B 02"] = "Sigma APO 300-800 f/5.6 EX DG HSM"; + lenses["48 3C B0 B0 3C 3C 4B 02"] = "Sigma APO 800mm f/5.6 EX HSM"; + lenses["48 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX HSM"; + lenses["48 48 24 24 24 24 4B 02"] = "Sigma 14mm f/2.8 EX Aspherical HSM"; + lenses["48 48 2B 44 24 30 4B 06"] = "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM"; + lenses["48 48 68 8E 30 30 4B 02"] = "Sigma 100-300mm f/4 EX IF HSM"; + lenses["48 48 76 76 24 24 4B 06"] = "Sigma 150mm f/2.8 EX DG APO Macro HSM"; lenses["48 48 8E 8E 24 24 4B 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED"; lenses["48 48 8E 8E 24 24 E1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-17E"; lenses["48 48 8E 8E 24 24 F1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E"; lenses["48 48 8E 8E 24 24 F2 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E"; - lenses["48 4C 7C 7C 2C 2C 4B 02"] = "Sigma 180mm F3.5 EX DG Macro"; - lenses["48 4C 7D 7D 2C 2C 4B 02"] = "Sigma APO MACRO 180mm F3.5 EX DG HSM"; - lenses["48 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm F1.4 EX DC HSM"; - lenses["48 54 5C 80 24 24 4B 02"] = "Sigma 70-200mm F2.8 EX APO IF HSM"; - lenses["48 54 6F 8E 24 24 4B 02"] = "Sigma APO 120-300mm F2.8 EX DG HSM"; - lenses["48 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm F2.8 EX DG HSM"; + lenses["48 4C 7C 7C 2C 2C 4B 02"] = "Sigma 180mm f/3.5 EX DG Macro"; + lenses["48 4C 7D 7D 2C 2C 4B 02"] = "Sigma APO MACRO 180mm f/3.5 EX DG HSM"; + lenses["48 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM"; + lenses["48 54 5C 80 24 24 4B 02"] = "Sigma 70-200mm f/2.8 EX APO IF HSM"; + lenses["48 54 6F 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; + lenses["48 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM"; lenses["49 3C A6 A6 30 30 4C 02"] = "AF-S Nikkor 600mm f/4D IF-ED"; lenses["49 3C A6 A6 30 30 E1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-17E"; lenses["49 3C A6 A6 30 30 F1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-14E"; lenses["49 3C A6 A6 30 30 F2 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-20E"; lenses["4A 54 62 62 0C 0C 4D 02"] = "AF Nikkor 85mm f/1.4D IF"; + lenses["4A 60 62 62 0C 0C 4D 02"] = "Samyang AE 85mm f/1.4 AS IF UMC"; lenses["4B 3C A0 A0 30 30 4E 02"] = "AF-S Nikkor 500mm f/4D IF-ED"; lenses["4B 3C A0 A0 30 30 E1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-17E"; lenses["4B 3C A0 A0 30 30 F1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-14E"; lenses["4B 3C A0 A0 30 30 F2 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-20E"; lenses["4C 40 37 6E 2C 3C 4F 02"] = "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF"; lenses["4D 40 3C 80 2C 3C 62 02"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6D IF"; - lenses["4D 41 3C 8E 2B 40 62 02"] = "Tamron AF28-300mm f/3.5-6.3 XR Di LD Aspherical (IF)"; - lenses["4D 41 3C 8E 2C 40 62 02"] = "Tamron AF28-300mm f/3.5-6.3 XR LD Aspherical (IF)"; + lenses["4D 41 3C 8E 2B 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)"; + lenses["4D 41 3C 8E 2C 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)"; lenses["4E 48 72 72 18 18 51 02"] = "AF DC-Nikkor 135mm f/2D"; lenses["4F 40 37 5C 2C 3C 53 06"] = "IX-Nikkor 24-70mm f/3.5-5.6"; lenses["50 48 56 7C 30 3C 54 06"] = "IX-Nikkor 60-180mm f/4-5.6"; lenses["53 48 60 80 24 24 57 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; lenses["53 48 60 80 24 24 60 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; lenses["54 44 5C 7C 34 3C 58 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"; - lenses["56 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm F4-5.6 APO Macro Super II"; + lenses["56 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 APO Macro Super II"; lenses["56 48 5C 8E 30 3C 5A 02"] = "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"; lenses["59 48 98 98 24 24 5D 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED"; lenses["59 48 98 98 24 24 E1 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-17E"; @@ -431,9 +462,10 @@ class NALensDataInterpreter : public Interpreter { lenses["65 44 60 98 34 3C 6B 0A"] = "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED"; lenses["66 40 2D 44 2C 34 6C 02"] = "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED"; lenses["67 48 37 62 24 30 6D 02"] = "AF Zoom-Nikkor 24-85mm f/2.8-4D IF"; - lenses["67 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm F2.8 EX DG Macro"; + lenses["67 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; lenses["68 42 3C 60 2A 3C 6E 06"] = "AF Zoom-Nikkor 28-80mm f/3.3-5.6G"; - lenses["69 48 5C 8E 30 3C 6F 02"] = "Tamron AF70-300mm f/4-5.6 LD Macro 1:2"; + lenses["69 47 5C 8E 30 3C 00 02"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17N)"; + lenses["69 48 5C 8E 30 3C 6F 02"] = "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2 (772D)"; lenses["69 48 5C 8E 30 3C 6F 06"] = "AF Zoom-Nikkor 70-300mm f/4-5.6G"; lenses["6A 48 8E 8E 30 30 70 02"] = "AF-S Nikkor 300mm f/4D IF-ED"; lenses["6B 48 24 24 24 24 71 02"] = "AF Nikkor ED 14mm f/2.8D"; @@ -445,29 +477,31 @@ class NALensDataInterpreter : public Interpreter { lenses["74 40 37 62 2C 34 78 06"] = "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"; lenses["75 40 3C 68 2C 3C 79 06"] = "AF Zoom-Nikkor 28-100mm f/3.5-5.6G"; lenses["76 58 50 50 14 14 7A 02"] = "AF Nikkor 50mm f/1.8D"; - lenses["77 44 61 98 34 3C 7B 0E"] = "Sigma 80-400mm f4.5-5.6 EX OS"; + lenses["77 44 61 98 34 3C 7B 0E"] = "Sigma 80-400mm f/4.5-5.6 EX OS"; lenses["77 48 5C 80 24 24 7B 0E"] = "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"; lenses["78 40 37 6E 2C 3C 7C 0E"] = "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED"; - lenses["79 40 11 11 2C 2C 1C 06"] = "Sigma 8mm F3.5 EX"; + lenses["79 40 11 11 2C 2C 1C 06"] = "Sigma 8mm f/3.5 EX Circular Fisheye"; lenses["79 40 3C 80 2C 3C 7F 06"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED"; - lenses["79 48 5C 5C 24 24 1C 06"] = "Sigma 70mm F2.8 EX DG Macro"; - lenses["7A 3B 53 80 30 3C 4B 06"] = "Sigma 55-200mm F4-5.6 DC HSM"; + lenses["79 48 5C 5C 24 24 1C 06"] = "Sigma 70mm f/2.8 EX DG Macro"; + lenses["7A 3B 53 80 30 3C 4B 06"] = "Sigma 55-200mm f/4-5.6 DC HSM"; lenses["7A 3C 1F 37 30 30 7E 06"] = "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"; - lenses["7A 40 2D 50 2C 3C 4B 06"] = "Sigma 18-50mm F3.5-5.6 DC HSM"; - lenses["7A 47 2B 5C 24 34 4B 06"] = "Sigma 17-70mm F2.8-4.5 DC Macro Asp. IF HSM"; - lenses["7A 47 50 76 24 24 4B 06"] = "Sigma APO 50-150mm F2.8 EX DC HSM"; - lenses["7A 48 2B 5C 24 34 4B 06"] = "Sigma 17-70mm F2.8-4.5 DC Macro Asp. IF HSM"; - lenses["7A 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm F2.8 EX DC HSM"; - lenses["7A 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm F2.8 EX APO DG Macro HSM II"; - lenses["7A 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm F2.8 EX DG HSM"; + lenses["7A 40 2D 50 2C 3C 4B 06"] = "Sigma 18-50mm f/3.5-5.6 DC HSM"; + lenses["7A 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM"; + lenses["7A 47 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"; + lenses["7A 47 50 76 24 24 4B 06"] = "Sigma APO 50-150mm f/2.8 EX DC HSM"; + lenses["7A 48 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"; + lenses["7A 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC HSM"; + lenses["7A 48 5C 80 24 24 4B 06"] = "Sigma APO 70-200mm f/2.8 EX DG Macro HSM II"; + lenses["7A 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; lenses["7B 48 80 98 30 30 80 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"; lenses["7D 48 2B 53 24 24 82 06"] = "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"; lenses["7F 40 2D 5C 2C 34 84 06"] = "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED"; - lenses["7F 48 2B 5C 24 34 1C 06"] = "Sigma 17-70mm F2.8-4.5 DC Macro Asp. IF"; - lenses["7F 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm F2.8 EX DC Macro"; + lenses["7F 48 2B 5C 24 34 1C 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF"; + lenses["7F 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC Macro"; lenses["80 48 1A 1A 24 24 85 06"] = "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED"; lenses["81 54 80 80 18 18 86 0E"] = "AF-S VR Nikkor 200mm f/2G IF-ED"; lenses["82 48 8E 8E 24 24 87 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED"; + lenses["83 00 B0 B0 5A 5A 88 04"] = "FSA-L2 EDG 65 800mm f/13 G"; lenses["89 3C 53 80 30 3C 8B 06"] = "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"; lenses["8A 54 6A 6A 24 24 8C 0E"] = "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"; lenses["8B 40 2D 80 2C 3C 8D 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"; @@ -492,41 +526,60 @@ class NALensDataInterpreter : public Interpreter { lenses["9D 00 62 62 24 24 9F 06"] = "PC-E Micro Nikkor 85mm f/2.8D"; lenses["9D 54 62 62 24 24 9F 02"] = "PC-E Micro Nikkor 85mm f/2.8D"; lenses["9E 40 2D 6A 2C 3C A0 0E"] = "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"; + lenses["9F 37 50 A0 34 40 4B 0E"] = "Sigma 50-500mm f/4.5-6.3 DG OS HSM"; lenses["9F 58 44 44 14 14 A1 06"] = "AF-S DX Nikkor 35mm f/1.8G"; lenses["A0 54 50 50 0C 0C A2 06"] = "AF-S Nikkor 50mm f/1.4G"; lenses["A1 40 18 37 2C 34 A3 06"] = "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED"; - lenses["A1 41 19 31 2C 2C 4B 06"] = "Sigma 10-20mm F3.5 EX DC HSM"; + lenses["A1 41 19 31 2C 2C 4B 06"] = "Sigma 10-20mm f/3.5 EX DC HSM"; lenses["A2 48 5C 80 24 24 A4 0E"] = "AF-S Nikkor 70-200mm f/2.8G ED VR II"; - lenses["A5 40 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm F3.5-6.3 DC OS HSM"; - lenses["A6 48 37 5C 24 24 4B 06"] = "Sigma 24-70mm F2.8 IF EX DG HSM"; + lenses["A3 3C 29 44 30 30 A5 0E"] = "AF-S Nikkor 16-35mm f/4G ED VR"; + lenses["A3 3C 5C 8E 30 3C 4B 0E"] = "Sigma 70-300mm f/4-5.6 DG OS"; + lenses["A4 47 2D 50 24 34 4B 0E"] = "Sigma 18-50mm f/2.8-4.5 DC OS HSM"; + lenses["A4 54 37 37 0C 0C A6 06"] = "AF-S Nikkor 24mm f/1.4G ED"; + lenses["A5 40 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC OS HSM"; + lenses["A5 40 3C 8E 2C 3C A7 0E"] = "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR"; + lenses["A6 48 37 5C 24 24 4B 06"] = "Sigma 24-70mm f/2.8 IF EX DG HSM"; + lenses["A6 48 8E 8E 24 24 A8 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED II"; + lenses["A7 49 80 A0 24 24 4B 06"] = "Sigma APO 200-500mm f/2.8 EX DG"; + lenses["A7 4B 62 62 2C 2C A9 0E"] = "AF-S DX Micro Nikkor 85mm f/3.5G ED VR"; + lenses["A9 54 80 80 18 18 AB 0E"] = "AF-S Nikkor 200mm f/2G ED VR II"; lenses["AA 3C 37 6E 30 30 AC 0E"] = "AF-S Nikkor 24-120mm f/4G ED VR"; - lenses["B6 48 37 56 24 24 1C 02"] = "Sigma 24-60mm F2.8 EX DG"; - lenses["CD 3D 2D 70 2E 3C 4B 0E"] = "Sigma 18-125mm F3.8-5.6 DC OS HSM"; - lenses["CE 34 76 A0 38 40 4B 0E"] = "Sigma 150-500mm F5-6.3 DG OS APO HSM"; - lenses["CF 38 6E 98 34 3C 4B 0E"] = "Sigma APO 120-400mm F4.5-5.6 DG OS HSM"; - lenses["DC 48 19 19 24 24 4B 06"] = "Sigma 10mm F2.8 EX DC HSM Fisheye"; - lenses["DE 54 50 50 0C 0C 4B 06"] = "Sigma 50mm F1.4 EX DG HSM"; - lenses["E0 3C 5C 8E 30 3C 4B 06"] = "Sigma 70-300mm F4-5.6 APO DG Macro HSM"; - lenses["E1 58 37 37 14 14 1C 02"] = "Sigma 24mm F1.8 EX DG Aspherical Macro"; - lenses["E5 54 6A 6A 24 24 35 02"] = "Sigma Macro 105mm F2.8 EX DG"; - lenses["E9 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm F2.8 EX DG Macro"; - lenses["ED 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm F3.5-6.3 DC OS HSM"; - lenses["EE 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm F2.8 EX APO DG Macro HSM II"; - lenses["F0 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm F4.5-5.6 EX DG Aspherical HSM"; - lenses["F3 54 2B 50 24 24 84 0E"] = "Tamron SP AF 17-50mm F/2.8 XR Di II VC LD Aspherical (IF) (B005)"; + lenses["AC 38 53 8E 34 3C AE 0E"] = "AF-S DX VR Nikkor 55-300mm f/4.5-5.6G ED"; + lenses["AE 54 62 62 0C 0C B0 06"] = "AF-S Nikkor 85mm f/1.4G"; + lenses["AF 54 44 44 0C 0C B1 06"] = "AF-S Nikkor 35mm f/1.4G"; + lenses["B6 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG"; + lenses["CD 3D 2D 70 2E 3C 4B 0E"] = "Sigma 18-125mm f/3.8-5.6 DC OS HSM"; + lenses["CE 34 76 A0 38 40 4B 0E"] = "Sigma APO 150-500mm f/5-6.3 DG OS HSM"; + lenses["CF 38 6E 98 34 3C 4B 0E"] = "Sigma APO 120-400mm f/4.5-5.6 DG OS HSM"; + lenses["DC 48 19 19 24 24 4B 06"] = "Sigma 10mm f/2.8 EX DC HSM Fisheye"; + lenses["DE 54 50 50 0C 0C 4B 06"] = "Sigma 50mm f/1.4 EX DG HSM"; + lenses["E0 3C 5C 8E 30 3C 4B 06"] = "Sigma APO 70-300mm f/4-5.6 DG Macro HSM"; + lenses["E1 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro"; + lenses["E5 54 6A 6A 24 24 35 02"] = "Sigma 105mm f/2.8 EX DG Macro"; + lenses["E9 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; + lenses["ED 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM"; + lenses["EE 48 5C 80 24 24 4B 06"] = "Sigma APO 70-200mm f/2.8 EX DG Macro HSM II"; + lenses["F0 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"; + lenses["F1 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX DG HSM"; + lenses["F1 47 5C 8E 30 3C DF 0E"] = "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"; + lenses["F3 48 68 8E 30 30 4B 02"] = "Sigma APO 100-300mm f/4 EX IF HSM"; + lenses["F3 54 2B 50 24 24 84 0E"] = "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF) (B005)"; lenses["F4 54 56 56 18 18 84 06"] = "Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)"; lenses["F5 40 2C 8A 2C 40 40 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Macro (B003)"; - lenses["F5 48 76 76 24 24 4B 06"] = "Sigma 150mm F2.8 EX DG APO Macro HSM"; + lenses["F5 48 76 76 24 24 4B 06"] = "Sigma 150mm f/2.8 EX DG APO Macro HSM"; lenses["F6 3F 18 37 2C 34 84 06"] = "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"; + lenses["F6 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro"; lenses["F7 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; - lenses["F8 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm F1.4 EX DC HSM"; + lenses["F8 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM"; lenses["F8 55 64 64 24 24 84 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; - lenses["F9 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm F4-5.6 EX DC HSM"; + lenses["F8 55 64 64 24 24 84 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; + lenses["F9 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; lenses["F9 40 3C 8E 2C 40 40 0E"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical (IF) Macro (A20)"; lenses["FA 54 3C 5E 24 24 84 06"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"; - lenses["FB 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm F2.8 EX DG HSM"; - lenses["FD 47 50 76 24 24 4B 06"] = "Sigma 50-150mm F2.8 EX APO DC HSM II"; - lenses["FE 47 00 00 24 24 4B 06"] = "Sigma 4.5mm F2.8 EX DC Circular Fisheye HSM"; + lenses["FB 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM"; + lenses["FD 47 50 76 24 24 4B 06"] = "Sigma APO 50-150mm f/2.8 EX DC HSM II"; + lenses["FE 47 00 00 24 24 4B 06"] = "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"; + lenses["FE 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; } virtual std::string toString (Tag* t) { @@ -581,6 +634,12 @@ class NALensDataInterpreter : public Interpreter { if (model.substr(0,10)=="NIKON D100" || model.substr(0,9)=="NIKON D1X") { lidoffs = 0; d100 = true; + }else if( ver<204){ + lidoffs = 7; + d100 = false; + }else{ + lidoffs = 8; + d100 = false; } unsigned char buffer[15]; @@ -606,14 +665,22 @@ class NALensDataInterpreter : public Interpreter { buffer[i] ^= (cj += ci * ck++); } - if (!d100) { - ld << "ExitPupilPosition = " << (int) buffer[0] << std::endl; - ld << "AFAperture = " << (int) buffer[1] << std::endl; - ld << "FocusPosition = " << (int) buffer[4] << std::endl; - ld << "FocusDistance = " << (int) buffer[5] << std::endl; - ld << "FocalLength = " << (int) buffer[6] << std::endl; - ld << "EffectiveMaxAperture = " << (int) buffer[14] << std::endl; - } + if (!d100) + if( ver<204 ){ + ld << "ExitPupilPosition = " << (int) buffer[0] << std::endl; + ld << "AFAperture = " << (int) buffer[1] << std::endl; + ld << "FocusPosition = " << (int) buffer[4] << std::endl; + ld << "FocusDistance = " << (int) buffer[5] << std::endl; + ld << "FocalLength = " << (int) buffer[6] << std::endl; + ld << "EffectiveMaxAperture = " << (int) buffer[14] << std::endl; + }else{ + ld << "ExitPupilPosition = " << (int) buffer[0] << std::endl; + ld << "AFAperture = " << (int) buffer[1] << std::endl; + ld << "FocusPosition = " << (int) buffer[4] << std::endl; + ld << "FocusDistance = " << (int) buffer[6] << std::endl; + ld << "FocalLength = " << (int) buffer[7] << std::endl; + ld << "EffectiveMaxAperture = " << (int) buffer[15] << std::endl; + } for (int i=0; i<7; i++) lid << std::setw(2) << std::setfill('0') << (int)buffer[lidoffs+i] << ' '; diff --git a/rtexif/olympusattribs.cc b/rtexif/olympusattribs.cc index 153bf5ff7..1ab047eb6 100644 --- a/rtexif/olympusattribs.cc +++ b/rtexif/olympusattribs.cc @@ -65,52 +65,80 @@ class OLApertureInterpreter : public Interpreter { OLApertureInterpreter olApertureInterpreter; class OLLensTypeInterpreter : public Interpreter { - std::map lenses; + std::map lenses; public: OLLensTypeInterpreter () { - lenses[1] = "Zuiko Digital ED 50mm F2.0 Macro"; - lenses[1 +65536] = "Zuiko Digital 40-150mm F3.5-4.5"; - lenses[2] = "Zuiko Digital ED 150mm F2.0"; - lenses[3] = "Zuiko Digital ED 300mm F2.8"; - lenses[5] = "Zuiko Digital 14-54mm F2.8-3.5"; - lenses[5 +65536] = "Zuiko Digital Pro ED 90-250mm F2.8"; - lenses[6] = "Zuiko Digital ED 50-200mm F2.8-3.5"; - lenses[6 +65536] = "Zuiko Digital ED 8mm F3.5 Fisheye"; - lenses[7] = "Zuiko Digital 11-22mm F2.8-3.5"; - lenses[7 +65536] = "Zuiko Digital 18-180mm F3.5-6.3"; - lenses[8] = "Zuiko Digital 70-300mm F4.0-5.6"; - lenses[21] = "Zuiko Digital ED 7-14mm F4.0"; - lenses[23] = "Zuiko Digital Pro ED 35-100mm F2.0"; - lenses[24] = "Zuiko Digital 14-45mm F3.5-5.6"; - lenses[32] = "Zuiko Digital 35mm F3.5 Macro"; - lenses[34] = "Zuiko Digital 17.5-45mm F3.5-5.6"; - lenses[35] = "Zuiko Digital ED 14-42mm F3.5-5.6"; - lenses[36] = "Zuiko Digital ED 40-150mm F4.0-5.6"; - lenses[48] = "Zuiko Digital ED 50-200mm SWD F2.8-3.5"; - lenses[49] = "Zuiko Digital ED 12-60mm SWD F2.8-4.0"; - lenses[256+ 1] = "18-50mm F3.5-5.6"; - lenses[256+ 2] = "55-200mm F4.0-5.6 DC"; - lenses[256+ 3] = "18-125mm F3.5-5.6 DC"; - lenses[256+ 4] = "18-125mm F3.5-5.6"; - lenses[256+ 5] = "30mm F1.4"; - lenses[256+ 6] = "50-500mm F4.0-6.3 EX DG APO HSM RF"; - lenses[256+ 7] = "105mm F2.8 DG"; - lenses[256+ 8] = "150mm F2.8 DG HSM"; - lenses[256+ 17] = "135-400mm F4.5-5.6 DG ASP APO RF"; - lenses[256+ 18] = "300-800mm F5.6 EX DG APO"; - lenses[512+ 1] = "D Vario Elmarit 14-50mm, F2.8-3.5 Asph."; - lenses[512+ 2] = "D Summilux 25mm, F1.4 Asph."; - lenses[512+ 4] = "Vario Elmar 14-150mm f3.5-5.6"; - lenses[768+ 1] = "D Vario Elmarit 14-50mm, F2.8-3.5 Asph."; - lenses[768+ 2] = "D Summilux 25mm, F1.4 Asph."; + // exadecimal bytes + lenses["00 01 00"] = "Zuiko Digital ED 50mm f/2 Macro"; + lenses["00 01 01"] = "Zuiko Digital 40-150mm f/3.5-4.5"; + lenses["00 01 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6"; + lenses["00 02 00"] = "Zuiko Digital ED 150mm f/2"; + lenses["00 02 10"] = "Zuiko Digital 17mm f/2.8 Pancake"; + lenses["00 03 00"] = "Zuiko Digital ED 300mm f/2.8"; + lenses["00 03 10"] = "Zuiko Digital ED 14-150mm f/4-5.6"; + lenses["00 04 10"] = "Zuiko Digital ED 9-18mm f/4-5.6"; + lenses["00 05 00"] = "Zuiko Digital 14-54mm f/2.8-3.5"; + lenses["00 05 01"] = "Zuiko Digital Pro ED 90-250mm f/2.8"; + lenses["00 05 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 "; + lenses["00 06 00"] = "Zuiko Digital ED 50-200mm f/2.8-3.5"; + lenses["00 06 01"] = "Zuiko Digital ED 8mm f/3.5 Fisheye"; + lenses["00 07 00"] = "Zuiko Digital 11-22mm f/2.8-3.5"; + lenses["00 07 01"] = "Zuiko Digital 18-180mm f/3.5-6.3"; + lenses["00 08 01"] = "Zuiko Digital 70-300mm f/4-5.6"; + lenses["00 15 00"] = "Zuiko Digital ED 7-14mm f/4"; + lenses["00 17 00"] = "Zuiko Digital Pro ED 35-100mm f/2"; + lenses["00 18 00"] = "Zuiko Digital 14-45mm f/3.5-5.6"; + lenses["00 20 00"] = "Zuiko Digital 35mm f/3.5 Macro"; + lenses["00 22 00"] = "Zuiko Digital 17.5-45mm f/3.5-5.6"; + lenses["00 23 00"] = "Zuiko Digital ED 14-42mm f/3.5-5.6"; + lenses["00 24 00"] = "Zuiko Digital ED 40-150mm f/4-5.6"; + lenses["00 30 00"] = "Zuiko Digital ED 50-200mm f/2.8-3.5 SWD"; + lenses["00 31 00"] = "Zuiko Digital ED 12-60mm f/2.8-4 SWD"; + lenses["00 32 00"] = "Zuiko Digital ED 14-35mm f/2 SWD"; + lenses["00 33 00"] = "Zuiko Digital 25mm f/2.8"; + lenses["00 34 00"] = "Zuiko Digital ED 9-18mm f/4-5.6"; + lenses["00 35 00"] = "Zuiko Digital 14-54mm f/2.8-3.5 II"; + lenses["01 01 00"] = "Sigma 18-50mm f/3.5-5.6"; + lenses["01 02 00"] = "Sigma 55-200mm f/4-5.6 DC"; + lenses["01 03 00"] = "Sigma 18-125mm f/3.5-5.6 DC"; + lenses["01 04 00"] = "Sigma 18-125mm f/3.5-5.6"; + lenses["01 05 00"] = "Sigma 30mm f/1.4 DC"; + lenses["01 06 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM RF"; + lenses["01 07 00"] = "Sigma 105mm f/2.8 DG"; + lenses["01 08 00"] = "Sigma 150mm f/2.8 DG HSM"; + lenses["01 10 00"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro"; + lenses["01 11 00"] = "Sigma 135-400mm f/4.5-5.6 DG ASP APO RF"; + lenses["01 12 00"] = "Sigma 300-800mm f/5.6 EX DG APO"; + lenses["01 14 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM RF"; + lenses["01 15 00"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; + lenses["01 16 00"] = "Sigma 70-200mm f/2.8 EX DG Macro HSM II"; + lenses["01 17 00"] = "Sigma 50mm f/1.4 EX DG HSM"; + lenses["02 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph."; + lenses["02 01 10"] = "Lumix G Vario 14-45mm f/3.5-5.6 Asph. Mega OIS"; + lenses["02 02 00"] = "Leica D Summilux 25mm f/1.4 Asph."; + lenses["02 02 10"] = "Lumix G Vario 45-200mm f/4-5.6 Mega OIS"; + lenses["02 03 01"] = "Leica D Vario Elmar 14-50mm f/3.8-5.6 Asph."; + lenses["02 03 10"] = "Lumix G Vario HD 14-140mm f(4-5.8 Asph. Mega OIS "; + lenses["02 04 00"] = "Leica D Vario Elmar 14-150mm f/3.5-5.6"; + lenses["02 04 10"] = "Lumix G Vario 7-14mm f/4 Asph."; + lenses["02 05 10"] = "Lumix G 20mm f/1.7 Asph."; + lenses["02 08 10"] = "Lumix G Fisheye 8mm f/3.5 "; + lenses["03 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph."; + lenses["03 02 00"] = "Leica D Summilux 25mm f/1.4 Asph."; } virtual std::string toString (Tag* t) { - int make = t->toInt(0); - int model = t->toInt(2); - int add = 0; - if (make==0 && (model==1 || model==5 || model==7 || model==6)) - add += 65536 * t->toInt(3); - return lenses [256 * make + model + add]; + std::ostringstream lid; + lid.setf (std::ios_base::hex, std::ios_base::basefield); + lid.setf (std::ios_base::uppercase); + lid << std::setw(2) << std::setfill('0') << t->toInt(0)<< ' '; //maker + lid << std::setw(2) << std::setfill('0') << t->toInt(2)<< ' '; //model + lid << std::setw(2) << std::setfill('0') << t->toInt(3); // submodel + + std::map::iterator r = lenses.find (lid.str()); + if (r!=lenses.end()) + return r->second; + else + return "Unknown"; } }; OLLensTypeInterpreter olLensTypeInterpreter; diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index cac5afea7..6574fba18 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -601,6 +601,8 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*6+ 14, "smc PENTAX-FA* MACRO 200mm f/4 ED[IF]")); choices.insert(p_t(256*7+ 0, "smc PENTAX-DA 21mm f/3.2 AL Limited")); choices.insert(p_t(256*7+ 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)")); + choices.insert(p_t(256*7+ 214, "smc PENTAX-DA 35mm f/2.4 AL")); + choices.insert(p_t(256*7+ 216, "smc PENTAX-DA L 55-300mm f/4-5.8 ED")); choices.insert(p_t(256*7+ 217, "smc PENTAX-DA 50-200mm f/4-5.6 ED WR")); choices.insert(p_t(256*7+ 218, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL WR")); choices.insert(p_t(256*7+ 220, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical [IF]")); @@ -608,6 +610,8 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*7+ 223, "Samsung D-XENON 18-55mm f/3.5-5.6 II")); choices.insert(p_t(256*7+ 224, "smc PENTAX-DA 15mm f/4 ED AL Limited")); choices.insert(p_t(256*7+ 225, "Samsung D-XENON 18-250mm f/3.5-6.3")); + choices.insert(p_t(256*7+ 226, "smc PENTAX-DA* 55mm f/1.4 SDM (SDM unused)")); + choices.insert(p_t(256*7+ 227, "smc PENTAX DA* 60-250mm f/4 [IF] SDM (SDM unused)")); choices.insert(p_t(256*7+ 229, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); choices.insert(p_t(256*7+ 230, "Tamron AF 17-50mm f/2.8 XR Di-II LD (Model A16)")); choices.insert(p_t(256*7+ 231, "smc PENTAX-DA 18-250mm f/3.5-6.3 ED AL [IF]")); @@ -620,6 +624,8 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*7+ 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)")); choices.insert(p_t(256*7+ 243, "smc PENTAX-DA 70mm f/2.4 Limited")); choices.insert(p_t(256*7+ 244, "smc PENTAX-DA 21mm f/3.2 AL Limited")); + choices.insert(p_t(256*8+ 14, "Sigma 17-70mm f/2.8-4.0 DC Macro OS HSM")); + choices.insert(p_t(256*8+ 215, "smc PENTAX-DA 18-135mm f/3.5-5.6 ED AL [IF] DC WR")); choices.insert(p_t(256*8+ 226, "smc PENTAX-DA* 55mm f/1.4 SDM")); choices.insert(p_t(256*8+ 227, "smc PENTAX DA* 60-250mm f/4 [IF] SDM")); choices.insert(p_t(256*8+ 232, "smc PENTAX-DA 17-70mm f/4 AL [IF] SDM")); @@ -629,6 +635,11 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(256*8+ 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM")); choices.insert(p_t(256*8+ 255, "Sigma 70-200mm f/2.8 EX DG Macro HSM II")); choices.insert(p_t(256*8+ 255, "Sigma APO 150-500mm f/5-6.3 DG OS HSM")); + choices.insert(p_t(256*11+ 4, "smc PENTAX-FA 645 45-85mm f/4.5")); + choices.insert(p_t(256*11+ 8, "smc PENTAX-FA 645 80-160mm f/4.5")); + choices.insert(p_t(256*11+ 11, "smc PENTAX-FA 645 35mm f/3.5 AL [IF]")); + choices.insert(p_t(256*11+ 17, "smc PENTAX-FA 645 150-300mm f/5.6 ED [IF]")); + choices.insert(p_t(256*13+ 18, "smc PENTAX-D FA 645 55mm f/2.8 AL [IF] SDM AW")); } virtual std::string toString (Tag* t) { double maxApertureAtFocal = 0; diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 9d494240c..be8c03026 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -580,6 +580,30 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) default: goto defsubdirs; } + }else if (!strncmp(make, "Canon", 5)) { + switch( tag ){ + case 0x0001: + case 0x0002: + case 0x0004: + case 0x0005: + case 0x0093: + case 0x0098: + case 0x00a0: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,SSHORT , attrib->subdirAttribs, getOrder()); + makerNoteKind = TABLESUBDIR; + break; + case 0x009a: + case 0x4013: + directory = new TagDirectory*[2]; + directory[1] = NULL; + directory[0] = new TagDirectoryTable (parent, f, valuesize,0,LONG , attrib->subdirAttribs, getOrder()); + makerNoteKind = TABLESUBDIR; + break; + default: + goto defsubdirs; + } }else if(type==UNDEFINED){ count = 1; type = LONG; @@ -800,10 +824,10 @@ void Tag::toString (char* buffer, int ofs) { switch (type) { case UNDEFINED: case BYTE: sprintf (b, "%d", value[i+ofs]); break; - case SSHORT: - case SHORT: sprintf (b, "%d", toInt(2*i+ofs)); break; - case SLONG: - case LONG: sprintf (b, "%d", toInt(4*i+ofs)); break; + case SSHORT: sprintf (b, "%d", toInt(2*i+ofs)); break; + case SHORT: sprintf (b, "%u", toInt(2*i+ofs)); break; + case SLONG: sprintf (b, "%ld", toInt(4*i+ofs)); break; + case LONG: sprintf (b, "%lu", toInt(4*i+ofs)); break; case SRATIONAL: case RATIONAL: sprintf (b, "%d/%d", (int)sget4 (value+8*i+ofs, getOrder()), (int)sget4 (value+8*i+ofs+4, getOrder())); break; case FLOAT: sprintf (b, "%g", toDouble(8*i+ofs)); break; diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 9923bbf7e..b6fefc4c5 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -231,14 +231,17 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(59, "Sony AF 28-75mm f/2.8 SAM")); choices.insert(p_t(60, "Carl Zeiss Distagon T* 24mm f/2 ZA SSM")); choices.insert(p_t(61, "Sony AF 85mm f/2.8 SAM")); + choices.insert(p_t(62, "Sony DT 35mm f/1.8 SAM")); choices.insert(p_t(128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)")); choices.insert(p_t(128, "Tamron AF 28-300mm f/3.5-6.3")); choices.insert(p_t(128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical (IF) Macro ")); choices.insert(p_t(128, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF")); + choices.insert(p_t(128, "Sigma AF 50-150mm f/2.8 EX DC APO HSM II")); choices.insert(p_t(128, "Sigma 10-20mm f/3.5 EX DC")); choices.insert(p_t(128, "Sigma 70-200mm f/2.8 II EX DG APO Macro")); choices.insert(p_t(129, "Tamron 200-400mm f/5.6 LD (IF)")); choices.insert(p_t(129, "Tamron 70-300mm f/4-5.6 LD")); + choices.insert(p_t(131, "Tamron 20-40mm f/2.7-3.5 SP Aspherical IF")); choices.insert(p_t(135, "Vivitar 28-210mm f/3.5-5.6")); choices.insert(p_t(136, "Tokina EMZ M100 AF 100mm f/3.5")); choices.insert(p_t(137, "Cosina 70-210mm f/2.8-4 AF")); @@ -309,6 +312,7 @@ class SALensIDInterpreter : public IntLensInterpreter< int > { choices.insert(p_t(2581, "Sigma 180mm f/5.6 Macro")); choices.insert(p_t(2581, "Tamron AF 90mm f/2.8 Macro")); choices.insert(p_t(2585, "Minolta AF 35-105mm f/3.5-4.5 New")); + choices.insert(p_t(2585, "Beroflex 35-135mm f/3.5-4.5")); choices.insert(p_t(2585, "Tamron AF 24-135mm f/3.5-5.6")); choices.insert(p_t(2588, "Minolta AF 70-210mm f/3.5-4.5")); choices.insert(p_t(2589, "Minolta AF 80-200 f/2.8 APO")); diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index b64d7b38c..b98932deb 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -1,6 +1,7 @@ /* * This file is part of RawTherapee. * + * Copyright (c) 2004-2010 Gabor Horvath * * RawTherapee is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -264,14 +265,18 @@ void ThumbBrowserEntryBase::resize (int h) { // calculate the height remaining for the thumbnail image preh = height - upperMargin - 2*borderWidth - lowerMargin - bsh; - int infow, infoh; + int infow=0; + int infoh=0; if (options.showFileNames && !options.overlayedFileNames) { // dimensions of the info text getTextSizes (infow, infoh); - preh -= infoh + textGap; - - // If the text size was selected very high in preferences this may go negative - if (preh<0) preh=30; + infoh += textGap; + preh -= infoh; + } + // Minimum size for thumbs + if (preh<24){ + preh=24; + height = preh + (upperMargin + 2*borderWidth + lowerMargin)+ bsh + infoh; } calcThumbnailSize (); @@ -280,9 +285,9 @@ void ThumbBrowserEntryBase::resize (int h) { width = prew + 2*sideMargin + 2*borderWidth; if (width