Home  >  Q&A  >  body text

java - 上传头像并裁剪时 所上传的头像一定要先存储在磁盘上在裁剪吗

想做上传头像并裁剪,用java实现,请求中裁剪的坐标和宽度高度与图片一同发送 这样可以裁剪后在存储到磁盘吗 还是应该先存储到磁盘 然后读取并裁剪

迷茫迷茫2764 days ago523

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 11:28:07

    You can use flash to process it on the user side, and then flash sends the intercepted data stream to the server. You can take a look at discuz's uploaded avatar
    The other is to save it to the disk first and then process it on the disk. Most of them use the latter, because now the processing of each avatar is actually not as expensive as imagined

    reply
    0
  • Cancelreply