Getting filename from BufferedImage

2019-06-25 04:05发布

Is there a way to get the filename from a BufferedImage? I don't seem to see any methods for it.

2条回答
何必那么认真
2楼-- · 2019-06-25 04:16

A BufferedImage is not necessarily associated with a file. Just as you can read a String from a file, but there is no getFilename() method on String objects, there is no such method on BufferedImage.

查看更多
Emotional °昔
3楼-- · 2019-06-25 04:25

A BufferedImage doesn't necessarily have to be backed by a file. It could be a byte array in a database, or even backed by a stream.

查看更多
登录 后发表回答