Definition at line 336 of file AppControlSrc.h. References Impala::Core::Stream::RgbDataSrc::DataPtr(), Impala::FileNameTail(), Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameNr(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), Impala::Core::Stream::RgbDataSrc::GetName(), ILOG_ERROR, Impala::MakeString(), mSrc, and Impala::Core::Array::WritePng(). Referenced by KeyEvent(). 00337 { 00338 const int frameNr = mSrc->FrameNr(); 00339 if (!mSrc || frameNr < 0) 00340 { 00341 ILOG_ERROR("No valid source or no current frame set (" << mSrc << 00342 ", " << frameNr << ")"); 00343 return false; 00344 } 00345 00346 Core::Array::Array2dVec3UInt8* im = 00347 Core::Array::ArrayCreate<Core::Array::Array2dVec3UInt8> 00348 (mSrc->FrameWidth(), mSrc->FrameHeight(), 0, 0, mSrc->DataPtr(), true); 00349 if (!im) 00350 { 00351 ILOG_ERROR("Couldn't load image for frame nr " << frameNr); 00352 return false; 00353 } 00354 00355 String fileName = FileNameTail(mSrc->GetName()); 00356 fileName += "_frame" + MakeString(frameNr) + ".png"; 00357 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00358 Core::Array::WritePng(im, fileName, new Util::Database()); 00359 #else // REPOSITORY_USED 00360 Persistency::ImageLocator loc("file:", ".", "", fileName); 00361 Persistency::ImageRepository().Add(loc, im); 00362 #endif // REPOSITORY_USED 00363 delete im; 00364 return true; 00365 }
Here is the call graph for this function:
|