From 0b453608ed7a658ee7c6ad0cf8bb3fc322a1b666 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Fri, 14 Feb 2014 15:03:07 +0000 Subject: build path for prescaled file --- rotord/src/rotor.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'rotord/src') diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 027fba1..fd59c68 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -791,6 +791,17 @@ namespace Rotor { }; bool load(const string &filename,const int h=0){ Poco::Logger& logger = Poco::Logger::get(Log_name); + if (h>0&&h<721){ + Poco::Path path(filename); + std::string stub(path.getBaseName()); + std::string suffix(path.getExtension()); + std::string size=h>359?"/720.":h>179?"/360.":"/180."; + Poco::File file_to_use(stub+size+suffix); + if (file_to_use.exists()){ + cerr<<"using prescaled file: "<value< defer if (attributes["filename"]->value!="") { - isLoaded=load(media_path+attributes["filename"]->value); + isLoaded=load(media_path+attributes["filename"]->value,720); } }; -- cgit v1.2.3