开发者

Reading a image file in Jva

开发者 https://www.devze.com 2022-12-20 00:57 出处:网络
Ho开发者_StackOverflow社区w to read a image in Java and convert it to buffered image?You need the Java 2D API for this. Here\'s a Sun tutorial about the subject. In the \"Working with Images\" chapter

Ho开发者_StackOverflow社区w to read a image in Java and convert it to buffered image?


You need the Java 2D API for this. Here's a Sun tutorial about the subject. In the "Working with Images" chapter you can learn how to read/load an image. Here's an extract of the tutorial:

BufferedImage img = null;
try {
    img = ImageIO.read(new File("strawberry.jpg"));
} catch (IOException e) {

}


See ImageIO.read().

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号