summaryrefslogtreecommitdiffstats
path: root/make-widescreen.sh
blob: 1f4b502cf3eadfcf4e81ce0be49b7d5b2dee6d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#----------------------------------------------------
# Version:    0.1.1
# Author:       Florian "Bluewind" Pritz <flo@xssn.at>
#
# Licensed under WTFPL v2
# (see COPYING for full license text)
#
#----------------------------------------------------
# double image and make 2 combos
#----------------------------------------------------

for i in "$@"; do
  orig_x="$(identify -format "%W" "$i")"
  orig_y="$(identify -format "%H" "$i")"
  convert "${i}" -flop -size $((${orig_x}*2))x${orig_y} \
    xc:black +swap -gravity West -composite \
    "${i}" -geometry +${orig_x}+0 -composite \
    "$(echo ${i} | sed -r "s/(.*)(\.|$)(.*)/\1_combo-1\2\3/")"
  convert "${i}" -flop -size $((${orig_x}*2))x${orig_y} -geometry +${orig_x}+0 \
    xc:black +swap -gravity West -composite \
    "${i}" -geometry +0+0 -composite \
    "$(echo ${i} | sed -r "s/(.*)(\.|$)(.*)/\1_combo-2\2\3/")"
done