Flyingdogz's Weblog

Posts Tagged ‘rotate

Image Rotate in Java #2 : easier to use

Posted by: flyingdogz on: February 11, 2008

I’ve combine the source I provided in the first article , which receive and return BufferedImage object , with the Image to a BufferedImage code that I’ve found from http://www.exampledepot.com/egs/java.awt.image/Image2Buf.html.
The result is the Class ImageUtils with the rotateImage() method that receive 2 parameters , img – an Image object to rotate and degree – [...]

Tags: , ,

Image Rotate in Java

Posted by: flyingdogz on: February 9, 2008

Source : http://forum.java.sun.com/thread.jspa?threadID=487900&messageID=2286191

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import javax.imageio.*;
import javax.swing.*;

public class Tilt {
public static void main(String[] args) throws IOException {
URL url = new URL(“http://weblogs.java.net/jag/Image1-large.jpeg”);
final BufferedImage image = ImageIO.read(url);
[...]

Tags: , ,

Categories

My del.icio.us

Blog Stats

  • 6,601 hits