0
MultipartFile mpf = null;
final BufferedImage resizedImage = imageResizeService.resize(requestResizeReq);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(resizedImage,mpf.getContentType() , baos);
profilePictureService.saveProfilePicture(account.getId(),baos.toByteArray());
resizedImage
是ByteArrayOutputStream設置不正確
[email protected]: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = [email protected] transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 200 height = 500 #numDataElements 3 dataOff[0] = 701
baos
是空的。任何想法?
想要得到更快的幫助,請發佈[SSCCE](http://sscce.org/)。熱鏈接到具有相同結果的小圖像(以字節爲單位)。 –