Codota Logo
PNGDecodeParam
Code IndexAdd Codota to your IDE (free)

How to use
PNGDecodeParam
in
org.apache.batik.ext.awt.image.codec.png

Best Java code snippets using org.apache.batik.ext.awt.image.codec.png.PNGDecodeParam (Showing top 12 results out of 315)

  • Common ways to obtain PNGDecodeParam
private void myMethod () {
PNGDecodeParam p =
  • Codota Iconnew PNGDecodeParam()
  • Smart code suggestions by Codota
}
origin: apache/batik

public void run() {
  Filter filt;
  try {
    PNGDecodeParam param = new PNGDecodeParam();
    param.setExpandPalette(true);
      param.setPerformGammaCorrection(false);
    else {
      param.setPerformGammaCorrection(true);
      param.setDisplayExponent(2.2f); // sRGB gamma
origin: fr.avianey.apache-xmlgraphics/batik

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
origin: org.apache.xmlgraphics/batik-codec

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
origin: liuyueyi/quick-media

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
origin: fr.avianey.apache-xmlgraphics/batik

public void run() {
  Filter filt;
  try {
    PNGDecodeParam param = new PNGDecodeParam();
    param.setExpandPalette(true);
      param.setPerformGammaCorrection(false);
    else {
      param.setPerformGammaCorrection(true);
      param.setDisplayExponent(2.2f); // sRGB gamma
origin: liuyueyi/quick-media

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
origin: liuyueyi/quick-media

public void run() {
  Filter filt;
  try {
    PNGDecodeParam param = new PNGDecodeParam();
    param.setExpandPalette(true);
      param.setPerformGammaCorrection(false);
    else {
      param.setPerformGammaCorrection(true);
      param.setDisplayExponent(2.2f); // sRGB gamma
origin: apache/batik

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
origin: org.apache.xmlgraphics/batik-codec

public void run() {
  Filter filt;
  try {
    PNGDecodeParam param = new PNGDecodeParam();
    param.setExpandPalette(true);
      param.setPerformGammaCorrection(false);
    else {
      param.setPerformGammaCorrection(true);
      param.setDisplayExponent(2.2f); // sRGB gamma
origin: apache/batik

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
origin: org.apache.xmlgraphics/batik-codec

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
origin: fr.avianey.apache-xmlgraphics/batik

  decodeParam = new PNGDecodeParam();
this.suppressAlpha = decodeParam.getSuppressAlpha();
this.expandPalette = decodeParam.getExpandPalette();
this.output8BitGray = decodeParam.getOutput8BitGray();
this.expandGrayAlpha = decodeParam.getExpandGrayAlpha();
if (decodeParam.getPerformGammaCorrection()) {
  this.userExponent = decodeParam.getUserExponent();
  this.displayExponent = decodeParam.getDisplayExponent();
  performGammaCorrection = true;
  output8BitGray = true;
this.generateEncodeParam = decodeParam.getGenerateEncodeParam();
org.apache.batik.ext.awt.image.codec.pngPNGDecodeParam

Javadoc

An instance of ImageDecodeParam for decoding images in the PNG format. PNGDecodeParam allows several aspects of the decoding process for PNG images to be controlled. By default, decoding produces output images with the following properties:

Images with a bit depth of 8 or less use a DataBufferByte to hold the pixel data. 16-bit images use a DataBufferUShort.

Palette color images and non-transparent grayscale images with bit depths of 1, 2, or 4 will have a MultiPixelPackedSampleModel and an IndexColorModel. For palette color images, the ColorModel palette contains the red, green, blue, and optionally alpha palette information. For grayscale images, the palette is used to expand the pixel data to cover the range 0-255. The pixels are stored packed 8, 4, or 2 to the byte.

All other images are stored using a PixelInterleavedSampleModel with each sample of a pixel occupying its own byte or short within the DataBuffer. A ComponentColorModel is used which simply extracts the red, green, blue, gray, and/or alpha information from separate DataBuffer entries.

Five aspects of this process may be altered by means of methods in this class.

setSuppressAlpha() prevents an alpha channel from appearing in the output.

setExpandPalette() turns palette-color images into 3-or 4-channel full-color images.

setOutput8BitGray() causes 1, 2, or 4 bit grayscale images to be output in 8-bit form, using a ComponentSampleModel and ComponentColorModel.

setDecodingExponent() causes the output image to be gamma-corrected using a supplied output gamma value.

setExpandGrayAlpha() causes 2-channel gray/alpha (GA) images to be output as full-color (GGGA) images, which may simplify further processing and display.

This class is not a committed part of the JAI API. It may be removed or changed in future releases of JAI.

Most used methods

  • <init>
    Constructs a default instance of PNGDecodeParam.
  • getDisplayExponent
    Returns the current value of the display exponent parameter. By default, the display exponent is equ
  • getExpandGrayAlpha
    Returns the current setting of the gray/alpha expansion.
  • getExpandPalette
    Returns true if palette-color images will be expanded to produce full-color output.
  • getGenerateEncodeParam
    Returns true if an instance ofPNGEncodeParam will be available after an image has been decoded via t
  • getOutput8BitGray
    Returns the current value of the 8-bit gray output parameter.
  • getPerformGammaCorrection
    Returns true if gamma correction is to be performed on the image data. The default is true. If gamma
  • getSuppressAlpha
    Returns true if alpha (transparency) will be prevented from appearing in the output.
  • getUserExponent
    Returns the current value of the user exponent parameter. By default, the user exponent is equal to
  • setDisplayExponent
    Sets the display exponent to a given value. The exponent must be positive. If not, anIllegalArgument
  • setEncodeParam
    Sets the current encoder param instance. This method is intended to be called by the PNG decoder and
  • setExpandPalette
    If set, palette color images (PNG color type 3) will be decoded into full-color (RGB) output images.
  • setEncodeParam,
  • setExpandPalette,
  • setPerformGammaCorrection

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JButton (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now