#ifdef DCPOMATIC_WINDOWS
#include "stack.hpp"
#endif
-#ifdef DCPOMATIC_OSX
-#include <ltdl.h>
-#endif
#include "i18n.h"
*/
boost::filesystem::path lib = app_contents ();
lib /= "lib";
- lt_dladdsearchdir (lib.c_str ());
+ setenv ("LTDL_LIBRARY_PATH", lib.c_str (), 1);
#endif
libdcp::init ();
return shared_ptr<const libdcp::Signer> (new libdcp::Signer (chain, signer_key));
}
+libdcp::Size
+fit_ratio_within (float ratio, libdcp::Size full_frame)
+{
+ if (ratio < full_frame.ratio ()) {
+ return libdcp::Size (full_frame.height * ratio, full_frame.height);
+ }
+
+ return libdcp::Size (full_frame.width, full_frame.width / ratio);
+}