将图像转换为BufferedImage [英] Converting Image to BufferedImage
本文介绍了将图像转换为BufferedImage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在磁盘上有映像。我想将其转换为BufferedImage,以便可以对其应用过滤器。有什么办法做到?
I'm having an image on disk. I want to convert it to a BufferedImage so that i can apply filters on it. Is there any way to do this?
推荐答案
使用 ImageIO.read(File)。它返回BufferedImage:
use ImageIO.read(File) . It returns BufferedImage :
BufferedImage image = ImageIO.read(new File(filename));
这篇关于将图像转换为BufferedImage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文