我可以將MultipartFile庫 ( org.springframework.web.multipart.MultipartFile) 轉換為 aBufferedImage而無需先將其保存到本地磁盤嗎?如果是,請告訴我該怎么做
我以前保存到磁盤然后從那里得到一個 BufferedImage,但現在我需要在不保存的情況下進行
uj5u.com熱心網友回復:
您是否嘗試過以下操作?
BufferedImage image = ImageIO.read(multipartFile.getInputStream())
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/536404.html
標籤:爪哇春天后端
