petite/src/wombat/scheme/libraries/ImageAPI.java
public static void writeImage(ImageData img) throws IOException {
		FileDialog fc = new FileDialog((java.awt.Frame) null, "write-image", FileDialog.SAVE);
        fc.setVisible(true);

        if (fc.getFile() == null)
        	throw new IllegalArgumentException("Error in read-image: no image chosen");

        File file = new File(fc.getDirectory(), fc.getFile());
        writeImage(null, img, file.getCanonicalPath());
	}
/**
	 * Write the given [r,g,b,a] buffer to an image. Display a dialog for the filename.
	 * @param dir The directory to read from.
	 * @param data The image to write. The first two values are the width and height.
	 * @throws IOException If we cannot write the image.
	 */
Write the given [r,g,b,a] buffer to an image. Display a dialog for the filename.
@param dir The directory to read from.
@param data The image to write. The first two values are the width and height.
@throws IOException If we cannot write the image.
Write the given [ r g b a ] buffer to an image . Display a dialog for the filename . @param dir The directory to read from . @param data The image to write . The first two values are the width and height . @throws IOException If we cannot write the image .
public static void writeImage(ImageData img) throws IOException {
		FileDialog fc = new FileDialog((java.awt.Frame) null, "write-image", FileDialog.SAVE);
        fc.setVisible(true);
        if (fc.getFile() == null)
        	throw new IllegalArgumentException("Error in read-image: no image chosen");
        File file = new File(fc.getDirectory(), fc.getFile());
        writeImage(null, img, file.getCanonicalPath());
	}
public static void writeImage ( ImageData img ) throws IOException { FileDialog fc = new FileDialog ( ( java . awt . Frame ) null , "write-image" , FileDialog . SAVE ) ; fc . setVisible ( true ) ; if ( fc . getFile ( ) == null ) throw new IllegalArgumentException ( "Error in read-image: no image chosen" ) ; File file = new File ( fc . getDirectory ( ) , fc . getFile ( ) ) ; writeImage ( null , img , file . getCanonicalPath ( ) ) ; }
Write the given [r,g,b,a] buffer to an image.
Write the given [ r g b a ] buffer to an image .