Blame src/casiomn_int.cpp

Packit Service 21b5d1
// ***************************************************************** -*- C++ -*-
Packit Service 21b5d1
/*
Packit Service 21b5d1
 * Copyright (C) 2004-2018 Exiv2 authors
Packit Service 21b5d1
 * This program is part of the Exiv2 distribution.
Packit Service 21b5d1
 *
Packit Service 21b5d1
 * This program is free software; you can redistribute it and/or
Packit Service 21b5d1
 * modify it under the terms of the GNU General Public License
Packit Service 21b5d1
 * as published by the Free Software Foundation; either version 2
Packit Service 21b5d1
 * of the License, or (at your option) any later version.
Packit Service 21b5d1
 *
Packit Service 21b5d1
 * This program is distributed in the hope that it will be useful,
Packit Service 21b5d1
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 21b5d1
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 21b5d1
 * GNU General Public License for more details.
Packit Service 21b5d1
 *
Packit Service 21b5d1
 * You should have received a copy of the GNU General Public License
Packit Service 21b5d1
 * along with this program; if not, write to the Free Software
Packit Service 21b5d1
 * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
Packit Service 21b5d1
 */
Packit Service 21b5d1
/*
Packit Service 21b5d1
  File:      Casiomn.cpp
Packit Service 21b5d1
  History:   30-Oct-13, ahu: created
Packit Service 21b5d1
  Credits:   See header file
Packit Service 21b5d1
 */
