Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/image/getImgSize

Index

Functions

Functions

default

  • default(src: string): Promise<{ height: number; width: number }>
  • 获取图片的长与宽

    utilsLibrary.getImgSize('//media-oss.61info.cn/homework_review/teacher_comment/image/cfd43d53-eb85-4e60-806e-a4ff27bb60b9.png')
    // {width: 519, height: 396}
    

    Parameters

    • src: string

      url链接

    Returns Promise<{ height: number; width: number }>

Generated using TypeDoc