adding resample to the toolbox
This commit is contained in:
parent
88182d16ed
commit
cf80180f2d
@ -34,6 +34,18 @@ Usage:
|
|||||||
|
|
||||||
Link: <http://osp.kitchen/tools/pdfutils/>
|
Link: <http://osp.kitchen/tools/pdfutils/>
|
||||||
|
|
||||||
|
## OSP-tools: `resample.sh`
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
|
||||||
|
- `gs` (Ghostscript)
|
||||||
|
|
||||||
|
This will change the resolution of a PDF.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
./resample input.pdf 150
|
||||||
|
|
||||||
## Custom VR tools: `make-images-bw.sh`
|
## Custom VR tools: `make-images-bw.sh`
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
|
18
command-line/tools/resample.sh
Executable file
18
command-line/tools/resample.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
pdffile=$1;
|
||||||
|
dpi=$2
|
||||||
|
|
||||||
|
gs \
|
||||||
|
-o "${pdffile%.pdf}-resampled.pdf" \
|
||||||
|
-sDEVICE=pdfwrite \
|
||||||
|
-dDownsampleColorImages=true \
|
||||||
|
-dDownsampleGrayImages=true \
|
||||||
|
-dDownsampleMonoImages=true \
|
||||||
|
-dColorImageResolution=$dpi \
|
||||||
|
-dGrayImageResolution=$dpi \
|
||||||
|
-dMonoImageResolution=$dpi \
|
||||||
|
-dColorImageDownsampleThreshold=1.0 \
|
||||||
|
-dGrayImageDownsampleThreshold=1.0 \
|
||||||
|
-dMonoImageDownsampleThreshold=1.0 \
|
||||||
|
"${pdffile}"
|
Loading…
Reference in New Issue
Block a user