Tabnine Logo
PNGEncodeParam$RGB.getBackgroundRGB
Code IndexAdd Tabnine to your IDE (free)

How to use
getBackgroundRGB
method
in
org.apache.batik.ext.awt.image.codec.png.PNGEncodeParam$RGB

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

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();
  }
}
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: 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: 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();
  }
}
org.apache.batik.ext.awt.image.codec.pngPNGEncodeParam$RGBgetBackgroundRGB

Javadoc

Returns the RGB value of the suggested background color.

If the background color has not previously been set, or has been unset, an IllegalStateException will be thrown.

Popular methods of PNGEncodeParam$RGB

  • <init>
    Constructs an instance of PNGEncodeParam.RGB.
  • getTransparentRGB
    Returns the RGB value to be used to denote transparency. If the transparent color has not previously
  • setBackgroundRGB
    Sets the RGB value of the suggested background color. The rgb parameter should have 3 entries. The '
  • setTransparentRGB
    Sets the RGB value to be used to denote transparency. Setting this attribute will cause the alpha ch

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 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