Changeset 128 in flair-src
- Timestamp:
- Jan 17, 2017, 4:57:10 PM (8 years ago)
- Location:
- trunk/lib/FlairSensorActuator/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/Camera.cpp
r125 r128 140 140 } 141 141 142 void Camera::SavePictureToFile(std::string filename) const { 143 string::size_type idx = filename.rfind('.'); 142 void Camera::SavePictureToFile(string filename) const { 143 if(filename=="") filename="./"+ObjectName()+"_"+std::to_string(GetTime())+".jpg"; 144 string::size_type idx = filename.rfind('.'); 144 145 145 if(idx != st d::string::npos) {146 if(idx != string::npos) { 146 147 Printf("saving %s\n", filename.c_str()); 147 st d::string extension = filename.substr(idx+1);148 string extension = filename.substr(idx+1); 148 149 149 150 output->GetMutex(); -
trunk/lib/FlairSensorActuator/src/Camera.h
r124 r128 101 101 * \brief Save picture to file 102 102 * 103 * \param filename filename 103 * \param filename filename; if ommitted, current time is used and file is saved in current directory with jpg compression 104 104 */ 105 void SavePictureToFile(std::string filename ) const;105 void SavePictureToFile(std::string filename="") const; 106 106 107 107 /*!
Note:
See TracChangeset
for help on using the changeset viewer.