identity can treat URL

This commit is contained in:
mattn
2013-08-12 22:38:05 +09:00
parent 2a5684bac4
commit f1cbe2545f

View File

@@ -242,15 +242,12 @@ endfunction
function! emmet#util#imageSizeWithImageMagick(fn)
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'
if len(img_size) != 2
return [-1, -1]
endif
return img_size
endfunction
function! emmet#util#isImageMagickInstalled()