]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: Changed the default ppi from 128 to 200
authorRishabh Maheshwari <79650357+Rishabh-792@users.noreply.github.com>
Fri, 4 Feb 2022 13:13:00 +0000 (18:43 +0530)
committerGitHub <noreply@github.com>
Fri, 4 Feb 2022 13:13:00 +0000 (14:13 +0100)
This is for image input files which have no PPI resolution in their metadata and are printed without scaling ("print-scaling=none"). In this case the default resolution is used. Formerly it was set to 128 PPI but we change it to 200 PPI now as many shipping labels come as image files with 200 PPI and so it is easier to print them in their original size. For photos this default value is not important though, as photos are usually printed with scaling ("print-scaling=fill" or "print-scaling=fit").

Pull request #446

cupsfilters/image-bmp.c
cupsfilters/image-jpeg.c
cupsfilters/image-photocd.c
cupsfilters/image-png.c
cupsfilters/image-tiff.c
cupsfilters/image.c

index d9b4328a9b9e0dd389e48474866099e9e7393559..d131f613559604f21edf7df1212f25cf5575fea0 100644 (file)
@@ -142,7 +142,7 @@ _cupsImageReadBMP(
   {
     DEBUG_printf(("DEBUG: Bad BMP resolution %dx%d PPI.\n",
                  img->xppi, img->yppi));
-    img->xppi = img->yppi = 128;
+    img->xppi = img->yppi = 200;
   }
 
  /*
index 4a89f5b6e5c9322396b444ceda80c3b0837f2754..4317bc59ae8eaeb433b64ae90aab17dfd76b2619 100644 (file)
@@ -151,7 +151,7 @@ _cupsImageReadJPEG(
     {
       DEBUG_printf(("DEBUG: Bad JPEG image resolution %dx%d PPI.\n",
                    img->xppi, img->yppi));
-      img->xppi = img->yppi = 128;
+      img->xppi = img->yppi = 200;
     }
   }
 
index ae67969de44bdfd9344265152313e38e911c39d0..3dab0a4f146903131b94a965220a51792c64c2ef 100644 (file)
@@ -77,8 +77,8 @@ _cupsImageReadPhotoCD(
   */
 
   img->colorspace = (primary == CUPS_IMAGE_RGB_CMYK) ? CUPS_IMAGE_RGB : primary;
-  img->xppi       = 128;
-  img->yppi       = 128;
+  img->xppi       = 200;
+  img->yppi       = 200;
 
   if (rotation)
   {
index c842f051f484076d1e94a0d5486a8e2c827a3b4e..9e3e3fa535d725b4682dc35af0833c7236d0b09f 100644 (file)
@@ -126,7 +126,7 @@ _cupsImageReadPNG(
       DEBUG_printf(("DEBUG: PNG image has invalid resolution %dx%d PPI\n",
                    img->xppi, img->yppi));
 
-      img->xppi = img->yppi = 128;
+      img->xppi = img->yppi = 200;
     }
   }
 
index df098ca4cd62c7035eb9fa685788d57258358349..0b274f0a6495479c1bdcad1b5774f47760a42ab7 100644 (file)
@@ -156,8 +156,8 @@ _cupsImageReadTIFF(
     }
     else
     {
-      img->xppi = 128;
-      img->yppi = 128;
+      img->xppi = 200;
+      img->yppi = 200;
     }
 
     if (img->xppi == 0 || img->yppi == 0)
index 97ddc4970fec32fa53fd6c11d5290eff0c5a8cc2..5b47d761e8a5afc383d433f524c3fc272591c7be 100644 (file)
@@ -371,8 +371,8 @@ cupsImageOpenFP(
 
   img->cachefile = -1;
   img->max_ics   = CUPS_TILE_MINIMUM;
-  img->xppi      = 128;
-  img->yppi      = 128;
+  img->xppi      = 200;
+  img->yppi      = 200;
 
   if (!memcmp(header, "GIF87a", 6) || !memcmp(header, "GIF89a", 6))
     status = _cupsImageReadGIF(img, fp, primary, secondary, saturation, hue,