inline void BlinkVideoDialog::DeleteFrames() { if( !m_parent->m_deleteVideoFrames ) return; m_framesDone.Remove( m_parent->m_frameExtension ); Console().WriteLn( "<end><cbr><br>* Blink: Deleting video frames:" ); while ( m_frameCount > 0 ) { String f = m_parent->m_frameOutputDir + '/' + m_parent->m_outputFileName + String().Format( "%05d", m_frameCount-- ) + m_parent->m_frameExtension; if ( File::Exists( f ) ) { try { Console().WriteLn( "<end><cbr><raw>" + f + "</raw>" ); File::Remove( f ); } catch(...) { Console().CriticalLn( "<end><cbr><raw>*** Couldn't delete file: " + f + "</raw>" ); throw CatchedException(); } } Module->ProcessEvents(); } }
bool FileDataCacheItem::Load( const IsoString& keyPrefix, int index ) { String s; if ( !Settings::Read( keyPrefix + IsoString().Format( "%08d", index+1 ), s ) ) return false; if ( s.IsEmpty() || !FromString( s ) ) throw CatchedException(); return true; }
//static bool GradientsBase::loadFile(const String& rsFilePath_p, std::size_t index_p, imageType_t &rImage_p) { // open read only FileFormat format( pcl::File::ExtractExtension( rsFilePath_p ), true, false ); FileFormatInstance file(format); ImageDescriptionArray images; if ( !file.Open( images, rsFilePath_p)) //, inputHints ) ) throw CatchedException(); if(images.Length()<=index_p) { //image with this index does not exist return false; } TimeMessage startLoad("Loading image "+rsFilePath_p+" "+String(index_p)); file.SelectImage(index_p); if (!file.ReadImage(rImage_p)) throw CatchedException(); return true; }