Packit Service 21b5d1
// *****************************************************************************
Packit Service 21b5d1
// included header files
Packit Service 21b5d1
#include "types.hpp"
Packit Service 21b5d1
#include "casiomn_int.hpp"
Packit Service 21b5d1
#include "tags_int.hpp"
Packit Service 21b5d1
#include "value.hpp"
Packit Service 21b5d1
#include "i18n.h"                // NLS support.
Packit Service 21b5d1
Packit Service 21b5d1
// + standard includes
Packit Service 21b5d1
#include <string>
Packit Service 21b5d1
#include <sstream>
Packit Service 21b5d1
#include <iomanip>
Packit Service 21b5d1
#include <cassert>
Packit Service 21b5d1
#include <cstring>
Packit Service 21b5d1
#include <vector>
Packit Service 21b5d1
Packit Service 21b5d1
// *****************************************************************************
Packit Service 21b5d1
// class member definitions
Packit Service 21b5d1
namespace Exiv2 {
Packit Service 21b5d1
    namespace Internal {
Packit Service 21b5d1
Packit Service 21b5d1
    //! RecordingMode, tag 0x0001
Packit Service 21b5d1
    extern const TagDetails casioRecordingMode[] = {
Packit Service 21b5d1
        {  1, N_("Single Shutter") },
Packit Service 21b5d1
        {  2, N_("Panorama")       },
Packit Service 21b5d1
        {  3, N_("Night Scene")    },
Packit Service 21b5d1
        {  4, N_("Portrait")       },
Packit Service 21b5d1
        {  5, N_("Landscape")      },
Packit Service 21b5d1
        {  7, N_("Panorama")       },
Packit Service 21b5d1
        { 10, N_("Night Scene")    },
Packit Service 21b5d1
        { 15, N_("Portrait")       },
Packit Service 21b5d1
        { 16, N_("Landscape")      }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Quality, tag 0x0002
Packit Service 21b5d1
    extern const TagDetails casioQuality[] = {
Packit Service 21b5d1
        { 1, N_("Economy") },
Packit Service 21b5d1
        { 2, N_("Normal")  },
Packit Service 21b5d1
        { 3, N_("Fine")    }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Focus Mode, tag 0x0003
Packit Service 21b5d1
    extern const TagDetails casioFocusMode[] = {
Packit Service 21b5d1
        { 2, N_("Macro")    },
Packit Service 21b5d1
        { 3, N_("Auto")     },
Packit Service 21b5d1
        { 4, N_("Manual")   },
Packit Service 21b5d1
        { 5, N_("Infinity") },
Packit Service 21b5d1
        { 7, N_("Sport AF") }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! FlashMode, tag 0x0004
Packit Service 21b5d1
    extern const TagDetails casioFlashMode[] = {
Packit Service 21b5d1
        { 1, N_("Auto")              },
Packit Service 21b5d1
        { 2, N_("On")                },
Packit Service 21b5d1
        { 3, N_("Off")               },
Packit Service 21b5d1
        { 4, N_("Off")               },
Packit Service 21b5d1
        { 5, N_("Red-eye Reduction") }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Flash intensity, tag 0x0005
Packit Service 21b5d1
    extern const TagDetails casioFlashIntensity[] = {
Packit Service 21b5d1
        { 11, N_("Weak")   },
Packit Service 21b5d1
        { 12, N_("Low")    },
Packit Service 21b5d1
        { 13, N_("Normal") },
Packit Service 21b5d1
        { 14, N_("High")   },
Packit Service 21b5d1
        { 15, N_("Strong") }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! white balance, tag 0x0007
Packit Service 21b5d1
    extern const TagDetails casioWhiteBalance[] = {
Packit Service 21b5d1
        {   1, N_("Auto")        },
Packit Service 21b5d1
        {   2, N_("Tungsten")    },
Packit Service 21b5d1
        {   3, N_("Daylight")    },
Packit Service 21b5d1
        {   4, N_("Fluorescent") },
Packit Service 21b5d1
        {   5, N_("Shade")       },
Packit Service 21b5d1
        { 129, N_("Manual")      }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Flash intensity, tag 0x0005
Packit Service 21b5d1
    extern const TagDetails casioDigitalZoom[] = {
Packit Service 21b5d1
        { 0x10000, N_("Off")   },
Packit Service 21b5d1
        { 0x10001, N_("2x")    },
Packit Service 21b5d1
        { 0x13333, N_("1.2x")  },
Packit Service 21b5d1
        { 0x13ae1, N_("1.23x") },
Packit Service 21b5d1
        { 0x19999, N_("1.6x")  },
Packit Service 21b5d1
        { 0x20000, N_("2x")    },
Packit Service 21b5d1
        { 0x33333, N_("3.2x")  },
Packit Service 21b5d1
        { 0x40000, N_("4x")    }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Sharpness, tag 0x000b
Packit Service 21b5d1
    extern const TagDetails casioSharpness[] = {
Packit Service 21b5d1
        {  0, N_("Normal") },
Packit Service 21b5d1
        {  1, N_("Soft")   },
Packit Service 21b5d1
        {  2, N_("Hard")   },
Packit Service 21b5d1
        { 16, N_("Normal") },
Packit Service 21b5d1
        { 17, N_("+1")     },
Packit Service 21b5d1
        { 18, N_("-1")     }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Contrast, tag 0x000c
Packit Service 21b5d1
    extern const TagDetails casioContrast[] = {
Packit Service 21b5d1
        {  0, N_("Normal") },
Packit Service 21b5d1
        {  1, N_("Low")   },
Packit Service 21b5d1
        {  2, N_("High")   },
Packit Service 21b5d1
        { 16, N_("Normal") },
Packit Service 21b5d1
        { 17, N_("+1")     },
Packit Service 21b5d1
        { 18, N_("-1")     }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Saturation, tag 0x000d
Packit Service 21b5d1
    extern const TagDetails casioSaturation[] = {
Packit Service 21b5d1
        {  0, N_("Normal") },
Packit Service 21b5d1
        {  1, N_("Low")   },
Packit Service 21b5d1
        {  2, N_("High")   },
Packit Service 21b5d1
        { 16, N_("Normal") },
Packit Service 21b5d1
        { 17, N_("+1")     },
Packit Service 21b5d1
        { 18, N_("-1")     }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Enhancement, tag 0x0016
Packit Service 21b5d1
    extern const TagDetails casioEnhancement[] = {
Packit Service 21b5d1
        { 1, N_("Off")         },
Packit Service 21b5d1
        { 2, N_("Red")         },
Packit Service 21b5d1
        { 3, N_("Green")       },
Packit Service 21b5d1
        { 4, N_("Blue")        },
Packit Service 21b5d1
        { 5, N_("Flesh Tones") }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Color filter, tag 0x0017
Packit Service 21b5d1
    extern const TagDetails casioColorFilter[] = {
Packit Service 21b5d1
        { 1, N_("Off")           },
Packit Service 21b5d1
        { 2, N_("Black & White") },
Packit Service 21b5d1
        { 3, N_("Sepia")         },
Packit Service 21b5d1
        { 4, N_("Red")           },
Packit Service 21b5d1
        { 5, N_("Green")         },
Packit Service 21b5d1
        { 6, N_("Blue")          },
Packit Service 21b5d1
        { 7, N_("Yellow")        },
Packit Service 21b5d1
        { 8, N_("Pink")          },
Packit Service 21b5d1
        { 9, N_("Purple")        }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! flash intensity 2, tag 0x0019
Packit Service 21b5d1
    extern const TagDetails casioFlashIntensity2[] = {
Packit Service 21b5d1
        { 1, N_("Normal") },
Packit Service 21b5d1
        { 2, N_("Weak")   },
Packit Service 21b5d1
        { 3, N_("Strong") }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! CCD Sensitivity intensity, tag 0x0020
Packit Service 21b5d1
    extern const TagDetails casioCCDSensitivity[] = {
Packit Service 21b5d1
        {  64, N_("Normal")                     },
Packit Service 21b5d1
        { 125, N_("+1.0")                       },
Packit Service 21b5d1
        { 250, N_("+2.0")                       },
Packit Service 21b5d1
        { 244, N_("+3.0")                       },
Packit Service 21b5d1
        {  80, N_("Normal (ISO 80 equivalent)") },
Packit Service 21b5d1
        { 100, N_("High")                       }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    // Casio MakerNote Tag Info
Packit Service 21b5d1
    const TagInfo CasioMakerNote::tagInfo_[] = {
Packit Service 21b5d1
        TagInfo(0x0001, "RecodingMode", N_("RecodingMode"), N_("Recording Mode"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioRecordingMode)),
Packit Service 21b5d1
        TagInfo(0x0002, "Quality", N_("Quality"), N_("Quality"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioQuality)),
Packit Service 21b5d1
        TagInfo(0x0003, "FocusMode", N_("Focus Mode"), N_("Focus Mode"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFocusMode)),
Packit Service 21b5d1
        TagInfo(0x0004, "FlashMode", N_("Flash Mode"), N_("Flash Mode"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFlashMode)),
Packit Service 21b5d1
        TagInfo(0x0005, "FlashIntensity", N_("Flash Intensity"), N_("Flash Intensity"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFlashIntensity)),
Packit Service 21b5d1
        TagInfo(0x0006, "ObjectDistance", N_("Object Distance"), N_("Distance to object"), casioId, makerTags, unsignedLong, -1, print0x0006),
Packit Service 21b5d1
        TagInfo(0x0007, "WhiteBalance", N_("White Balance"), N_("White balance settings"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioWhiteBalance)),
Packit Service 21b5d1
        TagInfo(0x000a, "DigitalZoom", N_("Digital Zoom"), N_("Digital zoom"), casioId, makerTags, unsignedLong, -1, EXV_PRINT_TAG(casioDigitalZoom)),
Packit Service 21b5d1
        TagInfo(0x000b, "Sharpness", N_("Sharpness"), N_("Sharpness"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioSharpness)),
Packit Service 21b5d1
        TagInfo(0x000c, "Contrast", N_("Contrast"), N_("Contrast"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioContrast)),
Packit Service 21b5d1
        TagInfo(0x000d, "Saturation", N_("Saturation"), N_("Saturation"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioSaturation)),
Packit Service 21b5d1
        TagInfo(0x0014, "ISO", N_("ISO"), N_("ISO"), casioId, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x0015, "FirmwareDate", N_("Firmware date"), N_("Firmware date"), casioId, makerTags, asciiString, -1, print0x0015),
Packit Service 21b5d1
        TagInfo(0x0016, "Enhancement", N_("Enhancement"), N_("Enhancement"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioEnhancement)),
Packit Service 21b5d1
        TagInfo(0x0017, "ColorFilter", N_("Color Filter"), N_("Color Filter"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioColorFilter)),
Packit Service 21b5d1
        TagInfo(0x0018, "AFPoint", N_("AF Point"), N_("AF Point"), casioId, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x0019, "FlashIntensity2", N_("Flash Intensity"), N_("Flash Intensity"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFlashIntensity2)),
Packit Service 21b5d1
        TagInfo(0x0020, "CCDSensitivity", N_("CCDSensitivity"), N_("CCDSensitivity"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioCCDSensitivity)),
Packit Service 21b5d1
        TagInfo(0x0e00, "PrintIM", N_("Print IM"), N_("PrintIM information"), casioId, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0xffff, "(UnknownCasioMakerNoteTag)", "(UnknownCasioMakerNoteTag)", N_("Unknown CasioMakerNote tag"), casioId, makerTags, asciiString, -1, printValue)
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    const TagInfo* CasioMakerNote::tagList()
Packit Service 21b5d1
    {
Packit Service 21b5d1
        return tagInfo_;
Packit Service 21b5d1
    }
Packit Service 21b5d1
Packit Service 21b5d1
    std::ostream& CasioMakerNote::print0x0006(std::ostream& os, const Value& value, const ExifData*)
Packit Service 21b5d1
    {
Packit Service 21b5d1
        std::ios::fmtflags f( os.flags() );
Packit Service 21b5d1
        std::ostringstream oss;
Packit Service 21b5d1
        oss.copyfmt(os);
Packit Service 21b5d1
        os << std::fixed << std::setprecision(2) << value.toLong() / 1000.0 << _(" m");
Packit Service 21b5d1
        os.copyfmt(oss);
Packit Service 21b5d1
        os.flags(f);
Packit Service 21b5d1
        return os;
Packit Service 21b5d1
    }
Packit Service 21b5d1
Packit Service 21b5d1
    std::ostream& CasioMakerNote::print0x0015(std::ostream& os, const Value& value, const ExifData*)
Packit Service 21b5d1
    {
Packit Service 21b5d1
        // format is:  "YYMM#00#00DDHH#00#00MM#00#00#00#00" or  "YYMM#00#00DDHH#00#00MMSS#00#00#00"
Packit Service 21b5d1
        std::vector<char> numbers;
Packit Service 21b5d1
        for(long i=0; i
Packit Service 21b5d1
        {
Packit Service 21b5d1
            long l=value.toLong(i);
Packit Service 21b5d1
            if(l!=0)
Packit Service 21b5d1
            {
Packit Service 21b5d1
                numbers.push_back((char)l);
Packit Service 21b5d1
            };
Packit Service 21b5d1
        };
Packit Service 21b5d1
        if(numbers.size()>=10)
Packit Service 21b5d1
        {
Packit Service 21b5d1
            //year
Packit Service 21b5d1
            long l=(numbers[0]-48)*10+(numbers[1]-48);
Packit Service 21b5d1
            if(l<70)
Packit Service 21b5d1
            {
Packit Service 21b5d1
                l+=2000;
Packit Service 21b5d1
            }
Packit Service 21b5d1
            else
Packit Service 21b5d1
            {
Packit Service 21b5d1
                l+=1900;
Packit Service 21b5d1
            };
Packit Service 21b5d1
            os << l << ":";
Packit Service 21b5d1
            // month, day, hour, minutes
Packit Service 21b5d1
            os << numbers[2] << numbers[3] << ":" << numbers[4] << numbers[5] << " " << numbers[6] << numbers[7] << ":" << numbers[8] << numbers[9];
Packit Service 21b5d1
            // optional seconds
Packit Service 21b5d1
            if(numbers.size()==12)
Packit Service 21b5d1
            {
Packit Service 21b5d1
                os << ":" << numbers[10] << numbers[11];
Packit Service 21b5d1
            };
Packit Service 21b5d1
        }
Packit Service 21b5d1
        else
Packit Service 21b5d1
        {
Packit Service 21b5d1
            os << value;
Packit Service 21b5d1
        };
Packit Service 21b5d1
        return os;
Packit Service 21b5d1
    }
Packit Service 21b5d1
Packit Service 21b5d1
    //Casio Makernotes, Type 2
Packit Service 21b5d1
    //! Quality Mode, tag 0x0004
Packit Service 21b5d1
    extern const TagDetails casio2QualityMode[] = {
Packit Service 21b5d1
        { 0, N_("Economy") },
Packit Service 21b5d1
        { 1, N_("Normal")  },
Packit Service 21b5d1
        { 2, N_("Fine")    }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Image Size, tag 0x0009
Packit Service 21b5d1
    extern const TagDetails casio2ImageSize[] = {
Packit Service 21b5d1
        {  0, "640x480"   },
Packit Service 21b5d1
        {  4, "1600x1200" },
Packit Service 21b5d1
        {  5, "2048x1536" },
Packit Service 21b5d1
        { 20, "2288x1712" },
Packit Service 21b5d1
        { 21, "2592x1944" },
Packit Service 21b5d1
        { 22, "2304x1728" },
Packit Service 21b5d1
        { 36, "3008x2008" }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Focus Mode, tag 0x000d
Packit Service 21b5d1
    extern const TagDetails casio2FocusMode[] = {
Packit Service 21b5d1
        { 0, N_("Normal") },
Packit Service 21b5d1
        { 1, N_("Macro") }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! ISO Speed, tag 0x0014
Packit Service 21b5d1
    extern const TagDetails casio2IsoSpeed[] = {
Packit Service 21b5d1
        { 3, "50"  },
Packit Service 21b5d1
        { 4, "64"  },
Packit Service 21b5d1
        { 6, "100" },
Packit Service 21b5d1
        { 9, "200" }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! White Balance, tag 0x0019
Packit Service 21b5d1
    extern const TagDetails casio2WhiteBalance[] = {
Packit Service 21b5d1
        { 0, N_("Auto")        },
Packit Service 21b5d1
        { 1, N_("Daylight")    },
Packit Service 21b5d1
        { 2, N_("Shade")       },
Packit Service 21b5d1
        { 3, N_("Tungsten")    },
Packit Service 21b5d1
        { 4, N_("Fluorescent") },
Packit Service 21b5d1
        { 5, N_("Manual")      }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Saturation, tag 0x001f
Packit Service 21b5d1
    extern const TagDetails casio2Saturation[] = {
Packit Service 21b5d1
        { 0, N_("Low")    },
Packit Service 21b5d1
        { 1, N_("Normal") },
Packit Service 21b5d1
        { 2, N_("High")   }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Contrast, tag 0x0020
Packit Service 21b5d1
    extern const TagDetails casio2Contrast[] = {
Packit Service 21b5d1
        { 0, N_("Low")    },
Packit Service 21b5d1
        { 1, N_("Normal") },
Packit Service 21b5d1
        { 2, N_("High")   }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Sharpness, tag 0x0021
Packit Service 21b5d1
    extern const TagDetails casio2Sharpness[] = {
Packit Service 21b5d1
        { 0, N_("Soft")    },
Packit Service 21b5d1
        { 1, N_("Normal") },
Packit Service 21b5d1
        { 2, N_("Hard")   }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! White Balance2, tag 0x2012
Packit Service 21b5d1
    extern const TagDetails casio2WhiteBalance2[] = {
Packit Service 21b5d1
        {  0, N_("Manual")      },
Packit Service 21b5d1
        {  1, N_("Daylight")    },
Packit Service 21b5d1
        {  2, N_("Cloudy")      },
Packit Service 21b5d1
        {  3, N_("Shade")       },
Packit Service 21b5d1
        {  4, N_("Flash")       },
Packit Service 21b5d1
        {  6, N_("Fluorescent") },
Packit Service 21b5d1
        {  9, N_("Tungsten")    },
Packit Service 21b5d1
        { 10, N_("Tungsten")    },
Packit Service 21b5d1
        { 12, N_("Flash")       }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Release Mode, tag 0x3001
Packit Service 21b5d1
    extern const TagDetails casio2ReleaseMode[] = {
Packit Service 21b5d1
        {  1, N_("Normal")              },
Packit Service 21b5d1
        {  3, N_("AE Bracketing")       },
Packit Service 21b5d1
        { 11, N_("WB Bracketing")       },
Packit Service 21b5d1
        { 13, N_("Contrast Bracketing") },
Packit Service 21b5d1
        { 19, N_("High Speed Burst")    }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Quality, tag 0x3002
Packit Service 21b5d1
    extern const TagDetails casio2Quality[] = {
Packit Service 21b5d1
        { 1, N_("Economy") },
Packit Service 21b5d1
        { 2, N_("Normal")  },
Packit Service 21b5d1
        { 3, N_("Fine")    }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Focus Mode 2, tag 0x3003
Packit Service 21b5d1
    extern const TagDetails casio2FocusMode2[] = {
Packit Service 21b5d1
        { 0, N_("Manual")                 },
Packit Service 21b5d1
        { 1, N_("Focus Lock")             },
Packit Service 21b5d1
        { 2, N_("Macro")                  },
Packit Service 21b5d1
        { 3, N_("Single-Area Auto Focus") },
Packit Service 21b5d1
        { 5, N_("Infinity")               },
Packit Service 21b5d1
        { 6, N_("Multi-Area Auto Focus")  },
Packit Service 21b5d1
        { 8, N_("Super Macro")            }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! AutoISO, tag 0x3008
Packit Service 21b5d1
    extern const TagDetails casio2AutoISO[] = {
Packit Service 21b5d1
        {  1, N_("On")                   },
Packit Service 21b5d1
        {  2, N_("Off")                  },
Packit Service 21b5d1
        {  7, N_("On (high sensitiviy)") },
Packit Service 21b5d1
        {  8, N_("On (anti-shake)")      },
Packit Service 21b5d1
        { 10, N_("High Speed")           }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! AFMode, tag 0x3009
Packit Service 21b5d1
    extern const TagDetails casio2AFMode[] = {
Packit Service 21b5d1
        { 0, N_("Off")            },
Packit Service 21b5d1
        { 1, N_("Spot")           },
Packit Service 21b5d1
        { 2, N_("Multi")          },
Packit Service 21b5d1
        { 3, N_("Face Detection") },
Packit Service 21b5d1
        { 4, N_("Tracking")       },
Packit Service 21b5d1
        { 5, N_("Intelligent")    }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! ColorMode, tag 0x3015
Packit Service 21b5d1
    extern const TagDetails casio2ColorMode[] = {
Packit Service 21b5d1
        { 0, N_("Off")           },
Packit Service 21b5d1
        { 2, N_("Black & White") },
Packit Service 21b5d1
        { 3, N_("Sepia")         }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Enhancement, tag 0x3016
Packit Service 21b5d1
    extern const TagDetails casio2Enhancement[] = {
Packit Service 21b5d1
        { 0, N_("Off")         },
Packit Service 21b5d1
        { 1, N_("Scenery")     },
Packit Service 21b5d1
        { 3, N_("Green")       },
Packit Service 21b5d1
        { 5, N_("Unterwater")  },
Packit Service 21b5d1
        { 9, N_("Flesh Tones") }
Packit Service 21b5d1
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Color Filter, tag 0x3017
Packit Service 21b5d1
    extern const TagDetails casio2ColorFilter[] = {
Packit Service 21b5d1
        { 0, N_("Off")    },
Packit Service 21b5d1
        { 1, N_("Blue")   },
Packit Service 21b5d1
        { 3, N_("Green")  },
Packit Service 21b5d1
        { 4, N_("Yellow") },
Packit Service 21b5d1
        { 5, N_("Red")    },
Packit Service 21b5d1
        { 6, N_("Purple") },
Packit Service 21b5d1
        { 7, N_("Pink")   }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Art Mode, tag 0x301b
Packit Service 21b5d1
    extern const TagDetails casio2ArtMode[] = {
Packit Service 21b5d1
        {  0, N_("Normal")                },
Packit Service 21b5d1
        {  8, N_("Silent Movie")          },
Packit Service 21b5d1
        { 39, N_("HDR")                   },
Packit Service 21b5d1
        { 45, N_("Premium Auto")          },
Packit Service 21b5d1
        { 47, N_("Painting")              },
Packit Service 21b5d1
        { 49, N_("Crayon Drawing")        },
Packit Service 21b5d1
        { 51, N_("Panorama")              },
Packit Service 21b5d1
        { 52, N_("Art HDR")               },
Packit Service 21b5d1
        { 62, N_("High Speed Night Shot") },
Packit Service 21b5d1
        { 64, N_("Monochrome")            },
Packit Service 21b5d1
        { 67, N_("Toy Camera")            },
Packit Service 21b5d1
        { 68, N_("Pop Art")               },
Packit Service 21b5d1
        { 69, N_("Light Tone")            }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Lighting Mode, tag 0x302a
Packit Service 21b5d1
    extern const TagDetails casio2LightingMode[] = {
Packit Service 21b5d1
        { 0, N_("Off")                 },
Packit Service 21b5d1
        { 1, N_("High Dynamic Range")  },
Packit Service 21b5d1
        { 5, N_("Shadow Enhance Low")  },
Packit Service 21b5d1
        { 6, N_("Shadow Enhance High") }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Portrait Refiner, tag 0x302b
Packit Service 21b5d1
    extern const TagDetails casio2PortraitRefiner[] = {
Packit Service 21b5d1
        { 0, N_("Off") },
Packit Service 21b5d1
        { 1, N_("+1")  },
Packit Service 21b5d1
        { 2, N_("+2")  }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Special Effect Setting, tag 0x3031
Packit Service 21b5d1
    extern const TagDetails casio2SpecialEffectSetting[] = {
Packit Service 21b5d1
        {  0, N_("Off")             },
Packit Service 21b5d1
        {  1, N_("Makeup")          },
Packit Service 21b5d1
        {  2, N_("Mist Removal")    },
Packit Service 21b5d1
        {  3, N_("Vivid Landscape") },
Packit Service 21b5d1
        { 16, N_("Art Shot")        }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Drive Mode, tag 0x3103
Packit Service 21b5d1
    extern const TagDetails casio2DriveMode[] = {
Packit Service 21b5d1
        {   0, N_("Single Shot")         },
Packit Service 21b5d1
        {   1, N_("Continuous Shooting") },
Packit Service 21b5d1
        {   2, N_("Continuous (2 fps)")  },
Packit Service 21b5d1
        {   3, N_("Continuous (3 fps)")  },
Packit Service 21b5d1
        {   4, N_("Continuous (4 fps)")  },
Packit Service 21b5d1
        {   5, N_("Continuous (5 fps)")  },
Packit Service 21b5d1
        {   6, N_("Continuous (6 fps)")  },
Packit Service 21b5d1
        {   7, N_("Continuous (7 fps)")  },
Packit Service 21b5d1
        {  10, N_("Continuous (10 fps)") },
Packit Service 21b5d1
        {  12, N_("Continuous (12 fps)") },
Packit Service 21b5d1
        {  15, N_("Continuous (15 fps)") },
Packit Service 21b5d1
        {  20, N_("Continuous (20 fps)") },
Packit Service 21b5d1
        {  30, N_("Continuous (30 fps)") },
Packit Service 21b5d1
        {  40, N_("Continuous (40 fps)") },
Packit Service 21b5d1
        {  60, N_("Continuous (60 fps)") },
Packit Service 21b5d1
        { 240, N_("Auto-N")              }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    //! Video Quality, tag 0x4003
Packit Service 21b5d1
    extern const TagDetails casio2VideoQuality[] = {
Packit Service 21b5d1
        { 1, N_("Standard")        },
Packit Service 21b5d1
        { 3, N_("HD (720p)")       },
Packit Service 21b5d1
        { 4, N_("Full HD (1080p)") },
Packit Service 21b5d1
        { 5, N_("Low")             }
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    // Casio2 MakerNote Tag Info
Packit Service 21b5d1
    const TagInfo Casio2MakerNote::tagInfo_[] = {
Packit Service 21b5d1
        TagInfo(0x0002, "PreviewImageSize", N_("Preview Image Size"), N_("Preview Image Size"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x0003, "PreviewImageLength", N_("Preview Image Length"), N_("Preview Image Length"), casio2Id, makerTags, unsignedLong, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x0004, "PreviewImageStart", N_("Preview Image Start"), N_("Preview Image Start"), casio2Id, makerTags, unsignedLong, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x0008, "QualityMode", N_("Quality Mode"), N_("Quality Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2QualityMode)),
Packit Service 21b5d1
        TagInfo(0x0009, "ImageSize", N_("Image Size"), N_("Image Size"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ImageSize)),
Packit Service 21b5d1
        TagInfo(0x000d, "FocusMode", N_("Focus Mode"), N_("Focus Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2FocusMode)),
Packit Service 21b5d1
        TagInfo(0x0014, "ISOSpeed", N_("ISO Speed"), N_("ISO Speed"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2IsoSpeed)),
Packit Service 21b5d1
        TagInfo(0x0019, "WhiteBalance", N_("White Balance"), N_("White Balance Setting"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2WhiteBalance)),
Packit Service 21b5d1
        TagInfo(0x001d, "FocalLength", N_("Focal Length"), N_("Focal Length"), casio2Id, makerTags, unsignedRational, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x001f, "Saturation", N_("Saturation"), N_("Saturation"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Saturation)),
Packit Service 21b5d1
        TagInfo(0x0020, "Contrast", N_("Contrast"), N_("Contrast"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Contrast)),
Packit Service 21b5d1
        TagInfo(0x0021, "Sharpness", N_("Sharpness"), N_("Sharpness"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Sharpness)),
Packit Service 21b5d1
        TagInfo(0x0e00, "PrintIM", N_("Print IM"), N_("PrintIM information"), casio2Id, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x2000, "PreviewImage", N_("Preview Image"), N_("Preview Image"), casio2Id, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x2001, "FirmwareDate", N_("Firmware Date"), N_("Firmware Date"), casio2Id, makerTags, asciiString, -1, print0x2001),
Packit Service 21b5d1
        TagInfo(0x2011, "WhiteBalanceBias", N_("White Balance Bias"), N_("White Balance Bias"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x2012, "WhiteBalance2", N_("White Balance"), N_("White Balance Setting"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2WhiteBalance2)),
Packit Service 21b5d1
        TagInfo(0x2021, "AFPointPosition", N_("AF Point Position"), N_("AF Point Position"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x2022, "ObjectDistance", N_("Object Distance"), N_("Object Distance"), casio2Id, makerTags, unsignedLong, -1, print0x2022),
Packit Service 21b5d1
        TagInfo(0x2034, "FlashDistance", N_("Flash Distance"), N_("Flash Distance"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x2076, "SpecialEffectMode", N_("Special Effect Mode"), N_("Special Effect Mode"), casio2Id, makerTags, unsignedByte, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x2089, "FaceInfo", N_("Face Info"), N_("Face Info"), casio2Id, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x211c, "FacesDetected", N_("Faces detected"), N_("Faces detected"), casio2Id, makerTags, unsignedByte, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3000, "RecordMode", N_("Record Mode"), N_("Record Mode"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3001, "ReleaseMode", N_("Release Mode"), N_("Release Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ReleaseMode)),
Packit Service 21b5d1
        TagInfo(0x3002, "Quality", N_("Quality"), N_("Quality"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Quality)),
Packit Service 21b5d1
        TagInfo(0x3003, "FocusMode2", N_("Focus Mode2"), N_("Focus Mode2"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2FocusMode2)),
Packit Service 21b5d1
        TagInfo(0x3006, "HometownCity", N_("Home town city"), N_("Home town city"), casio2Id, makerTags, asciiString, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3007, "BestShotMode", N_("Best Shot Mode"), N_("Best Shot Mode"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3008, "AutoISO", N_("Auto ISO"), N_("Auto ISO"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2AutoISO)),
Packit Service 21b5d1
        TagInfo(0x3009, "AFMode", N_("AF Mode"), N_("AF Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2AFMode)),
Packit Service 21b5d1
        TagInfo(0x3011, "Sharpness2", N_("Sharpness"), N_("Sharpness"), casio2Id, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3012, "Contrast2", N_("Contrast"), N_("Contrast"), casio2Id, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3013, "Saturation2", N_("Saturation"), N_("Saturation"), casio2Id, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3014, "ISO", N_("ISO"), N_("ISO"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3015, "ColorMode", N_("Color Mode"), N_("Color Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ColorMode)),
Packit Service 21b5d1
        TagInfo(0x3016, "Enhancement", N_("Enhancement"), N_("Enhancement"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Enhancement)),
Packit Service 21b5d1
        TagInfo(0x3017, "ColorFilter", N_("Color Filter"), N_("Color Filter"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ColorFilter)),
Packit Service 21b5d1
        TagInfo(0x301b, "ArtMode", N_("Art Mode"), N_("Art Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ArtMode)),
Packit Service 21b5d1
        TagInfo(0x301c, "SequenceNumber", N_("Sequence Number"), N_("Sequence Number"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3020, "ImageStabilization", N_("Image Stabilization"), N_("Image Stabilization"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x302a, "LightingMode", N_("Lighting Mode"), N_("Lighting Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2LightingMode)),
Packit Service 21b5d1
        TagInfo(0x302b, "PortraitRefiner", N_("Portrait Refiner"), N_("Portrait Refiner settings"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2PortraitRefiner)),
Packit Service 21b5d1
        TagInfo(0x3030, "SpecialEffectLevel", N_("Special Effect Level"), N_("Special Effect Level"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x3031, "SpecialEffectSetting", N_("Special Effect Setting"), N_("Special Effect Setting"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2SpecialEffectSetting)),
Packit Service 21b5d1
        TagInfo(0x3103, "DriveMode", N_("Drive Mode"), N_("Drive Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2DriveMode)),
Packit Service 21b5d1
        TagInfo(0x310b, "ArtModeParameters", N_("Art Mode Parameters"), N_("Art Mode Parameters"), casio2Id, makerTags, undefined, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x4001, "CaptureFrameRate", N_("Capture Frame Rate"), N_("Capture Frame Rate"), casio2Id, makerTags, unsignedShort, -1, printValue),
Packit Service 21b5d1
        TagInfo(0x4003, "VideoQuality", N_("Video Quality"), N_("Video Quality"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2VideoQuality)),
Packit Service 21b5d1
        TagInfo(0xffff, "(UnknownCasio2MakerNoteTag)", "(UnknownCasio2MakerNoteTag)", N_("Unknown Casio2MakerNote tag"), casio2Id, makerTags, asciiString, -1, printValue)
Packit Service 21b5d1
    };
Packit Service 21b5d1
Packit Service 21b5d1
    const TagInfo* Casio2MakerNote::tagList()
Packit Service 21b5d1
    {
Packit Service 21b5d1
        return tagInfo_;
Packit Service 21b5d1
    }
Packit Service 21b5d1
Packit Service 21b5d1
    std::ostream& Casio2MakerNote::print0x2001(std::ostream& os, const Value& value, const ExifData*)
Packit Service 21b5d1
    {
Packit Service 21b5d1
        // format is:  "YYMM#00#00DDHH#00#00MM#00#00#00#00"
Packit Service 21b5d1
        std::vector<char> numbers;
Packit Service 21b5d1
        for(long i=0; i
Packit Service 21b5d1
        {
Packit Service 21b5d1
            long l=value.toLong(i);
Packit Service 21b5d1
            if(l!=0)
Packit Service 21b5d1
            {
Packit Service 21b5d1
                numbers.push_back((char)l);
Packit Service 21b5d1
            };
Packit Service 21b5d1
        };
Packit Service 21b5d1
        if(numbers.size()>=10)
Packit Service 21b5d1
        {
Packit Service 21b5d1
            //year
Packit Service 21b5d1
            long l=(numbers[0]-48)*10+(numbers[1]-48);
Packit Service 21b5d1
            if(l<70)
Packit Service 21b5d1
            {
Packit Service 21b5d1
                l+=2000;
Packit Service 21b5d1
            }
Packit Service 21b5d1
            else
Packit Service 21b5d1
            {
Packit Service 21b5d1
                l+=1900;
Packit Service 21b5d1
            };
Packit Service 21b5d1
            os << l << ":";
Packit Service 21b5d1
            // month, day, hour, minutes
Packit Service 21b5d1
            os << numbers[2] << numbers[3] << ":" << numbers[4] << numbers[5] << " " << numbers[6] << numbers[7] << ":" << numbers[8] << numbers[9];
Packit Service 21b5d1
        }
Packit Service 21b5d1
        else
Packit Service 21b5d1
        {
Packit Service 21b5d1
            os << value;
Packit Service 21b5d1
        };
Packit Service 21b5d1
        return os;
Packit Service 21b5d1
    }
Packit Service 21b5d1
Packit Service 21b5d1
    std::ostream& Casio2MakerNote::print0x2022(std::ostream& os, const Value& value, const ExifData*)
Packit Service 21b5d1
    {
Packit Service 21b5d1
        std::ios::fmtflags f( os.flags() );
Packit Service 21b5d1
        if(value.toLong()>=0x20000000)
Packit Service 21b5d1
        {
Packit Service 21b5d1
            os << N_("Inf");
Packit Service 21b5d1
            os.flags(f);
Packit Service 21b5d1
            return os;
Packit Service 21b5d1
        };
Packit Service 21b5d1
        std::ostringstream oss;
Packit Service 21b5d1
        oss.copyfmt(os);
Packit Service 21b5d1
        os << std::fixed << std::setprecision(2) << value.toLong() / 1000.0 << _(" m");
Packit Service 21b5d1
        os.copyfmt(oss);
Packit Service 21b5d1
        os.flags(f);
Packit Service 21b5d1
        return os;
Packit Service 21b5d1
    }
Packit Service 21b5d1
Packit Service 21b5d1
}}                                      // namespace Internal, Exiv2