mirror of
https://github.com/owntracks/recorder.git
synced 2026-08-27 16:57:21 +00:00
Default CARD images to 192x192
addresses https://github.com/owntracks/talk/issues/138
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
# Usage: image2card imagefile "full name"
|
||||
#
|
||||
# Requires `convert' from ImageMagick.
|
||||
# Read image, convert to PNG, forcing a 40x40 size and encode
|
||||
# Read image, convert to PNG, forcing a 192x192 size and encode
|
||||
# to BASE64. Create a JSON payload to be published to
|
||||
# owntracks/username/device/info
|
||||
#
|
||||
@@ -41,7 +41,7 @@ fullname="$2"
|
||||
base64switch=""
|
||||
base64check=$(echo "jj" | base64 -w 0 > /dev/null 2>&1)
|
||||
[ "$?" -eq "0" ] && base64switch="-w 0"
|
||||
imgdata=$(convert "${imagefile}" -resize '40x40!' - | base64 $base64switch)
|
||||
imgdata=$(convert "${imagefile}" -resize '192x192!' - | base64 $base64switch)
|
||||
|
||||
cat <<EndOfFile
|
||||
{"_type":"card","name":"${fullname}","face":"${imgdata}"}
|
||||
|
||||
Reference in New Issue
Block a user