Leaf
USAGE: leaf [mode] [-options] directory
Modes:
autocrop crop using row/column brightness method
-levels=<params> levels adjustment for resulting image (ex. "0-253,0-2,0-255")
-trim=<t,r,l,b> pixels to trim from top, right, left, bottom
build combine images into a pdf with img2pdf
clean remove scratch files
crop define EXIF crop values using template files
-crops=<num> (6) specify how many files to use
desort remove image sequence prefix
deskew detect rotation angles
-max=<num> (.4) angles greater than this value are ignored
-pad=<num> (80) pixels to pad around crop area
-contrast=<num> (20) levels attenuation
-size=<num> (2200) dmap size in pixels
-nomap don't use dmaps
depaper divide page with itself using mask (better despine)
-mask=<file> mask file for spine-left image
-mpush=<levels> levels for divide map (ex. "0-253,0-2,0-255")
-mix=<0-100> (null) percentage mix with original (90% = mostly og)
-skip=<label> (null) skip files with this label
despine remove shadow from spine
-levels=<params> levels for overlay (ex. "0-253,0-2,0-255")
-width=<pixels> (300) spine width in pixels
-q=<0-100> (auto) jpeg quality, default read from source or 95
divide wrapper for imagemagick Divide_Src
-map=<file> specify brightness file
-mpush=<levels> levels for map (ex. "0-253,0-2,0-255") or "auto"
-blur=<pixels> apply in-place blur to map (slow/dumb)
-levels=<params> levels adjustment for resulting image (ex. "0-253,0-2,0-255")
-q=<quality> (95) quality out of 100
-pages map file is for LR rotated pages
-mix=<0-100> percentage mix with original (90% = mostly og)
dupes Find duplicate images using computed PHASH on thumbnails
-threshold=<num> (10) match threshold
-walk=<num> (5) comparison scope (compare n image to n, n+1, n+2, etc)
fixpdf de-rotate all pages in a pdf
-file=<pdf> pdf file in target dir
generate create final jpg images for pdf creation
-pixels=<num> scale to x pixels on longest side
-inches=<num> set dpi to x inches on longest side
-q=<0-100> (90) jpeg quality
-levels=<params> photoshop levels adjustment (ex. "0-253,0-2,0-255")
-px=<num> png size multiplier
-plevels=<params> png levels adjustment (otherwise calculated from adjust)
-pt=<0-255> use threshold method with photoshop level value
-pc=<2,2!,3> (2) colors for final png (2! = intermediary dithering)
-unsharp=<params> photoshop unsharp parameters (ex. "100,1,0")
-skipc skip color images
-skipg skip grayscale images
-skipb skip bitmap images
match move files and set crop values to match source dir
-source=<dir> read FROM dir
profile apply xmp profile to images (requires exiv2 > 0.25)
-file=<file> xmp profile
resort reorder image sequence by adding a new image
-file=<file> file to insert
-x=<num> position of inserted file
review print a table of image dimension statistics
rotate batch transform rotate (lossy)
-x=<angle> (90) rotation angle
-q=<0-100> (auto) jpeg quality, default read from source or 95
setdpi set image dpi with exiftool
-x=<dpi> specify dpi
-height=<inches> calculate dpi from specified height
sort sort files as AAABBB -> ABABAB
-m=<num> (auto) specify midpoint (cover image)
-prerotated images are already rotated
strip strip exif crop values from images with exiftool
#Typical Usage
digicam images are sorted into Left-Right page spreads
leaf sort -prerotated canon/
images are analized to determine rotation angle
leaf deskew -contrast=50 canon/
images are selected as "crop templates"
leaf crop -crops=4 canon/
intermediate images are generated from crop/skew/format tags
leaf generate -pixels=1800 -inches=8.5 -q=90 -levels=10,1,225 -px=2 canon/
intermediate images are assembled into a PDF
leaf build canon_generated/
#Dependencies
Description
Leaf assists in producing high-quality PDF files from scans of bound printed matter
https://www.profiteroles.org/leaf/
Readme
804 KiB
Languages
PHP
100%