Backed out changeset: 159f9e7014f8
This commit is contained in:
@@ -131,37 +131,37 @@ class NAAFInfoInterpreter : public Interpreter {
|
||||
|
||||
std::ostringstream af;
|
||||
if (aff&1)
|
||||
if (af.str().empty()) af << "Center";
|
||||
if (af.str()=="") af << "Center";
|
||||
else af << ", Center";
|
||||
else if (aff&2)
|
||||
if (af.str().empty()) af << "Top";
|
||||
if (af.str()=="") af << "Top";
|
||||
else af << ", Top";
|
||||
else if (aff&4)
|
||||
if (af.str().empty()) af << "Bottom";
|
||||
if (af.str()=="") af << "Bottom";
|
||||
else af << ", Bottom";
|
||||
else if (aff&8)
|
||||
if (af.str().empty()) af << "Left";
|
||||
if (af.str()=="") af << "Left";
|
||||
else af << ", Left";
|
||||
else if (aff&16)
|
||||
if (af.str().empty()) af << "Right";
|
||||
if (af.str()=="") af << "Right";
|
||||
else af << ", Right";
|
||||
else if (aff&32)
|
||||
if (af.str().empty()) af << "Upper-left";
|
||||
if (af.str()=="") af << "Upper-left";
|
||||
else af << ", Upper-left";
|
||||
else if (aff&64)
|
||||
if (af.str().empty()) af << "Upper-right";
|
||||
if (af.str()=="") af << "Upper-right";
|
||||
else af << ", Upper-right";
|
||||
else if (aff&128)
|
||||
if (af.str().empty()) af << " Lower-left";
|
||||
if (af.str()=="") af << " Lower-left";
|
||||
else af << ", Lower-left";
|
||||
else if (aff&256)
|
||||
if (af.str().empty()) af << "Lower-right";
|
||||
if (af.str()=="") af << "Lower-right";
|
||||
else af << ", Lower-right";
|
||||
else if (aff&512)
|
||||
if (af.str().empty()) af << "Far Left";
|
||||
if (af.str()=="") af << "Far Left";
|
||||
else af << ", Far Left";
|
||||
else if (aff&1024) {
|
||||
if (af.str().empty()) af << "Far Right";
|
||||
if (af.str()=="") af << "Far Right";
|
||||
else af << ", Far Right";
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ class NALensDataInterpreter : public Interpreter {
|
||||
lid << std::setw(2) << std::setfill('0') << (int)buffer[lidoffs+i] << ' ';
|
||||
lid << std::setw(2) << std::setfill('0') << lenstype;
|
||||
|
||||
std::map<std::string,std::string>::const_iterator r = lenses.find (lid.str());
|
||||
std::map<std::string,std::string>::iterator r = lenses.find (lid.str());
|
||||
if (r!=lenses.end())
|
||||
ld << "Lens = " << r->second;
|
||||
else
|
||||
|
||||
@@ -134,7 +134,7 @@ class OLLensTypeInterpreter : public Interpreter {
|
||||
lid << std::setw(2) << std::setfill('0') << t->toInt(2)<< ' '; //model
|
||||
lid << std::setw(2) << std::setfill('0') << t->toInt(3); // submodel
|
||||
|
||||
std::map<std::string,std::string>::const_iterator r = lenses.find (lid.str());
|
||||
std::map<std::string,std::string>::iterator r = lenses.find (lid.str());
|
||||
if (r!=lenses.end())
|
||||
return r->second;
|
||||
else
|
||||
|
||||
@@ -382,7 +382,7 @@ public:
|
||||
}
|
||||
virtual std::string toString (Tag* t) {
|
||||
int c = 256*t->toInt(0,BYTE) + t->toInt(1,BYTE);
|
||||
std::map<int,std::string>::const_iterator r = choices.find (c);
|
||||
std::map<int,std::string>::iterator r = choices.find (c);
|
||||
if (r!=choices.end()){
|
||||
std::ostringstream s;
|
||||
s << r->second;
|
||||
@@ -423,10 +423,10 @@ public:
|
||||
choices3[255] = "Video";
|
||||
}
|
||||
virtual std::string toString (Tag* t) {
|
||||
std::map<int,std::string>::const_iterator r = choices.find (t->toInt(0,BYTE));
|
||||
std::map<int,std::string>::const_iterator r1 = choices1.find (t->toInt(1,BYTE));
|
||||
std::map<int,std::string>::const_iterator r2 = choices2.find (t->toInt(2,BYTE));
|
||||
std::map<int,std::string>::const_iterator r3 = choices3.find (t->toInt(3,BYTE));
|
||||
std::map<int,std::string>::iterator r = choices.find (t->toInt(0,BYTE));
|
||||
std::map<int,std::string>::iterator r1 = choices1.find (t->toInt(1,BYTE));
|
||||
std::map<int,std::string>::iterator r2 = choices2.find (t->toInt(2,BYTE));
|
||||
std::map<int,std::string>::iterator r3 = choices3.find (t->toInt(3,BYTE));
|
||||
std::ostringstream s;
|
||||
s << ((r !=choices.end())? r->second : "");
|
||||
s << ((r1!=choices1.end())? r1->second : "")<<" ";
|
||||
@@ -888,7 +888,7 @@ public:
|
||||
choices[0xa] = "Trailing-curtain Sync";
|
||||
}
|
||||
virtual std::string toString (Tag* t) {
|
||||
std::map<int,std::string>::const_iterator r = choices.find (t->toInt(0,BYTE) >>4);
|
||||
std::map<int,std::string>::iterator r = choices.find (t->toInt(0,BYTE) >>4);
|
||||
if (r!=choices.end())
|
||||
return r->second;
|
||||
else {
|
||||
|
||||
@@ -110,7 +110,7 @@ TagDirectory* TagDirectory::getRoot()
|
||||
else return this;
|
||||
}
|
||||
|
||||
const TagAttrib* TagDirectory::getAttrib (int id) const {
|
||||
const TagAttrib* TagDirectory::getAttrib (int id) {
|
||||
|
||||
if (attribs)
|
||||
for (int i=0; attribs[i].ignore!=-1; i++)
|
||||
@@ -1428,7 +1428,7 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro
|
||||
else
|
||||
cl = new TagDirectory (NULL, ifdAttribs, INTEL);
|
||||
|
||||
for (rtengine::procparams::ExifPairs::const_iterator i=changeList.begin(); i!=changeList.end(); ++i)
|
||||
for (rtengine::procparams::ExifPairs::const_iterator i=changeList.begin(); i!=changeList.end(); i++)
|
||||
cl->applyChange (i->first, i->second);
|
||||
|
||||
getDefaultTIFFTags (cl);
|
||||
@@ -1437,7 +1437,7 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro
|
||||
defTags[1]->setInt (H, 0, LONG);
|
||||
defTags[8]->setInt (8, 0, SHORT);
|
||||
|
||||
for (size_t i=defTags.size()-1; i>0; i--)
|
||||
for (int i=defTags.size()-1; i>=0; i--)
|
||||
cl->replaceTag (defTags[i]->clone (cl));
|
||||
cl->sort ();
|
||||
int size = cl->write (8, buffer+6);
|
||||
@@ -1493,7 +1493,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro
|
||||
}
|
||||
|
||||
// apply list of changes
|
||||
for (rtengine::procparams::ExifPairs::const_iterator i=changeList.begin(); i!=changeList.end(); ++i)
|
||||
for (rtengine::procparams::ExifPairs::const_iterator i=changeList.begin(); i!=changeList.end(); i++)
|
||||
cl->applyChange (i->first, i->second);
|
||||
|
||||
// append default properties
|
||||
@@ -1504,7 +1504,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro
|
||||
defTags[8]->initInt(0, SHORT, 3);
|
||||
for (int i=0;i<3;i++) defTags[8]->setInt(bps, i*2, SHORT);
|
||||
|
||||
for (size_t i=defTags.size()-1; i>0; i--)
|
||||
for (int i=defTags.size()-1; i>=0; i--)
|
||||
cl->replaceTag (defTags[i]->clone (cl));
|
||||
|
||||
// calculate strip offsets
|
||||
|
||||
@@ -77,9 +77,9 @@ class TagDirectory {
|
||||
TagDirectory* getParent () { return parent; }
|
||||
TagDirectory* getRoot ();
|
||||
inline int getCount () const { return tags.size (); }
|
||||
const TagAttrib* getAttrib (int id) const;
|
||||
const TagAttrib* getAttrib (int id);
|
||||
const TagAttrib* getAttrib (const char* name);
|
||||
const TagAttrib* getAttribTable() const { return attribs; }
|
||||
const TagAttrib* getAttribTable() { return attribs; }
|
||||
virtual Tag* getTag (const char* name) const;
|
||||
virtual Tag* getTag (int ID) const;
|
||||
virtual Tag* findTag (const char* name) const;
|
||||
@@ -181,14 +181,14 @@ class Tag {
|
||||
Tag* clone (TagDirectory* parent);
|
||||
|
||||
// to control if the tag shall be written
|
||||
bool getKeep () const { return keep; }
|
||||
bool getKeep () { return keep; }
|
||||
void setKeep (bool k) { keep = k; }
|
||||
|
||||
// get subdirectory (there can be several, the last is NULL)
|
||||
bool isDirectory () const { return directory!=NULL; }
|
||||
bool isDirectory () { return directory!=NULL; }
|
||||
TagDirectory* getDirectory (int i=0) { return directory[i]; }
|
||||
|
||||
MNKind getMakerNoteFormat () const { return makerNoteKind; }
|
||||
MNKind getMakerNoteFormat () { return makerNoteKind; }
|
||||
};
|
||||
|
||||
class ExifManager {
|
||||
|
||||
Reference in New Issue
Block a user