org.gerhardb.lib.image
Class ImageChangeUtil

java.lang.Object
  extended byorg.gerhardb.lib.image.ImageChangeUtil

public class ImageChangeUtil
extends java.lang.Object


Method Summary
static java.awt.image.BufferedImage bufferImage(java.awt.Image image)
          Untested Image must be loaded before being called.
static float calcThetaDown(int fromWidth, int fromHeight, double toWidth, double toHeight)
          How to size the picture down to fit in the area given.
static float calcThetaUp(int fromWidth, int fromHeight, double toWidth, double toHeight)
          How to size the picture down to fit in the area given.
static java.awt.image.BufferedImage resizeImageDown(java.awt.image.BufferedImage image, double toWidth, double toHeight)
           
static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage image, int degrees)
           
static java.awt.image.BufferedImage rotateLeft(java.awt.image.BufferedImage image)
           
static java.awt.image.BufferedImage rotateRight(java.awt.image.BufferedImage image)
           
static java.awt.image.BufferedImage scale(java.awt.image.BufferedImage image, float scale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

rotateRight

public static java.awt.image.BufferedImage rotateRight(java.awt.image.BufferedImage image)

rotateLeft

public static java.awt.image.BufferedImage rotateLeft(java.awt.image.BufferedImage image)

scale

public static java.awt.image.BufferedImage scale(java.awt.image.BufferedImage image,
                                                 float scale)

bufferImage

public static java.awt.image.BufferedImage bufferImage(java.awt.Image image)
Untested Image must be loaded before being called.


resizeImageDown

public static java.awt.image.BufferedImage resizeImageDown(java.awt.image.BufferedImage image,
                                                           double toWidth,
                                                           double toHeight)
                                                    throws java.lang.Exception
Returns:
ResizedImage Returns null if the image did not need to be resized.
Throws:
java.lang.Exception

rotate

public static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage image,
                                                  int degrees)

calcThetaDown

public static float calcThetaDown(int fromWidth,
                                  int fromHeight,
                                  double toWidth,
                                  double toHeight)
How to size the picture down to fit in the area given.


calcThetaUp

public static float calcThetaUp(int fromWidth,
                                int fromHeight,
                                double toWidth,
                                double toHeight)
How to size the picture down to fit in the area given.



Copyright © 2002 Gerhard Beck. All rights reserved. Subject to GPL.