diff --git a/src/include/OpenImageIO/detail/fmt.h b/src/include/OpenImageIO/detail/fmt.h index de4edb0744..0f264a92ba 100644 --- a/src/include/OpenImageIO/detail/fmt.h +++ b/src/include/OpenImageIO/detail/fmt.h @@ -148,7 +148,7 @@ struct index_formatter : format_parser_with_separator { // fmtlib custom formatter that formats a type `T` as if it were an array // `Elem[Size]` (and it must be laid out that way in memory). The formatting // spec will apply to each element. For example, if the object has 3 float -// elements and the spec is "{.3f}", then the output might be "1.234 2.345 +// elements and the spec is "{:.3f}", then the output might be "1.234 2.345 // 3.456". // // In addition to the usual formatting spec, we also recognize the following diff --git a/src/oiiotool/printinfo.cpp b/src/oiiotool/printinfo.cpp index 7d956fd9b4..1be4d32ecb 100644 --- a/src/oiiotool/printinfo.cpp +++ b/src/oiiotool/printinfo.cpp @@ -356,7 +356,7 @@ print_info_subimage(std::ostream& out, Oiiotool& ot, int current_subimage, if (opt.sum) { imagesize_t imagebytes = spec.image_bytes(true); // totalsize += imagebytes; - lines[0] += format(" ({.2f} MB)", + lines[0] += format(" ({:.2f} MB)", (float)imagebytes / (1024.0 * 1024.0)); } std::string file_format_name;