圖片處理依賴

		 <dependency>
	      <groupId>net.coobird</groupId>
	      <artifactId>thumbnailator</artifactId>
	      <version>0.4.8</version>
	    </dependency>

  

		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		Thumbnails.of(new ByteArrayInputStream(bytes)).size(1, 1).keepAspectRatio(false).toOutputStream(baos);
		byte[] array = baos.toByteArray();
相關文章
相關標籤/搜索