public class JPEGOptimizer extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseOptimizer.ImageIOOutputter
Standard ImageIO based image outputter
|
static interface |
BaseOptimizer.ImageOutputter
Interface to allow for different serialization libraries to be used
|
static class |
BaseOptimizer.SanselanOutputter
Sanselan based image outputter
|
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
minBytes |
protected int |
minLength |
protected BaseOptimizer.ImageOutputter |
outputter |
| Constructor and Description |
|---|
JPEGOptimizer(OptimizerConfig config,
HttpResponseBuilder response) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getOriginalContentType() |
protected String |
getOriginalFormatName() |
protected String |
getOutputContentType() |
protected BaseOptimizer.ImageOutputter |
getOutputter() |
protected byte[] |
getRewrittenImage()
Get the rewritten image if available
|
static BufferedImage |
readJpeg(InputStream is) |
void |
rewrite(BufferedImage image) |
protected void |
rewriteImpl(BufferedImage image) |
protected void |
write(BufferedImage image)
Write the image using a specified write param
|
protected BaseOptimizer.ImageOutputter outputter
protected byte[] minBytes
protected int minLength
public JPEGOptimizer(OptimizerConfig config, HttpResponseBuilder response)
public static BufferedImage readJpeg(InputStream is) throws org.apache.sanselan.ImageReadException, IOException
org.apache.sanselan.ImageReadExceptionIOExceptionprotected void rewriteImpl(BufferedImage image) throws IOException
IOExceptionprotected String getOutputContentType()
protected String getOriginalContentType()
protected String getOriginalFormatName()
protected BaseOptimizer.ImageOutputter getOutputter()
protected void write(BufferedImage image) throws IOException
IOExceptionpublic void rewrite(BufferedImage image) throws IOException
IOExceptionprotected final byte[] getRewrittenImage()
Copyright © 2007-2012. All Rights Reserved.