Bug 39012 - patch to make -level1sep write gray instead of cmyk
Summary: patch to make -level1sep write gray instead of cmyk
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-06 12:27 UTC by William Bader
Modified: 2011-07-25 15:11 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to make -level1sep write gray instead of cmyk (2.43 KB, patch)
2011-07-06 12:27 UTC, William Bader
Details | Splinter Review

Description William Bader 2011-07-06 12:27:41 UTC
Created attachment 48834 [details] [review]
patch to make -level1sep write gray instead of cmyk

This patch makes pdftops -level1sep write gray instead of cmyk for gray images,
similar to the previous patches for-level2sep and -level3sep in Bug 37688 https://bugs.freedesktop.org/show_bug.cgi?id=37688
When pdftops -level1sep needs to write a bitmap, and the image is grayscale,
this patch makes the resulting ps file 1/4 of the size.
Comment 1 Albert Astals Cid 2011-07-06 13:07:47 UTC
Why 

@@ -506,7 +506,6 @@
   "         /pdfTextClipPath [] def } def",
   "~1ns",
   "% Level 1 image operators",
-  "~1n",
   "/pdfIm1 {",
   "  /pdfImBuf1 4 index string def",
   "  { currentfile pdfImBuf1 readhexstring pop } image",

?
Comment 2 William Bader 2011-07-06 14:09:14 UTC
>Why

Thanks for looking at the patches so quickly.

pdfIm1 and pdfIm1Bin used to be for level1 only.
With the patches, level1sep can now use it when it finds a gray bitmap, so pdfIm1 and pdfIm1Bin are needed for both level1 and level1sep.
Since the preceding line is already for ~1ns, I removed the ~1n instead of changing it to a redundant ~1ns.

William
Comment 3 Albert Astals Cid 2011-07-25 15:11:10 UTC
Patch is in


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.