com.tensegrity.graphics
Interface ImageOperations

All Known Implementing Classes:
AWTImageOperations, SWTImageOperations

public interface ImageOperations

The ImageOperations interface defines an object that is used by the Graphics API to perform operations upon images.

This layer of abstraction is needed by the Graphics API in order to be able to work with different window toolkits like the AWT or SWT.

Version:
$Id: ImageOperations.java,v 1.2 2004/12/06 11:50:40 BurkhardWick Exp $
Author:
MKegel

Method Summary
 byte[] jpegEncode(int width, int height, int[] pixels, float quality, boolean forceBaseline)
          Encodes the given pixel data to JPEG data.
 Raster loadImage(java.lang.String imagepath)
           
 Raster loadImage(java.net.URL imagepath)
           
 Raster loadImageResource(java.lang.Class referenceClass, java.lang.String imagepath)
           
 Raster loadImageResource(java.lang.String imagepath)
           
 

Method Detail

loadImageResource

public Raster loadImageResource(java.lang.String imagepath)

loadImageResource

public Raster loadImageResource(java.lang.Class referenceClass,
                                java.lang.String imagepath)

loadImage

public Raster loadImage(java.lang.String imagepath)

loadImage

public Raster loadImage(java.net.URL imagepath)

jpegEncode

public byte[] jpegEncode(int width,
                         int height,
                         int[] pixels,
                         float quality,
                         boolean forceBaseline)
Encodes the given pixel data to JPEG data.

Parameters:
width - The width of the image
height - The height of the image
pixels - The pixel array width a size of width*height containing the colors encoded as 0xRRGGBB
quality - The JPEG quality (0.0f - 1.0f)
forceBaseline - The force baseline setting for the JPEG encoder
Returns:
The bytes of the JPEG file


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.