diff options
Diffstat (limited to 'ranger/data/scope.sh')
-rwxr-xr-x | ranger/data/scope.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index 0c003399..9d9d9500 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -132,9 +132,10 @@ handle_image() { local mimetype="${1}" case "${mimetype}" in ## SVG - # image/svg+xml|image/svg) - # convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6 - # exit 1;; + image/svg+xml|image/svg) + rsvg-convert --keep-aspect-ratio --width "${DEFAULT_SIZE%x*}" "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}.png" \ + && mv "${IMAGE_CACHE_PATH}.png" "${IMAGE_CACHE_PATH}" \ + && exit 6 ## DjVu # image/vnd.djvu) |