mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-07 11:14:26 +08:00
identity can treat URL
This commit is contained in:
@@ -242,15 +242,12 @@ endfunction
|
|||||||
|
|
||||||
function! emmet#util#imageSizeWithImageMagick(fn)
|
function! emmet#util#imageSizeWithImageMagick(fn)
|
||||||
let fn = a:fn
|
let fn = a:fn
|
||||||
if filereadable(fn)
|
let img_info = system('identify -format "%wx%h" "'.a:fn.'"')
|
||||||
let img_info = system('identify -format "%wx%h" "'.a:fn.'"')
|
let img_size = split(substitute(img_info, '\n', '', ''), 'x')
|
||||||
let img_size = split(substitute(img_info, '\n', '', ''), 'x')
|
if len(img_size) != 2
|
||||||
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]
|
return [-1, -1]
|
||||||
|
endif
|
||||||
|
return img_size
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! emmet#util#isImageMagickInstalled()
|
function! emmet#util#isImageMagickInstalled()
|
||||||
|
|||||||
Reference in New Issue
Block a user