Class Png32Format
- java.lang.Object
-
- uk.ac.rdg.resc.edal.graphics.formats.ImageFormat
-
- uk.ac.rdg.resc.edal.graphics.formats.SimpleFormat
-
- uk.ac.rdg.resc.edal.graphics.formats.PngFormat
-
- uk.ac.rdg.resc.edal.graphics.formats.Png32Format
-
public class Png32Format extends PngFormat
Writes 32-bit (ARGB) PNG images using the ImageIO class. Only one instance of this class will ever be created, so this class contains no member variables to ensure thread safety. Some browsers have problems withindexed PNGs
, and some clients find it easier to merge 32-bit images with others.- Author:
- Jon Blower
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Png32Format()
Protected default constructor to prevent direct instantiation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMimeType()
Returns the MIME type that is supported by this ImageFormat object.void
writeImage(List<BufferedImage> frames, OutputStream out, Integer frameRate)
Writes the given list ofjava.awt.BufferedImage
s to the given OutputStream.-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.formats.PngFormat
supportsFullyTransparentPixels, supportsMultipleFrames, supportsPartiallyTransparentPixels
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.formats.SimpleFormat
requiresLegend, writeImage
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.formats.ImageFormat
get, getSupportedMimeTypes
-
-
-
-
Method Detail
-
getMimeType
public String getMimeType()
Description copied from class:ImageFormat
Returns the MIME type that is supported by this ImageFormat object.- Overrides:
getMimeType
in classPngFormat
-
writeImage
public void writeImage(List<BufferedImage> frames, OutputStream out, Integer frameRate) throws IOException
Description copied from class:SimpleFormat
Writes the given list ofjava.awt.BufferedImage
s to the given OutputStream. If this ImageFormat doesn't support animations then the given list of frames should only contain one entry, otherwise an IllegalArgumentException will be thrown.- Overrides:
writeImage
in classPngFormat
- Parameters:
frames
- List of BufferedImages to render into an imageout
- The OutputStream to which the image will be writtenframeRate
- The frame rate to use if this is an animation.- Throws:
IOException
- if there was an error writing to the output stream
-
-