Browse Source

add legendary resampling script, now in a place where I can find it

master
rra 1 month ago
parent
commit
843c749d35
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      resample.sh

+ 18
- 0
resample.sh View 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…
Cancel
Save