Tabnine Logo
PNGImage
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: liuyueyi/quick-media

  public RenderedImage decodeAsRenderedImage(int page) throws IOException {
    if (page != 0) {
      throw new IOException(PropertyUtil.getString("PNGImageDecoder19"));
    }
    return new PNGImage(input, (PNGDecodeParam)param);
  }
}
origin: liuyueyi/quick-media

private void decodeImage(boolean useInterlacing) {
  if (!useInterlacing) {
    decodePass(theTile, 0, 0, 1, 1, width, height);
  } else {
    decodePass(theTile, 0, 0, 8, 8, (width + 7)/8, (height + 7)/8);
    decodePass(theTile, 4, 0, 8, 8, (width + 3)/8, (height + 7)/8);
    decodePass(theTile, 0, 4, 4, 8, (width + 3)/4, (height + 3)/8);
    decodePass(theTile, 2, 0, 4, 4, (width + 1)/4, (height + 3)/4);
    decodePass(theTile, 0, 2, 2, 4, (width + 1)/2, (height + 1)/4);
    decodePass(theTile, 1, 0, 2, 2, width/2, (height + 1)/2);
    decodePass(theTile, 0, 1, 1, 2, width, height/2);
  }
}
origin: liuyueyi/quick-media

String chunkType = getChunkType(distream);
if (chunkType.equals("IHDR")) {
  chunk = readChunk(distream);
  parse_IHDR_chunk(chunk);
} else if (chunkType.equals("PLTE")) {
  chunk = readChunk(distream);
  parse_PLTE_chunk(chunk);
} else if (chunkType.equals("IDAT")) {
  chunk = readChunk(distream);
  streamVec.add(new ByteArrayInputStream(chunk.getData()));
} else if (chunkType.equals("IEND")) {
  chunk = readChunk(distream);
  parse_IEND_chunk(chunk);
  break; // fall through to the bottom
} else if (chunkType.equals("bKGD")) {
  chunk = readChunk(distream);
  parse_bKGD_chunk(chunk);
} else if (chunkType.equals("cHRM")) {
  chunk = readChunk(distream);
  parse_cHRM_chunk(chunk);
} else if (chunkType.equals("gAMA")) {
  chunk = readChunk(distream);
  parse_gAMA_chunk(chunk);
} else if (chunkType.equals("hIST")) {
  chunk = readChunk(distream);
  parse_hIST_chunk(chunk);
} else if (chunkType.equals("iCCP")) {
  chunk = readChunk(distream);
  parse_iCCP_chunk(chunk);
origin: liuyueyi/quick-media

createRaster(passWidth, 1, inputBands,
       eltsPerRow,
       bitDepth);
  break;
case PNG_FILTER_SUB:
  decodeSubFilter(curr, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_UP:
  decodeUpFilter(curr, prior, bytesPerRow);
  break;
case PNG_FILTER_AVERAGE:
  decodeAverageFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_PAETH:
  decodePaethFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
default:
processPixels(postProcess,
       passRow, imRas, xOffset, xStep, dstY, passWidth);
origin: liuyueyi/quick-media

  (depth == 16) ? (bytesPerRow/2) : bytesPerRow;
theTile = createRaster(width, height, outputBands,
            scanlineStride,
            depth);
  initGammaLut(bitDepth);
  initGrayLut(bitDepth);
decodeImage(interlaceMethod == 1);
sampleModel = theTile.getSampleModel();
} else {
  colorModel =
    createComponentColorModel(sampleModel);
origin: org.apache.xmlgraphics/batik-codec

String chunkType = getChunkType(distream);
if (chunkType.equals("IHDR")) {
  chunk = readChunk(distream);
  parse_IHDR_chunk(chunk);
} else if (chunkType.equals("PLTE")) {
  chunk = readChunk(distream);
  parse_PLTE_chunk(chunk);
} else if (chunkType.equals("IDAT")) {
  chunk = readChunk(distream);
  streamVec.add(new ByteArrayInputStream(chunk.getData()));
} else if (chunkType.equals("IEND")) {
  chunk = readChunk(distream);
  parse_IEND_chunk(chunk);
  break; // fall through to the bottom
} else if (chunkType.equals("bKGD")) {
  chunk = readChunk(distream);
  parse_bKGD_chunk(chunk);
} else if (chunkType.equals("cHRM")) {
  chunk = readChunk(distream);
  parse_cHRM_chunk(chunk);
} else if (chunkType.equals("gAMA")) {
  chunk = readChunk(distream);
  parse_gAMA_chunk(chunk);
} else if (chunkType.equals("hIST")) {
  chunk = readChunk(distream);
  parse_hIST_chunk(chunk);
} else if (chunkType.equals("iCCP")) {
  chunk = readChunk(distream);
  parse_iCCP_chunk(chunk);
origin: fr.avianey.apache-xmlgraphics/batik

createRaster(passWidth, 1, inputBands,
       eltsPerRow,
       bitDepth);
  break;
case PNG_FILTER_SUB:
  decodeSubFilter(curr, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_UP:
  decodeUpFilter(curr, prior, bytesPerRow);
  break;
case PNG_FILTER_AVERAGE:
  decodeAverageFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_PAETH:
  decodePaethFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
default:
processPixels(postProcess,
       passRow, imRas, xOffset, xStep, dstY, passWidth);
origin: fr.avianey.apache-xmlgraphics/batik

  (depth == 16) ? (bytesPerRow/2) : bytesPerRow;
theTile = createRaster(width, height, outputBands,
            scanlineStride,
            depth);
  initGammaLut(bitDepth);
  initGrayLut(bitDepth);
decodeImage(interlaceMethod == 1);
sampleModel = theTile.getSampleModel();
} else {
  colorModel =
    createComponentColorModel(sampleModel);
origin: fr.avianey.apache-xmlgraphics/batik

String chunkType = getChunkType(distream);
if (chunkType.equals("IHDR")) {
  chunk = readChunk(distream);
  parse_IHDR_chunk(chunk);
} else if (chunkType.equals("PLTE")) {
  chunk = readChunk(distream);
  parse_PLTE_chunk(chunk);
} else if (chunkType.equals("IDAT")) {
  chunk = readChunk(distream);
  streamVec.add(new ByteArrayInputStream(chunk.getData()));
} else if (chunkType.equals("IEND")) {
  chunk = readChunk(distream);
  parse_IEND_chunk(chunk);
  break; // fall through to the bottom
} else if (chunkType.equals("bKGD")) {
  chunk = readChunk(distream);
  parse_bKGD_chunk(chunk);
} else if (chunkType.equals("cHRM")) {
  chunk = readChunk(distream);
  parse_cHRM_chunk(chunk);
} else if (chunkType.equals("gAMA")) {
  chunk = readChunk(distream);
  parse_gAMA_chunk(chunk);
} else if (chunkType.equals("hIST")) {
  chunk = readChunk(distream);
  parse_hIST_chunk(chunk);
} else if (chunkType.equals("iCCP")) {
  chunk = readChunk(distream);
  parse_iCCP_chunk(chunk);
origin: apache/batik

createRaster(passWidth, 1, inputBands,
       eltsPerRow,
       bitDepth);
  break;
case PNG_FILTER_SUB:
  decodeSubFilter(curr, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_UP:
  decodeUpFilter(curr, prior, bytesPerRow);
  break;
case PNG_FILTER_AVERAGE:
  decodeAverageFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_PAETH:
  decodePaethFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
default:
processPixels(postProcess,
       passRow, imRas, xOffset, xStep, dstY, passWidth);
origin: apache/batik

  (depth == 16) ? (bytesPerRow/2) : bytesPerRow;
theTile = createRaster(width, height, outputBands,
            scanlineStride,
            depth);
  initGammaLut(bitDepth);
  initGrayLut(bitDepth);
decodeImage(interlaceMethod == 1);
sampleModel = theTile.getSampleModel();
} else {
  colorModel =
    createComponentColorModel(sampleModel);
origin: fr.avianey.apache-xmlgraphics/batik

  public RenderedImage decodeAsRenderedImage(int page) throws IOException {
    if (page != 0) {
      throw new IOException(PropertyUtil.getString("PNGImageDecoder19"));
    }
    return new PNGImage(input, (PNGDecodeParam)param);
  }
}
origin: apache/batik

private void decodeImage(boolean useInterlacing) {
  if (!useInterlacing) {
    decodePass(theTile, 0, 0, 1, 1, width, height);
  } else {
    decodePass(theTile, 0, 0, 8, 8, (width + 7)/8, (height + 7)/8);
    decodePass(theTile, 4, 0, 8, 8, (width + 3)/8, (height + 7)/8);
    decodePass(theTile, 0, 4, 4, 8, (width + 3)/4, (height + 3)/8);
    decodePass(theTile, 2, 0, 4, 4, (width + 1)/4, (height + 3)/4);
    decodePass(theTile, 0, 2, 2, 4, (width + 1)/2, (height + 1)/4);
    decodePass(theTile, 1, 0, 2, 2, width/2, (height + 1)/2);
    decodePass(theTile, 0, 1, 1, 2, width, height/2);
  }
}
origin: apache/batik

String chunkType = getChunkType(distream);
if (chunkType.equals("IHDR")) {
  chunk = readChunk(distream);
  parse_IHDR_chunk(chunk);
} else if (chunkType.equals("PLTE")) {
  chunk = readChunk(distream);
  parse_PLTE_chunk(chunk);
} else if (chunkType.equals("IDAT")) {
  chunk = readChunk(distream);
  streamVec.add(new ByteArrayInputStream(chunk.getData()));
} else if (chunkType.equals("IEND")) {
  chunk = readChunk(distream);
  parse_IEND_chunk(chunk);
  break; // fall through to the bottom
} else if (chunkType.equals("bKGD")) {
  chunk = readChunk(distream);
  parse_bKGD_chunk(chunk);
} else if (chunkType.equals("cHRM")) {
  chunk = readChunk(distream);
  parse_cHRM_chunk(chunk);
} else if (chunkType.equals("gAMA")) {
  chunk = readChunk(distream);
  parse_gAMA_chunk(chunk);
} else if (chunkType.equals("hIST")) {
  chunk = readChunk(distream);
  parse_hIST_chunk(chunk);
} else if (chunkType.equals("iCCP")) {
  chunk = readChunk(distream);
  parse_iCCP_chunk(chunk);
origin: org.apache.xmlgraphics/batik-codec

createRaster(passWidth, 1, inputBands,
       eltsPerRow,
       bitDepth);
  break;
case PNG_FILTER_SUB:
  decodeSubFilter(curr, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_UP:
  decodeUpFilter(curr, prior, bytesPerRow);
  break;
case PNG_FILTER_AVERAGE:
  decodeAverageFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
case PNG_FILTER_PAETH:
  decodePaethFilter(curr, prior, bytesPerRow, bytesPerPixel);
  break;
default:
processPixels(postProcess,
       passRow, imRas, xOffset, xStep, dstY, passWidth);
origin: org.apache.xmlgraphics/batik-codec

  (depth == 16) ? (bytesPerRow/2) : bytesPerRow;
theTile = createRaster(width, height, outputBands,
            scanlineStride,
            depth);
  initGammaLut(bitDepth);
  initGrayLut(bitDepth);
decodeImage(interlaceMethod == 1);
sampleModel = theTile.getSampleModel();
} else {
  colorModel =
    createComponentColorModel(sampleModel);
origin: org.apache.xmlgraphics/batik-codec

  public RenderedImage decodeAsRenderedImage(int page) throws IOException {
    if (page != 0) {
      throw new IOException(PropertyUtil.getString("PNGImageDecoder19"));
    }
    return new PNGImage(input, (PNGDecodeParam)param);
  }
}
origin: org.apache.xmlgraphics/batik-codec

private void decodeImage(boolean useInterlacing) {
  if (!useInterlacing) {
    decodePass(theTile, 0, 0, 1, 1, width, height);
  } else {
    decodePass(theTile, 0, 0, 8, 8, (width + 7)/8, (height + 7)/8);
    decodePass(theTile, 4, 0, 8, 8, (width + 3)/8, (height + 7)/8);
    decodePass(theTile, 0, 4, 4, 8, (width + 3)/4, (height + 3)/8);
    decodePass(theTile, 2, 0, 4, 4, (width + 1)/4, (height + 3)/4);
    decodePass(theTile, 0, 2, 2, 4, (width + 1)/2, (height + 1)/4);
    decodePass(theTile, 1, 0, 2, 2, width/2, (height + 1)/2);
    decodePass(theTile, 0, 1, 1, 2, width, height/2);
  }
}
origin: apache/batik

  public RenderedImage decodeAsRenderedImage(int page) throws IOException {
    if (page != 0) {
      throw new IOException(PropertyUtil.getString("PNGImageDecoder19"));
    }
    return new PNGImage(input, (PNGDecodeParam)param);
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

private void decodeImage(boolean useInterlacing) {
  if (!useInterlacing) {
    decodePass(theTile, 0, 0, 1, 1, width, height);
  } else {
    decodePass(theTile, 0, 0, 8, 8, (width + 7)/8, (height + 7)/8);
    decodePass(theTile, 4, 0, 8, 8, (width + 3)/8, (height + 7)/8);
    decodePass(theTile, 0, 4, 4, 8, (width + 3)/4, (height + 3)/8);
    decodePass(theTile, 2, 0, 4, 4, (width + 1)/4, (height + 3)/4);
    decodePass(theTile, 0, 2, 2, 4, (width + 1)/2, (height + 1)/4);
    decodePass(theTile, 1, 0, 2, 2, width/2, (height + 1)/2);
    decodePass(theTile, 0, 1, 1, 2, width, height/2);
  }
}
org.apache.batik.ext.awt.image.codec.pngPNGImage

Javadoc

TO DO: zTXt chunks

Most used methods

  • <init>
  • createComponentColorModel
    A convenience method to create an instance ofComponentColorModel suitable for use with the given Sam
  • createRaster
  • decodeAverageFilter
  • decodeImage
  • decodePaethFilter
  • decodePass
    Reads in an image of a given size and returns it as a WritableRaster.
  • decodeSubFilter
  • decodeUpFilter
  • getChunkType
  • initGammaLut
  • initGrayLut
  • initGammaLut,
  • initGrayLut,
  • parse_IEND_chunk,
  • parse_IHDR_chunk,
  • parse_PLTE_chunk,
  • parse_bKGD_chunk,
  • parse_cHRM_chunk,
  • parse_gAMA_chunk,
  • parse_hIST_chunk,
  • parse_iCCP_chunk

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JPanel (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now