1 18 package org.apache.batik.ext.awt.image.codec; 19 20 72 public class PNGDecodeParam implements ImageDecodeParam { 73 74 77 public PNGDecodeParam() {} 78 79 private boolean suppressAlpha = false; 80 81 85 public boolean getSuppressAlpha() { 86 return suppressAlpha; 87 } 88 89 96 public void setSuppressAlpha(boolean suppressAlpha) { 97 this.suppressAlpha = suppressAlpha; 98 } 99 100 private boolean expandPalette = false; 101 102 106 public boolean getExpandPalette() { 107 return expandPalette; 108 } 109 110 120 public void setExpandPalette(boolean expandPalette) { 121 this.expandPalette = expandPalette; 122 } 123 124 private boolean output8BitGray = false; 125 126 129 public boolean getOutput8BitGray() { 130 return output8BitGray; 131 } 132 133 148 public void setOutput8BitGray(boolean output8BitGray) { 149 this.output8BitGray = output8BitGray; 150 } 151 152 private boolean performGammaCorrection = true; 153 154 168 public boolean getPerformGammaCorrection() { 169 return performGammaCorrection; 170 } 171 172 175 public void setPerformGammaCorrection(boolean performGammaCorrection) { 176 this.performGammaCorrection = performGammaCorrection; 177 } 178 179 private float userExponent = 1.0F; 180 181 185 public float getUserExponent() { 186 return userExponent; 187 } 188 189 225 public void setUserExponent(float userExponent) { 226 if (userExponent <= 0.0F) { 227 throw new IllegalArgumentException (PropertyUtil.getString("PNGDecodeParam0")); 228 } 229 this.userExponent = userExponent; 230 } 231 232 private float displayExponent = 2.2F; 233 234 238 public float getDisplayExponent() { 239 return displayExponent; 240 } 241 242 274 public void setDisplayExponent(float displayExponent) { 275 if (displayExponent <= 0.0F) { 276 throw new IllegalArgumentException (PropertyUtil.getString("PNGDecodeParam1")); 277 } 278 this.displayExponent = displayExponent; 279 } 280 281 private boolean expandGrayAlpha = false; 282 283 286 public boolean getExpandGrayAlpha() { 287 return expandGrayAlpha; 288 } 289 290 301 public void setExpandGrayAlpha(boolean expandGrayAlpha) { 302 this.expandGrayAlpha = expandGrayAlpha; 303 } 304 305 private boolean generateEncodeParam = false; 306 307 private PNGEncodeParam encodeParam = null; 308 309 314 public boolean getGenerateEncodeParam() { 315 return generateEncodeParam; 316 } 317 318 326 public void setGenerateEncodeParam(boolean generateEncodeParam) { 327 this.generateEncodeParam = generateEncodeParam; 328 } 329 330 336 public PNGEncodeParam getEncodeParam() { 337 return encodeParam; 338 } 339 340 345 public void setEncodeParam(PNGEncodeParam encodeParam) { 346 this.encodeParam = encodeParam; 347 } 348 } 349 | Popular Tags |