st.scale = scale_to_fit(image, window);
st.fill_factor = (st.scale*image.width() * st.scale*image.height()) / (st.paper_w * st.paper_h);
- debug("Try: %dx%d on %.3f x %.3f => scale %.3f, fill %.6f",
- st.cols, st.rows,
- st.paper_w, st.paper_h,
- st.scale, st.fill_factor);
+ if (debug_level > 1)
+ debug("Try: %dx%d on %.3f x %.3f => scale %.3f, fill %.6f",
+ st.cols, st.rows,
+ st.paper_w, st.paper_h,
+ st.scale, st.fill_factor);
if (!found_solution || best.fill_factor < st.fill_factor)
{
if (!found_solution)
err("No feasible solution found");
- debug("Best: %dx%d on %.3f x %.3f", best.cols, best.rows, best.paper_w, best.paper_h);
+ debug("Best: %dx%d on %.3f x %.3f => scale %.3f, fill %.6f",
+ best.cols, best.rows,
+ best.paper_w, best.paper_h,
+ best.scale, best.fill_factor);
debug_indent -= 4;
}