Index: sources/org/apache/tools/ant/taskdefs/optional/RasterizerTask.java =================================================================== RCS file: /home/cvspublic/xml-batik/contrib/rasterizertask/sources/org/apache/tools/ant/taskdefs/optional/RasterizerTask.java,v retrieving revision 1.3 diff -r1.3 RasterizerTask.java 93a94,95 > /** Output image indexed bits. */ > protected int indexed = -1; 202a205,216 > * Gets indexed attribute value. > * > *

The value has to be either 1, 2, 4 or 8. > * The attribute is optional.

> * > * @param indexed Attribute value. > */ > public void setIndexed(int indexed) { > this.indexed = indexed; > } > > /** 458a473,476 > // The indexed is just swallowed if the result type is not correct. > if(allowedToSetIndexed(resultType) && indexed != -1) { > converter.setIndexed(getIndexed(indexed)); > } 585a604,635 > } > > /** > * Checks if the indexed value can be set. Only result image type > * is checked. > * > * @param type Result image type. > * > * @return true if the indexed can be set and false otherwise. > */ > protected boolean allowedToSetIndexed(DestinationType type) { > if(!type.toString().equals(DestinationType.PNG_STR)) { > return false; > } > return true; > } > > /** > * Returns a valid indexed value. > * > * @param indexed Input indexed value to be tested. > * > * @return Valid indexed value. > * > * @throws BuildException Input indexed value is not valid. > */ > protected int getIndexed(int indexed) > throws BuildException { > if(indexed != 1 && indexed != 2 && indexed != 4 && indexed != 8) { > throw new BuildException("indexed parameter value must be 1, 2, 4 or 8."); > } > return indexed;