org.openptk.util
Class Media

java.lang.Object
  extended by org.openptk.util.Media

public class Media
extends java.lang.Object

Media manipulation methods.

Author:
Scott Fehrman, Sun Microsystems, Inc.

Constructor Summary
Media()
           
 
Method Summary
static byte[] scaleCropImage(byte[] bytesIn, int width, int height, java.lang.String type)
          Scale and Crop the image (byte[]) to the specified size (width and height).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Media

public Media()
Method Detail

scaleCropImage

public static byte[] scaleCropImage(byte[] bytesIn,
                                    int width,
                                    int height,
                                    java.lang.String type)
                             throws java.lang.Exception
Scale and Crop the image (byte[]) to the specified size (width and height).

Parameters:
bytesIn - byte[] the original image
width - int size of the returned image width
height - int size of the returned image height
type - String the original image type
Returns:
byte[] modified image
Throws:
java.lang.Exception


View/submit a bug or feature

For further API reference and developer documentation, see www.openptk.org. That documentation contains more detailed, developer-targeted descriptions, definitions of terms, workarounds, and working code examples.

Copyright (C) 2008-2012, Project OpenPTK. All Rights Reserved