]> 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)
committerTill Kamppeter <till.kamppeter@gmail.com>
Tue, 15 Feb 2022 00:19:16 +0000 (21:19 -0300)
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

(cherry picked from commit 70970df3c78a0a690d3f99597a3a5eec0bce8c02)

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

index 4a90cd5f154658f1b983da83343ea641cd808650..c726278fa7e67e755031f015360adb582926408c 100644 (file)
@@ -138,7 +138,7 @@ _cupsImageReadBMP(
   {
     fprintf(stderr, "DEBUG: Bad BMP resolution %dx%d PPI.\n",
             img->xppi, img->yppi);
-    img->xppi = img->yppi = 128;
+    img->xppi = img->yppi = 200;
   }
 
  /*
index 81d9a9d5d1791fd9c430fc1220a13fbcdd2c83d3..caa13b2bad4d1297a5a6c3f501ec2d10d0224dc7 100644 (file)
@@ -151,7 +151,7 @@ _cupsImageReadJPEG(
     {
       fprintf(stderr, "DEBUG: Bad JPEG image resolution %dx%d PPI.\n",
               img->xppi, img->yppi);
-      img->xppi = img->yppi = 128;
+      img->xppi = img->yppi = 200;
     }
   }
 
index 9c1bb440f4d4a07aa166679bd61f93501d340e95..073046ec273246dd229e1987c55f086d4382333d 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 0c5255ece1436ffaac9f2274511185b84c12d938..9eb5618188a05b185b49aec93c60c170e1abe90f 100644 (file)
@@ -126,7 +126,7 @@ _cupsImageReadPNG(
       fprintf(stderr, "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 4fd875663ac99ac5937186207d468f22ec985828..b41a87be7b1a37754061f9768a538f348f9af227 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 ac96541be9c959c8103874b675a2ba4d8f7d7ee0..e97dafd78e4bdd9d34b646fd9ee2e15d54955235 100644 (file)
@@ -347,8 +347,8 @@ cupsImageOpen(
 
   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,