65 const auto& cHints =
cam->hints;
66 const auto& make =
cam->make.c_str();
67 const auto& model =
cam->model.c_str();
69 auto parseHint = [&cHints, &make, &model](
const std::string& name) {
70 if (!cHints.contains(name))
71 ThrowRDE(
"%s %s: couldn't find %s", make, model, name.c_str());
73 return cHints.get(name, 0U);
76 width = parseHint(
"full_width");
77 height = parseHint(
"full_height");
80 ThrowRDE(
"%s %s: image is of zero size?", make, model);
83 offset = cHints.get(
"offset", 0);
85 ThrowRDE(
"%s %s: no image data found", make, model);
89 ThrowRDE(
"%s %s: image bpp is invalid: %u", make, model,
bits);
91 auto order = cHints.get(
"order", std::string());
93 auto bo_ = getAsBitOrder(order);
95 ThrowRDE(
"%s %s: unknown order: %s", make, model, order.c_str());