Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
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: | ||
</ | </ | ||
[[https:// | [[https:// | ||
+ | |||
+ | === 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}, | ||
+ | \( 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 | ||
+ | </ | ||
+ | [[https:// | ||
=== Unix timestamp to human readable time === | === Unix timestamp to human readable time === |