问题
Is there a way to get the filename from a BufferedImage? I don't seem to see any methods for it.
回答1:
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.
回答2:
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
.
来源:https://stackoverflow.com/questions/4611303/getting-filename-from-bufferedimage