org.apache.batik.refimpl.transcoder
Class JpegTranscoder

java.lang.Object
  |
  +--org.apache.batik.refimpl.transcoder.AbstractTranscoder
        |
        +--org.apache.batik.refimpl.transcoder.ImageTranscoder
              |
              +--org.apache.batik.refimpl.transcoder.JpegTranscoder
All Implemented Interfaces:
Transcoder

public class JpegTranscoder
extends ImageTranscoder

An ImageTranscoder that produces a jpeg image. The default background color is white.


Fields inherited from class org.apache.batik.refimpl.transcoder.AbstractTranscoder
hints
 
Constructor Summary
JpegTranscoder()
          Constructs a new jpeg transcoder.
 
Method Summary
 java.awt.image.BufferedImage createImage(int w, int h)
          Creates a new image of type RGB.
 java.lang.String getMimeType()
          Returns the jpeg mime type image/jpeg.
 void writeImage(java.awt.image.BufferedImage img, java.io.OutputStream ostream)
          Writes the specified image as a jpeg to the specified ouput stream.
 
Methods inherited from class org.apache.batik.refimpl.transcoder.ImageTranscoder
transcodeToStream
 
Methods inherited from class org.apache.batik.refimpl.transcoder.AbstractTranscoder
addTranscodingHint, getBackgroundPaint, getDefaultViewport, getGVTBuilder, getParserClassName, getTranscodingHints, setTranscodingHints, transcodeToStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpegTranscoder

public JpegTranscoder()
Constructs a new jpeg transcoder.
Method Detail

createImage

public java.awt.image.BufferedImage createImage(int w,
                                                int h)
Creates a new image of type RGB.
Overrides:
createImage in class ImageTranscoder
Parameters:
w - the width of the image
h - the height of the image

writeImage

public void writeImage(java.awt.image.BufferedImage img,
                       java.io.OutputStream ostream)
                throws java.io.IOException
Writes the specified image as a jpeg to the specified ouput stream.
Overrides:
writeImage in class ImageTranscoder
Parameters:
img - the image to write
ostream - the output stream where to write the image

getMimeType

public java.lang.String getMimeType()
Returns the jpeg mime type image/jpeg.


Copyright © 2000 Apache Software Foundation. All Rights Reserved.