In the imageto... filters with print-scaling=auto the image size was
not compared correctly with the page size to switch between
fit-to-page for large sizes and no scaling for small sizes. The image
size in pixels was compared with the page size in PostScript points
(1/72 inch).
This commit fixes the comparisons.
(manually backported from commit
df3b19756dc2c76a0b0cb2fd4ea45a397167af7f)
pw = ph;
ph = tmp;
}
- if(w>pw||h>ph) {
+ if (w * 72.0 / img->xppi > pw || h * 72.0 / img->yppi > ph)
document_large = 1;
- }
if((val = cupsGetOption("print-scaling",num_options,options)) != NULL) {
if(!strcasecmp(val,"auto")) {
pw = ph;
ph = tmp;
}
- if(w>pw||h>ph)
- {
+ if (w * 72.0 / img->xppi > pw || h * 72.0 / img->yppi > ph)
document_large = 1;
- }
if((val = cupsGetOption("print-scaling",num_options,options)) != NULL)
{