Benutzer-Werkzeuge

Webseiten-Werkzeuge


commands-general-tools

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
commands-general-tools [2020/05/12 01:49]
alex [File Stuff] view contents of ZIP or TAR files without complete extracting
commands-general-tools [2020/07/11 11:22] (aktuell)
alex [Conversion Stuff] add rounded corners to an image (for app icon with rounded corners in the style of iPhone‘s SpringBoard)
Zeile 275: Zeile 275:
 </code> </code>
 [[https://www.freebsd.org/cgi/man.cgi?query=exiftool&sektion=1|exiftool(1)]] [[https://www.freebsd.org/cgi/man.cgi?query=mogrify&sektion=1|mogrify(1)]] [[https://www.freebsd.org/cgi/man.cgi?query=ImageMagick&sektion=1|ImageMagick(1)]] [[https://www.freebsd.org/cgi/man.cgi?query=exiftool&sektion=1|exiftool(1)]] [[https://www.freebsd.org/cgi/man.cgi?query=mogrify&sektion=1|mogrify(1)]] [[https://www.freebsd.org/cgi/man.cgi?query=ImageMagick&sektion=1|ImageMagick(1)]]
 +
 +=== add rounded corners to an image (for app icon with rounded corners in the style of iPhone‘s SpringBoard) ===
 +<code bash>
 +### Adjust the corner radius (in pixel) to your needs.
 +### For a 1024x1024 image a value of 128 looks good.
 +RADIUS=128
 +
 +### The whole ImageMagick command is quite complex. The resulting rounded image is written to a new file. 
 +### The cascade of parenthesized options defines the operations to cut out the transparent arcs in the corners.
 +convert AppIconRaw.png \( +clone -alpha extract \
 +  \( -size ${RADIUS}x${RADIUS} xc:black -draw "fill white circle ${RADIUS},${RADIUS} ${RADIUS},0" -write mpr:arc +delete \) \
 +  \( mpr:arc \) -gravity northwest -composite \
 +  \( mpr:arc -flip \) -gravity southwest -composite \
 +  \( mpr:arc -flop \) -gravity northeast -composite \
 +  \( mpr:arc -rotate 180 \) -gravity southeast -composite \) \
 +  -alpha off -compose CopyOpacity -composite AppIconRounded.png
 +</code>
 +[[https://www.freebsd.org/cgi/man.cgi?query=convert&sektion=1|convert(1)]] [[https://www.freebsd.org/cgi/man.cgi?query=ImageMagick&sektion=1|ImageMagick(1)]] [[https://imagemagick.org/script/command-line-processing.php|ImageMagick - Command-line Processing]] [[http://www.imagemagick.org/script/command-line-options.php|ImageMagick - Command-line Options]]
  
 === Unix timestamp to human readable time === === Unix timestamp to human readable time ===
commands-general-tools.txt · Zuletzt geändert: 2020/07/11 11:22 von alex