i have created an image using java. it is in png format but i would like it to be in pgm format. anyone can help to edit my code (which fails to run)? thanks!
view source print?
01import java.awt.image.BufferedImage;
02import java.io.File;
03import javax.imageio.ImageIO;
04import java.io.ByteArrayOutputStream;
05
06public class example {
07public static void main(String[] argv) throws Exception {
08BufferedImage bufferedImage = ImageIO.read(new File("C:\\Documents and Settings\\home user\\Desktop\\test6\\image.png"));
09
10ImageIO.write(bufferedImage, "pgm", new File("C:\\Documents and Settings\\home user\\Desktop\\test6\\image.pgm"));
11}
12}
Copyright © 2011 - All Rights Reserved - Softron.in
Template by Softron Technology