Quantcast
Viewing all articles
Browse latest Browse all 10

Load an image, scale it to thumbnail size and save it as JPEG in Java

import com.sun.image.codec.jpeg.*; import java.awt.*; import java.awt.image.*; import java.io.*; /** * Thumbnail.java (requires Java 1.2+) * Load an image, scale it down and save it as a JPEG file. * @author Marco Schmidt */ public class Thumbnail { public static void main(String[] args) throws Exception { if (args.length != 5) { System.err.println("Usage: java Thumbnail INFILE " [...]

Viewing all articles
Browse latest Browse all 10

Trending Articles