diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 943f2b8..a2e563f 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 15ea79f..b177c23 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -3806,14 +3806,13 @@ The \texttt{-dump-attachments} operation, when given a PDF file and a directory \noindent\small\verb!cpdf -process-images [-process-images-info] in.pdf []!\\ \noindent\small\verb! [-im ] [-jbig2enc ]!\\ \noindent\small\verb! [-lossless-resample[-dpi] | -lossless-to-jpeg ]!\\ -\noindent\small\verb! [-jpeg-to-jpeg ] [-1bpp-method ]!\\ -\noindent\small\verb! [-jbig2-lossy-threshold ]!\\ -\noindent\small\verb! [-pixel-threshold ] [-length-threshold ]!\\ -\noindent\small\verb! [-percentage-threshold ] [-dpi-threshold ]!\\ -\noindent\small\verb! [-resample-interpolate]!\\ +\noindent\small\verb! [-jpeg-to-jpeg ] [-jpeg-to-jpeg-scale ]!\\ +\noindent\small\verb! [-jpeg-to-jpeg-dpi ] [-1bpp-method ]!\\ +\noindent\small\verb! [-jbig2-lossy-threshold ] [-pixel-threshold ]!\\ +\noindent\small\verb! [-length-threshold ] [-percentage-threshold ]!\\ +\noindent\small\verb! [-dpi-threshold ] [-resample-interpolate]!\\ \noindent\small\verb! -o out.pdf! - \end{framed} \section{Extracting images} @@ -3985,14 +3984,27 @@ Option & Effect & Default value\\\hline \noindent\small\verb!cpdf -process-images -im magick -lossless-resample 80 in.pdf -o out.pdf! \end{framed} -%FIXME check what 80 means here -\noindent This will resample losslessly-compressed images to contain 80 percent of the original pixels. By default, there will be no interpolation. To use interpolation, which may result in slightly larger data, add \texttt{-resample-interpolate}. To use a DPI target instead, use \texttt{-lossless-resample-dpi} instead: +\noindent This will resample losslessly-compressed images to be 80 percent of the original width and height. By default, there will be no interpolation. To use interpolation, which may result in slightly larger data, add \texttt{-resample-interpolate}. To use a DPI target instead, use \texttt{-lossless-resample-dpi} instead: \begin{framed} \noindent\small\verb!cpdf -process-images -im magick -lossless-resample-dpi 300!\\ \noindent\small\verb! in.pdf -o out.pdf! \end{framed} +\noindent We can also use resampling with \texttt{-jpeg-to-jpeg}, buy specifying \texttt{-jpeg-to-jpeg-scale}: + + \begin{framed} + \noindent\small\verb!cpdf -process-images -im magick -jpeg-to-jpeg 70 -jpeg-to-jpeg-scale 50!\\ + \noindent\small\verb! in.pdf -o out.pdf! + \end{framed} + +\noindent We can alternatively use a DPI target: + + \begin{framed} + \noindent\small\verb!cpdf -process-images -im magick -jpeg-to-jpeg 70 -jpeg-to-jpeg-dpi 150!\\ + \noindent\small\verb! in.pdf -o out.pdf! + \end{framed} + \noindent The methods so far introduced do not operate on 1 bit per pixel data. Different compression mechanisms are typically in use, and we need a different approach. The \texttt{-1bpp-method} option specifies what to do with losslessly compressed 1 bit-per-pixel images. \bigskip