diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-23 16:30:01 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-12-23 17:35:02 +0100 |
| commit | 52d807654169d6443909c1d5dd20a155801faa26 (patch) | |
| tree | 727774d21ea1f4b54ccd61a09127894cb8d572ef /src/j2k_transcode.cc | |
| parent | a6ccc587277b848b4a60c07456b11eb1b076d181 (diff) | |
Remove String::compose and use fmt instead.
Diffstat (limited to 'src/j2k_transcode.cc')
| -rw-r--r-- | src/j2k_transcode.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/j2k_transcode.cc b/src/j2k_transcode.cc index 664d18a3..4b30230d 100644 --- a/src/j2k_transcode.cc +++ b/src/j2k_transcode.cc @@ -42,8 +42,8 @@ #include "exceptions.h" #include "openjpeg_image.h" #include "dcp_assert.h" -#include "compose.hpp" #include <openjpeg.h> +#include <fmt/core.h> #include <cmath> #include <iostream> @@ -170,9 +170,9 @@ dcp::decompress_j2k (uint8_t const * data, int64_t size, int reduce) opj_destroy_codec (decoder); opj_stream_destroy (stream); if (format == OPJ_CODEC_J2K) { - boost::throw_exception (ReadError (String::compose ("could not decode JPEG2000 codestream of %1 bytes.", size))); + boost::throw_exception(ReadError(fmt::format("could not decode JPEG2000 codestream of {} bytes.", size))); } else { - boost::throw_exception (ReadError (String::compose ("could not decode JP2 file of %1 bytes.", size))); + boost::throw_exception(ReadError(fmt::format("could not decode JP2 file of {} bytes.", size))); } } @@ -280,7 +280,7 @@ dcp::compress_j2k (shared_ptr<const OpenJPEGImage> xyz, int bandwidth, int frame opj_setup_encoder (encoder, ¶meters, xyz->opj_image()); #ifndef LIBDCP_HAVE_NUMGBITS - string numgbits = String::compose("GUARD_BITS=%1", fourk ? 2 : 1); + string numgbits = fmt::format("GUARD_BITS={}", fourk ? 2 : 1); char const* extra_options[] = { numgbits.c_str(), nullptr }; opj_encoder_set_extra_options(encoder, extra_options); #endif |
