org.apache.shindig.gadgets.rewrite.image
Class OptimizerConfig

java.lang.Object
  extended by org.apache.shindig.gadgets.rewrite.image.OptimizerConfig

public class OptimizerConfig
extends Object

Configuration settings for the optimizer


Constructor Summary
OptimizerConfig()
          Defaults
OptimizerConfig(int maxInMemoryBytes, int maxPaletteSize, boolean jpegConversionAllowed, float jpegCompression, int minThresholdBytes)
           
 
Method Summary
 float getJpegCompression()
          The compression ratio to use when compressing JPEG images A value between 0.5 and 0.9.
 int getMaxInMemoryBytes()
          The maximum allowed in-memory size of a parsed image.
 int getMaxPaletteSize()
          The maximum no.
 int getMinThresholdBytes()
          The threshold in bytes below which we do not attempt to rewite an image.
 boolean isJpegConversionAllowed()
          Allow conversion from and to JPEG for other image types that are fully opaque.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimizerConfig

@Inject
public OptimizerConfig(int maxInMemoryBytes,
                              int maxPaletteSize,
                              boolean jpegConversionAllowed,
                              float jpegCompression,
                              int minThresholdBytes)

OptimizerConfig

public OptimizerConfig()
Defaults

Method Detail

getMaxInMemoryBytes

public int getMaxInMemoryBytes()
The maximum allowed in-memory size of a parsed image. Used to protect system from very large memory allocations


getMaxPaletteSize

public int getMaxPaletteSize()
The maximum no. of palette entries to create when attempting to palettize an image before quitting.


isJpegConversionAllowed

public boolean isJpegConversionAllowed()
Allow conversion from and to JPEG for other image types that are fully opaque.


getJpegCompression

public float getJpegCompression()
The compression ratio to use when compressing JPEG images A value between 0.5 and 0.9.


getMinThresholdBytes

public int getMinThresholdBytes()
The threshold in bytes below which we do not attempt to rewite an image. Value should be chosen based on knowledge of MTU sizes



Copyright © 2007-2012. All Rights Reserved.