org.apache.shindig.gadgets.rewrite.image
Class BMPOptimizer
java.lang.Object
org.apache.shindig.gadgets.rewrite.image.BMPOptimizer
public class BMPOptimizer
- extends Object
Optimize BMP by converting to PNG
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outputter
protected BaseOptimizer.ImageOutputter outputter
minBytes
protected byte[] minBytes
minLength
protected int minLength
BMPOptimizer
public BMPOptimizer(OptimizerConfig config,
HttpResponseBuilder response)
readBmp
public static BufferedImage readBmp(InputStream is)
throws org.apache.sanselan.ImageReadException,
IOException
- Throws:
org.apache.sanselan.ImageReadException
IOException
getOriginalContentType
protected String getOriginalContentType()
getOriginalFormatName
protected String getOriginalFormatName()
readPng
public static BufferedImage readPng(InputStream is)
throws org.apache.sanselan.ImageReadException,
IOException
- Throws:
org.apache.sanselan.ImageReadException
IOException
rewriteImpl
protected void rewriteImpl(BufferedImage bufferedImage)
throws IOException
- Throws:
IOException
getOutputContentType
protected String getOutputContentType()
getOutputter
protected BaseOptimizer.ImageOutputter getOutputter()
write
protected void write(BufferedImage image)
throws IOException
- Write the image using a specified write param
- Throws:
IOException
rewrite
public void rewrite(BufferedImage image)
throws IOException
- Throws:
IOException
getRewrittenImage
protected final byte[] getRewrittenImage()
- Get the rewritten image if available
Copyright © 2007-2012. All Rights Reserved.