This commit is contained in:
joe di castro committed 2013-08-07 18:57:19 +02:00
1 parent 455f6f5760
commit 7fb711c257
4 files changed
+22 -8

No files matched your search

+10 -5
View File
@@ -241,11 +241,16 @@ function! emmet#util#getImageSize(fn)
endfunction
function! emmet#util#imageSizeWithImageMagick(fn)
let img_info = system('identify -format "%wx%h" "'.a:fn.'"')
let img_size = split(substitute(img_info, '\n', '', ''), 'x')
let width = img_size[0]
let height = img_size[1]
return [width, height]
let fn = a:fn
if filereadable(fn)
let img_info = system('identify -format "%wx%h" "'.a:fn.'"')
let img_size = split(substitute(img_info, '\n', '', ''), 'x')
let width = img_size[0]
let height = img_size[1]
return [width, height]
else
echo 'The file "'.fn.'" does not exist or is not readable'
return [-1, -1]
endfunction
function! emmet#util#isImageMagickInstalled()