试试这个:
BufferedImage bImage = SwingFXUtils.fromFXImage(logo.getImage(), null);ByteArrayOutputStream s = new ByteArrayOutputStream();ImageIO.write(bImage, "png", s);byte[] res = s.toByteArray();s.close(); //especially if you are using a different output stream.
应该根据徽标类别工作
您需要在写入和读取时指定一种格式,据我所知,不支持bmp,因此最终将在数据库上使用png字节数组


![如何从javafx imageView获取byte []? 如何从javafx imageView获取byte []?](http://www.mshxw.com/aiimages/31/496918.png)
