Posts Under 'image resize'

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*; /** * (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 " […]

Read more »