hscc

Soure code of <https://hugo.soucy.cc>.
git clone git://soucy.cc/hscc.git
Log | Files | Refs

image (2256B)


      1 #!/usr/bin/env sh
      2 # <https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/>
      3 
      4 #mogrify -path . -filter Triangle -define filter:support=2 -thumbnail 300 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB "$1"
      5 
      6 # mogrify -path /home/hs0ucy/Downloads -thumbnail "768>" -dither None -monochrome -posterize 136 -quality 82 -interlace none st-tmux-capture.png
      7 # mogrify -path /home/hs0ucy/Downloads -dither -posterize 136 -quality 82 -interlace none -resize "768>" hs0ucy-2018.png
      8 # mogrify -path /home/hs0ucy/Downloads -filter Triangle -define filter:support=2 -thumbnail "768>" -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB hs0ucy-2018.png
      9 
     10 
     11 
     12 # while read line
     13 # do
     14 #     mogrify -path . -filter Triangle -define filter:support=2 -thumbnail 300 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB "$line"
     15 # done < "${1:-/dev/stdin}"
     16 
     17 # mogrify -path "$3" -filter Triangle -define filter:support=2 -thumbnail "$2" -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB $1
     18 
     19 
     20 
     21 # Recette imagemagick qui me semble OK pour le dithering
     22 # convert source.png -quantize transparent -dither FloydSteinberg -depth 4 -colors 16 out.png
     23 
     24 # Avec en plus une d├ęsaturation
     25 # convert hs0ucy-2018.png -colorspace GRAY -quantize transparent -dither FloydSteinberg -depth 4 -colors 4 out.png
     26 
     27 # L'explication ici semble pas mal
     28 # <https://infoheap.com/imagemagick-convert-compress-image/>