Qiniu Cloud processes image compression, cropping, reduction, etc.

Official documentation The
documentation is relatively serious, it is recommended to look here first

  <img  :src="form.courseBanner+'?imageView2/2/w/400'" @click="showUploadDialog">

This is the code for an enterprise-level application. imageView2 is the field name of Qiniu Cloud (it can be understood this way). The 2 behind imageView2/2 refers to mode 2, and the official provides six modes 0-5.

The format is:模式数/w/参数一/h/参数二

  • 0 mode: The first parameter is that the long side is up to xxx, and the second parameter is that the short side is up to yyy. Perform proportional scaling without cropping. If you do not write /h/ parameter 2, it means that the short side is adaptive, and /w is the same.移动端用的比较多
  • 1 Mode: ~~~ Talk more about fearlessness without memorizing, just look at the document when you use it.
  • Mode 2 is used the most; the first parameter is that the width is up to xxx, and the proportional scaling is not cropped.pc运用的特别多
  • 4 modes: can be made into the size of your ideal mobile phone wallpaper (covered)

Other applications

  • Qiniu Cloud can also do some face comparisons. After you extract the face from your picture and compare it with the Curry picture, return the information
  • There are also audio, watermarks, and various. It's good to know that there is.

Guess you like

Origin blog.csdn.net/weixin_45629623/article/details/109598718