#!/bin/bashsize=$(echo "$1" | tr '.' '\n' | tail -n 2 | head -n 1)name=$(echo $1 | sed -e 's/\.[^.]*\.[^.]*$//')convert "$1" rgb:"$name.new"truncate "$name.new" --size=$sizels -l "$name" "$1" "$name.new"