Skip to content

Commit

Permalink
Fix images being a few pixels too wide due to "-shadow" option
Browse files Browse the repository at this point in the history
ImageMagick's -shadow option adds one pixel per tile.
  • Loading branch information
hackerb9 committed Aug 25, 2018
1 parent 4fd7b22 commit a0e1781
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lsix
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ autodetect() {
# Remove this hack once XTerm gets fixed. Last checked: XTerm(327)
if [[ $width -ge 1000 ]]; then width=1000; fi

# Space between tiles is about 0.5% of total screen width
tilexspace=$((width/200))
# Space on either side of each tile is less than 0.5% of total screen width
tilexspace=$((width/201))
tileyspace=$((tilexspace/2))
# Figure out how many tiles we can fit per row.
numtiles=$((width/(tilewidth + 2*tilexspace)))
# Figure out how many tiles we can fit per row. ("+ 1" is for -shadow).
numtiles=$((width/(tilewidth + 2*tilexspace + 1)))
}

main() {
Expand Down

0 comments on commit a0e1781

Please sign in to comment.