Ignore:
Timestamp:
01/17/17 16:57:10 (6 years ago)
Author:
Sanahuja Guillaume
Message:

save image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/Camera.cpp

    r125 r128  
    140140}
    141141
    142 void Camera::SavePictureToFile(std::string filename) const {
    143         string::size_type idx = filename.rfind('.');
     142void Camera::SavePictureToFile(string filename) const {
     143        if(filename=="") filename="./"+ObjectName()+"_"+std::to_string(GetTime())+".jpg";
     144    string::size_type idx = filename.rfind('.');
    144145
    145         if(idx != std::string::npos) {
     146        if(idx != string::npos) {
    146147                Printf("saving %s\n", filename.c_str());
    147                 std::string extension = filename.substr(idx+1);
     148                string extension = filename.substr(idx+1);
    148149               
    149150                output->GetMutex();
Note: See TracChangeset for help on using the changeset viewer.