#include "openjpeg_image.h"
#include "dcp_assert.h"
#include "compose.hpp"
+#include <openjpeg.h>
#include <asdcp/KM_util.h>
#include <asdcp/KM_fileio.h>
#include <asdcp/AS_DCP.h>
if (xmlSecCryptoInit() < 0) {
throw MiscError ("could not initialise xmlsec-crypto");
}
-}
-bool dcp::operator== (dcp::Size const & a, dcp::Size const & b)
-{
- return (a.width == b.width && a.height == b.height);
-}
-
-bool dcp::operator!= (dcp::Size const & a, dcp::Size const & b)
-{
- return !(a == b);
-}
-
-ostream& dcp::operator<< (ostream& s, dcp::Size const & a)
-{
- s << a.width << "x" << a.height;
- return s;
+ OpenSSL_add_all_algorithms();
}
/** Decode a base64 string. The base64 decode routine in KM_util.cpp
{
uintmax_t len = boost::filesystem::file_size (p);
if (len > max_length) {
- throw MiscError ("Unexpectedly long file");
+ throw MiscError (String::compose ("Unexpectedly long file (%1)", p.string()));
}
FILE* f = fopen_boost (p, "r");
DCP_ASSERT (raw.substr(0, 9) == "urn:uuid:");
return raw.substr (9);
}
+
+string
+dcp::openjpeg_version ()
+{
+ return opj_version ();
+}