org.jaudiotagger.tag
Class ImageHandling

java.lang.Object
  extended by org.jaudiotagger.tag.ImageHandling

public class ImageHandling
extends java.lang.Object

User: paul Date: 11-Dec-2008


Constructor Summary
ImageHandling()
           
 
Method Summary
static boolean isMimeTypeWritable(java.lang.String mimeType)
           
private static void makeSmaller(Artwork artwork, int size)
          Resize image using Java 2D
static void reduceQuality(Artwork artwork, int maxSize)
          Resize the image until the total size require to store the image is less than maxsize
static void showReadFormats()
          Show read formats On Windows supports png/jpeg/bmp/gif
static void showWriteFormats()
          Show write formats On Windows supports png/jpeg/bmp
static byte[] writeImage(java.awt.image.BufferedImage bi, java.lang.String mimeType)
          Write buffered image as required format
static byte[] writeImageAsPng(java.awt.image.BufferedImage bi)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageHandling

public ImageHandling()
Method Detail

reduceQuality

public static void reduceQuality(Artwork artwork,
                                 int maxSize)
                          throws java.io.IOException
Resize the image until the total size require to store the image is less than maxsize

Parameters:
artwork -
maxSize -
Throws:
java.io.IOException

makeSmaller

private static void makeSmaller(Artwork artwork,
                                int size)
                         throws java.io.IOException
Resize image using Java 2D

Parameters:
artwork -
size -
Throws:
java.io.IOException

isMimeTypeWritable

public static boolean isMimeTypeWritable(java.lang.String mimeType)

writeImage

public static byte[] writeImage(java.awt.image.BufferedImage bi,
                                java.lang.String mimeType)
                         throws java.io.IOException
Write buffered image as required format

Parameters:
bi -
mimeType -
Returns:
Throws:
java.io.IOException

writeImageAsPng

public static byte[] writeImageAsPng(java.awt.image.BufferedImage bi)
                              throws java.io.IOException
Parameters:
bi -
Returns:
Throws:
java.io.IOException

showReadFormats

public static void showReadFormats()
Show read formats On Windows supports png/jpeg/bmp/gif


showWriteFormats

public static void showWriteFormats()
Show write formats On Windows supports png/jpeg/bmp