Package jexer.terminal
Class SixelDecoder
- java.lang.Object
-
- jexer.terminal.SixelDecoder
-
public class SixelDecoder extends java.lang.ObjectSixelDecoder parses a buffer of sixel image data into a BufferedImage.
-
-
Constructor Summary
Constructors Constructor Description SixelDecoder(java.lang.String buffer, java.util.HashMap<java.lang.Integer,java.awt.Color> palette, java.awt.Color background, boolean maybeTransparent)Public constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImagegetImage()Get the image.static voidinitializePaletteCGA(java.util.HashMap<java.lang.Integer,java.awt.Color> palette)Initialize a palette with CGA colors.static voidinitializePaletteVT340(java.util.HashMap<java.lang.Integer,java.awt.Color> palette)Initialize a palette with VT340 colors.booleanisTransparent()If true, this image might have transparent pixels.
-
-
-
Constructor Detail
-
SixelDecoder
public SixelDecoder(java.lang.String buffer, java.util.HashMap<java.lang.Integer,java.awt.Color> palette, java.awt.Color background, boolean maybeTransparent)Public constructor.- Parameters:
buffer- the sixel data to parsepalette- palette to use, or null for a private palettebackground- the background color to usemaybeTransparent- if true, transparency in the image will be honored
-
-
Method Detail
-
initializePaletteVT340
public static void initializePaletteVT340(java.util.HashMap<java.lang.Integer,java.awt.Color> palette)
Initialize a palette with VT340 colors.- Parameters:
palette- palette to initialize
-
initializePaletteCGA
public static void initializePaletteCGA(java.util.HashMap<java.lang.Integer,java.awt.Color> palette)
Initialize a palette with CGA colors.- Parameters:
palette- palette to initialize
-
isTransparent
public boolean isTransparent()
If true, this image might have transparent pixels.- Returns:
- whether this image might have transparent pixels
-
getImage
public java.awt.image.BufferedImage getImage()
Get the image.- Returns:
- the sixel data as an image.
-
-