public class BMPOptimizer 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 |
|---|
BMPOptimizer(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 |
readBmp(InputStream is) |
static BufferedImage |
readPng(InputStream is) |
void |
rewrite(BufferedImage image) |
protected void |
rewriteImpl(BufferedImage bufferedImage) |
protected void |
write(BufferedImage image)
Write the image using a specified write param
|
protected BaseOptimizer.ImageOutputter outputter
protected byte[] minBytes
protected int minLength
public BMPOptimizer(OptimizerConfig config, HttpResponseBuilder response)
public static BufferedImage readBmp(InputStream is) throws org.apache.sanselan.ImageReadException, IOException
org.apache.sanselan.ImageReadExceptionIOExceptionprotected String getOriginalContentType()
protected String getOriginalFormatName()
public static BufferedImage readPng(InputStream is) throws org.apache.sanselan.ImageReadException, IOException
org.apache.sanselan.ImageReadExceptionIOExceptionprotected void rewriteImpl(BufferedImage bufferedImage) throws IOException
IOExceptionprotected String getOutputContentType()
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.