Tabnine Logo
PNGEncodeParam.isBackgroundSet
Code IndexAdd Tabnine to your IDE (free)

How to use
isBackgroundSet
method
in
org.apache.batik.ext.awt.image.codec.png.PNGEncodeParam

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

origin: org.apache.xmlgraphics/batik-codec

private void writeBKGD() throws IOException {
  if (param.isBackgroundSet()) {
    ChunkStream cs = new ChunkStream("bKGD");
    switch (colorType) {
    case PNG_COLOR_GRAY:
    case PNG_COLOR_GRAY_ALPHA:
      int gray = ((PNGEncodeParam.Gray)param).getBackgroundGray();
      cs.writeShort(gray);
      break;
    case PNG_COLOR_PALETTE:
      int index =
        ((PNGEncodeParam.Palette)param).getBackgroundPaletteIndex();
      cs.writeByte(index);
      break;
    case PNG_COLOR_RGB:
    case PNG_COLOR_RGB_ALPHA:
      int[] rgb = ((PNGEncodeParam.RGB)param).getBackgroundRGB();
      cs.writeShort(rgb[0]);
      cs.writeShort(rgb[1]);
      cs.writeShort(rgb[2]);
      break;
    }
    cs.writeToStream(dataOutput);
    cs.close();
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

private void writeBKGD() throws IOException {
  if (param.isBackgroundSet()) {
    ChunkStream cs = new ChunkStream("bKGD");
    switch (colorType) {
    case PNG_COLOR_GRAY:
    case PNG_COLOR_GRAY_ALPHA:
      int gray = ((PNGEncodeParam.Gray)param).getBackgroundGray();
      cs.writeShort(gray);
      break;
    case PNG_COLOR_PALETTE:
      int index =
        ((PNGEncodeParam.Palette)param).getBackgroundPaletteIndex();
      cs.writeByte(index);
      break;
    case PNG_COLOR_RGB:
    case PNG_COLOR_RGB_ALPHA:
      int[] rgb = ((PNGEncodeParam.RGB)param).getBackgroundRGB();
      cs.writeShort(rgb[0]);
      cs.writeShort(rgb[1]);
      cs.writeShort(rgb[2]);
      break;
    }
    cs.writeToStream(dataOutput);
    cs.close();
  }
}
origin: liuyueyi/quick-media

private void writeBKGD() throws IOException {
  if (param.isBackgroundSet()) {
    ChunkStream cs = new ChunkStream("bKGD");
    switch (colorType) {
    case PNG_COLOR_GRAY:
    case PNG_COLOR_GRAY_ALPHA:
      int gray = ((PNGEncodeParam.Gray)param).getBackgroundGray();
      cs.writeShort(gray);
      break;
    case PNG_COLOR_PALETTE:
      int index =
        ((PNGEncodeParam.Palette)param).getBackgroundPaletteIndex();
      cs.writeByte(index);
      break;
    case PNG_COLOR_RGB:
    case PNG_COLOR_RGB_ALPHA:
      int[] rgb = ((PNGEncodeParam.RGB)param).getBackgroundRGB();
      cs.writeShort(rgb[0]);
      cs.writeShort(rgb[1]);
      cs.writeShort(rgb[2]);
      break;
    }
    cs.writeToStream(dataOutput);
    cs.close();
  }
}
origin: apache/batik

private void writeBKGD() throws IOException {
  if (param.isBackgroundSet()) {
    ChunkStream cs = new ChunkStream("bKGD");
    switch (colorType) {
    case PNG_COLOR_GRAY:
    case PNG_COLOR_GRAY_ALPHA:
      int gray = ((PNGEncodeParam.Gray)param).getBackgroundGray();
      cs.writeShort(gray);
      break;
    case PNG_COLOR_PALETTE:
      int index =
        ((PNGEncodeParam.Palette)param).getBackgroundPaletteIndex();
      cs.writeByte(index);
      break;
    case PNG_COLOR_RGB:
    case PNG_COLOR_RGB_ALPHA:
      int[] rgb = ((PNGEncodeParam.RGB)param).getBackgroundRGB();
      cs.writeShort(rgb[0]);
      cs.writeShort(rgb[1]);
      cs.writeShort(rgb[2]);
      break;
    }
    cs.writeToStream(dataOutput);
    cs.close();
  }
}
org.apache.batik.ext.awt.image.codec.pngPNGEncodeParamisBackgroundSet

Javadoc

Returns true if a 'bKGD' chunk will be output. For API compatibility with JAI 1.0, the superclass defines this method to throw a RuntimeException; accordingly, subclasses must provide their own implementations.

Popular methods of PNGEncodeParam

  • abs
    An abs() function for use by the Paeth predictor.
  • addPrivateChunk
    Adds a private chunk, in binary form, to the list of chunks to be stored with this image.
  • filterRow
    Performs filtering on a row of an image. This method may be overridden in order to provide a custom
  • getChromaticity
    Returns the white point and primary chromaticities in CIE (x, y) space. See the documentation for th
  • getCompressedText
    Returns the text strings to be stored in compressed form with this image as an array of Strings. If
  • getDefaultEncodeParam
    Returns an instance of PNGEncodeParam.Palette,PNGEncodeParam.Gray, or PNGEncodeParam.RGB appropriate
  • getGamma
    Returns the file gamma value for the image. If the file gamma has not previously been set, or has be
  • getICCProfileData
    Returns the ICC profile data to be stored with this image. If the ICC profile has not previously bee
  • getInterlacing
    Returns true if Adam7 interlacing will be used.
  • getModificationTime
    Returns the modification time to be stored with this image. If the bit depth has not previously been
  • getNumPrivateChunks
    Returns the number of private chunks to be written to the output file.
  • getPaletteHistogram
    Returns the palette histogram to be stored with this image. If the histogram has not previously been
  • getNumPrivateChunks,
  • getPaletteHistogram,
  • getPhysicalDimension,
  • getPrivateChunkData,
  • getPrivateChunkType,
  • getSRGBIntent,
  • getSignificantBits,
  • getText,
  • isChromaticitySet

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • From CI to AI: The AI layer in your organization
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