public class org.apache.batik.ext.awt.image.rendered.IndexImage
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.batik.ext.awt.image.rendered.IndexImage
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/batik/ext/awt/image/rendered/IndexImage;
static byte[][] computeRGB(int, org.apache.batik.ext.awt.image.rendered.IndexImage$Cube[]);
descriptor: (I[Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;)[[B
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=7, args_size=2
start local 0 start local 1 0: iload 0
newarray 8
astore 2
start local 2 1: iload 0
newarray 8
astore 3
start local 3 2: iload 0
newarray 8
astore 4
start local 4 3: iconst_3
newarray 8
astore 5
start local 5 4: iconst_0
istore 6
start local 6 5: goto 11
6: StackMap locals: int org.apache.batik.ext.awt.image.rendered.IndexImage$Cube[] byte[] byte[] byte[] byte[] int
StackMap stack:
aload 1
iload 6
aaload
aload 5
invokevirtual org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.averageColorRGB:([B)[B
astore 5
7: aload 2
iload 6
aload 5
iconst_0
baload
bastore
8: aload 3
iload 6
aload 5
iconst_1
baload
bastore
9: aload 4
iload 6
aload 5
iconst_2
baload
bastore
10: iinc 6 1
StackMap locals:
StackMap stack:
11: iload 6
iload 0
if_icmplt 6
end local 6 12: iconst_3
anewarray byte[]
astore 6
start local 6 13: aload 6
iconst_0
aload 2
aastore
14: aload 6
iconst_1
aload 3
aastore
15: aload 6
iconst_2
aload 4
aastore
16: aload 6
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 nCubes I
0 17 1 cubes [Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;
1 17 2 r [B
2 17 3 g [B
3 17 4 b [B
4 17 5 rgb [B
5 12 6 i I
13 17 6 result [[B
MethodParameters:
Name Flags
nCubes
cubes
static void logRGB(byte[], byte[], byte[]);
descriptor: ([B[B[B)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=7, args_size=3
start local 0 start local 1 start local 2 0: new java.lang.StringBuffer
dup
bipush 100
invokespecial java.lang.StringBuffer.<init>:(I)V
astore 3
start local 3 1: aload 0
arraylength
istore 4
start local 4 2: iconst_0
istore 5
start local 5 3: goto 7
4: StackMap locals: java.lang.StringBuffer int int
StackMap stack:
new java.lang.StringBuilder
dup
ldc "("
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
iload 5
baload
sipush 128
iadd
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
bipush 44
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
aload 1
iload 5
baload
sipush 128
iadd
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
bipush 44
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
aload 2
iload 5
baload
sipush 128
iadd
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "),"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 6
start local 6 5: aload 3
aload 6
invokevirtual java.lang.StringBuffer.append:(Ljava/lang/String;)Ljava/lang/StringBuffer;
pop
end local 6 6: iinc 5 1
StackMap locals:
StackMap stack:
7: iload 5
iload 4
if_icmplt 4
end local 5 8: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "RGB:"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 4
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
9: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 r [B
0 10 1 g [B
0 10 2 b [B
1 10 3 buff Ljava/lang/StringBuffer;
2 10 4 nColors I
3 8 5 i I
5 6 6 rgbStr Ljava/lang/String;
MethodParameters:
Name Flags
r
g
b
static java.util.List[] createColorList(java.awt.image.BufferedImage);
descriptor: (Ljava/awt/image/BufferedImage;)[Ljava/util/List;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=10, args_size=1
start local 0 0: aload 0
invokevirtual java.awt.image.BufferedImage.getWidth:()I
istore 1
start local 1 1: aload 0
invokevirtual java.awt.image.BufferedImage.getHeight:()I
istore 2
start local 2 2: sipush 4096
anewarray java.util.ArrayList
astore 3
start local 3 3: iconst_0
istore 4
start local 4 4: goto 26
5: StackMap locals: java.awt.image.BufferedImage int int java.util.List[] int
StackMap stack:
iconst_0
istore 5
start local 5 6: goto 24
7: StackMap locals: int
StackMap stack:
aload 0
iload 4
iload 5
invokevirtual java.awt.image.BufferedImage.getRGB:(II)I
ldc 16777215
iand
istore 6
start local 6 8: iload 6
ldc 15728640
iand
bipush 12
iushr
9: iload 6
ldc 61440
iand
bipush 8
iushr
10: ior
11: iload 6
sipush 240
iand
iconst_4
iushr
12: ior
istore 7
start local 7 13: aload 3
iload 7
aaload
astore 8
start local 8 14: aload 8
ifnonnull 19
15: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 8
16: aload 8
new org.apache.batik.ext.awt.image.rendered.IndexImage$Counter
dup
iload 6
invokespecial org.apache.batik.ext.awt.image.rendered.IndexImage$Counter.<init>:(I)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
17: aload 3
iload 7
aload 8
aastore
18: goto 23
19: StackMap locals: int int java.util.List
StackMap stack:
aload 8
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 9
start local 9 20: StackMap locals: java.util.Iterator
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifeq 22
21: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.batik.ext.awt.image.rendered.IndexImage$Counter
iload 6
invokevirtual org.apache.batik.ext.awt.image.rendered.IndexImage$Counter.add:(I)Z
ifeq 20
goto 23
22: StackMap locals:
StackMap stack:
aload 8
new org.apache.batik.ext.awt.image.rendered.IndexImage$Counter
dup
iload 6
invokespecial org.apache.batik.ext.awt.image.rendered.IndexImage$Counter.<init>:(I)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 9 end local 8 end local 7 end local 6 23: StackMap locals: java.awt.image.BufferedImage int int java.util.List[] int int
StackMap stack:
iinc 5 1
StackMap locals:
StackMap stack:
24: iload 5
iload 2
if_icmplt 7
end local 5 25: iinc 4 1
StackMap locals:
StackMap stack:
26: iload 4
iload 1
if_icmplt 5
end local 4 27: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 bi Ljava/awt/image/BufferedImage;
1 28 1 w I
2 28 2 h I
3 28 3 colors [Ljava/util/List;
4 27 4 i_w I
6 25 5 i_h I
8 23 6 rgb I
13 23 7 idx I
14 23 8 v Ljava/util/List;
20 23 9 i Ljava/util/Iterator;
MethodParameters:
Name Flags
bi
static org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[][] convertColorList(java.util.List[]);
descriptor: ([Ljava/util/List;)[[Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Counter;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: iconst_0
anewarray org.apache.batik.ext.awt.image.rendered.IndexImage$Counter
astore 1
start local 1 1: sipush 4096
anewarray org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[]
astore 2
start local 2 2: iconst_0
istore 3
start local 3 3: goto 12
4: StackMap locals: org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[] org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[][] int
StackMap stack:
aload 0
iload 3
aaload
astore 4
start local 4 5: aload 4
ifnonnull 8
6: aload 2
iload 3
aload 1
aastore
7: goto 11
8: StackMap locals: java.util.List
StackMap stack:
aload 4
invokeinterface java.util.List.size:()I
istore 5
start local 5 9: aload 2
iload 3
aload 4
iload 5
anewarray org.apache.batik.ext.awt.image.rendered.IndexImage$Counter
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[]
aastore
10: aload 0
iload 3
aconst_null
aastore
end local 5 end local 4 11: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
12: iload 3
aload 0
arraylength
if_icmplt 4
end local 3 13: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 colors [Ljava/util/List;
1 14 1 EMPTY_COUNTER [Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Counter;
2 14 2 colorTbl [[Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Counter;
3 13 3 i I
5 11 4 cl Ljava/util/List;
9 11 5 nSlots I
MethodParameters:
Name Flags
colors
public static java.awt.image.BufferedImage getIndexedImage(java.awt.image.BufferedImage, int);
descriptor: (Ljava/awt/image/BufferedImage;I)Ljava/awt/image/BufferedImage;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=17, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.awt.image.BufferedImage.getWidth:()I
istore 2
start local 2 1: aload 0
invokevirtual java.awt.image.BufferedImage.getHeight:()I
istore 3
start local 3 2: aload 0
invokestatic org.apache.batik.ext.awt.image.rendered.IndexImage.createColorList:(Ljava/awt/image/BufferedImage;)[Ljava/util/List;
astore 4
start local 4 3: aload 4
invokestatic org.apache.batik.ext.awt.image.rendered.IndexImage.convertColorList:([Ljava/util/List;)[[Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Counter;
astore 5
start local 5 4: aconst_null
astore 4
5: iconst_1
istore 6
start local 6 6: iconst_0
istore 7
start local 7 7: iload 1
anewarray org.apache.batik.ext.awt.image.rendered.IndexImage$Cube
astore 8
start local 8 8: aload 8
iconst_0
new org.apache.batik.ext.awt.image.rendered.IndexImage$Cube
dup
aload 5
iload 2
iload 3
imul
invokespecial org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.<init>:([[Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Counter;I)V
aastore
9: goto 44
10: StackMap locals: java.awt.image.BufferedImage int int int java.util.List[] org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[][] int int org.apache.batik.ext.awt.image.rendered.IndexImage$Cube[]
StackMap stack:
iinc 7 1
11: iload 7
iload 6
if_icmpne 12
goto 13
12: StackMap locals:
StackMap stack:
aload 8
iload 7
aaload
invokevirtual org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.isDone:()Z
ifne 10
13: StackMap locals:
StackMap stack:
iload 7
iload 6
if_icmpne 15
14: goto 45
15: StackMap locals:
StackMap stack:
aload 8
iload 7
aaload
astore 9
start local 9 16: aload 9
invokevirtual org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.split:()Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;
astore 10
start local 10 17: aload 10
ifnull 44
18: aload 10
getfield org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.count:I
aload 9
getfield org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.count:I
if_icmple 21
19: aload 9
astore 11
start local 11 20: aload 10
astore 9
aload 11
astore 10
end local 11 21: StackMap locals: org.apache.batik.ext.awt.image.rendered.IndexImage$Cube org.apache.batik.ext.awt.image.rendered.IndexImage$Cube
StackMap stack:
iload 7
istore 11
start local 11 22: aload 9
getfield org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.count:I
istore 12
start local 12 23: iload 7
iconst_1
iadd
istore 13
start local 13 24: goto 29
25: StackMap locals: int int int
StackMap stack:
aload 8
iload 13
aaload
getfield org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.count:I
iload 12
if_icmpge 27
26: goto 30
27: StackMap locals:
StackMap stack:
aload 8
iload 11
iinc 11 1
aload 8
iload 13
aaload
aastore
28: iinc 13 1
StackMap locals:
StackMap stack:
29: iload 13
iload 6
if_icmplt 25
end local 13 30: StackMap locals:
StackMap stack:
aload 8
iload 11
iinc 11 1
aload 9
aastore
31: aload 10
getfield org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.count:I
istore 12
32: goto 36
33: StackMap locals:
StackMap stack:
aload 8
iload 11
aaload
getfield org.apache.batik.ext.awt.image.rendered.IndexImage$Cube.count:I
iload 12
if_icmpge 35
34: goto 37
35: StackMap locals:
StackMap stack:
iinc 11 1
36: StackMap locals:
StackMap stack:
iload 11
iload 6
if_icmplt 33
37: StackMap locals:
StackMap stack:
iload 6
istore 13
start local 13 38: goto 41
39: StackMap locals: int
StackMap stack:
aload 8
iload 13
aload 8
iload 13
iconst_1
isub
aaload
aastore
40: iinc 13 -1
StackMap locals:
StackMap stack:
41: iload 13
iload 11
if_icmpgt 39
end local 13 42: aload 8
iload 11
iinc 11 1
aload 10
aastore
43: iinc 6 1
end local 12 end local 11 end local 10 end local 9 44: StackMap locals: java.awt.image.BufferedImage int int int java.util.List[] org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[][] int int org.apache.batik.ext.awt.image.rendered.IndexImage$Cube[]
StackMap stack:
iload 6
iload 1
if_icmplt 12
45: StackMap locals:
StackMap stack:
iload 6
aload 8
invokestatic org.apache.batik.ext.awt.image.rendered.IndexImage.computeRGB:(I[Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;)[[B
astore 9
start local 9 46: new java.awt.image.IndexColorModel
dup
bipush 8
iload 6
aload 9
iconst_0
aaload
aload 9
iconst_1
aaload
aload 9
iconst_2
aaload
invokespecial java.awt.image.IndexColorModel.<init>:(II[B[B[B)V
astore 10
start local 10 47: new java.awt.image.BufferedImage
dup
48: iload 2
iload 3
bipush 13
aload 10
49: invokespecial java.awt.image.BufferedImage.<init>:(IIILjava/awt/image/IndexColorModel;)V
astore 11
start local 11 50: aload 11
invokevirtual java.awt.image.BufferedImage.createGraphics:()Ljava/awt/Graphics2D;
astore 12
start local 12 51: aload 12
52: getstatic java.awt.RenderingHints.KEY_DITHERING:Ljava/awt/RenderingHints$Key;
53: getstatic java.awt.RenderingHints.VALUE_DITHER_ENABLE:Ljava/lang/Object;
54: invokevirtual java.awt.Graphics2D.setRenderingHint:(Ljava/awt/RenderingHints$Key;Ljava/lang/Object;)V
55: aload 12
aload 0
iconst_0
iconst_0
aconst_null
invokevirtual java.awt.Graphics2D.drawImage:(Ljava/awt/Image;IILjava/awt/image/ImageObserver;)Z
pop
56: aload 12
invokevirtual java.awt.Graphics2D.dispose:()V
57: iconst_1
istore 13
start local 13 58: goto 61
59: StackMap locals: java.awt.image.BufferedImage int int int java.util.List[] org.apache.batik.ext.awt.image.rendered.IndexImage$Counter[][] int int org.apache.batik.ext.awt.image.rendered.IndexImage$Cube[] byte[][] java.awt.image.IndexColorModel java.awt.image.BufferedImage java.awt.Graphics2D int
StackMap stack:
iconst_1
iload 13
ishl
iload 6
if_icmplt 60
goto 62
60: StackMap locals:
StackMap stack:
iinc 13 1
StackMap locals:
StackMap stack:
61: iload 13
bipush 8
if_icmple 59
62: StackMap locals:
StackMap stack:
iload 13
iconst_4
if_icmple 64
63: aload 11
areturn
64: StackMap locals:
StackMap stack:
iload 13
iconst_3
if_icmpne 65
iconst_4
istore 13
65: StackMap locals:
StackMap stack:
new java.awt.image.IndexColorModel
dup
iload 13
iload 6
66: aload 9
iconst_0
aaload
aload 9
iconst_1
aaload
aload 9
iconst_2
aaload
67: invokespecial java.awt.image.IndexColorModel.<init>:(II[B[B[B)V
astore 14
start local 14 68: new java.awt.image.MultiPixelPackedSampleModel
dup
iconst_0
iload 2
iload 3
iload 13
invokespecial java.awt.image.MultiPixelPackedSampleModel.<init>:(IIII)V
astore 15
start local 15 69: aload 15
new java.awt.Point
dup
iconst_0
iconst_0
invokespecial java.awt.Point.<init>:(II)V
invokestatic java.awt.image.Raster.createWritableRaster:(Ljava/awt/image/SampleModel;Ljava/awt/Point;)Ljava/awt/image/WritableRaster;
astore 16
start local 16 70: aload 11
astore 0
71: new java.awt.image.BufferedImage
dup
aload 14
aload 16
aload 0
invokevirtual java.awt.image.BufferedImage.isAlphaPremultiplied:()Z
aconst_null
invokespecial java.awt.image.BufferedImage.<init>:(Ljava/awt/image/ColorModel;Ljava/awt/image/WritableRaster;ZLjava/util/Hashtable;)V
astore 11
72: aload 0
aload 11
invokestatic org.apache.batik.ext.awt.image.GraphicsUtil.copyData:(Ljava/awt/image/BufferedImage;Ljava/awt/image/BufferedImage;)V
73: aload 11
areturn
end local 16 end local 15 end local 14 end local 13 end local 12 end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 74 0 bi Ljava/awt/image/BufferedImage;
0 74 1 nColors I
1 74 2 w I
2 74 3 h I
3 74 4 colors [Ljava/util/List;
4 74 5 colorTbl [[Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Counter;
6 74 6 nCubes I
7 74 7 fCube I
8 74 8 cubes [Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;
16 44 9 c Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;
17 44 10 nc Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;
20 21 11 tmp Lorg/apache/batik/ext/awt/image/rendered/IndexImage$Cube;
22 44 11 j I
23 44 12 cnt I
24 30 13 i I
38 42 13 i I
46 74 9 rgbTbl [[B
47 74 10 icm Ljava/awt/image/IndexColorModel;
50 74 11 indexed Ljava/awt/image/BufferedImage;
51 74 12 g2d Ljava/awt/Graphics2D;
58 74 13 bits I
68 74 14 cm Ljava/awt/image/ColorModel;
69 74 15 sm Ljava/awt/image/SampleModel;
70 74 16 ras Ljava/awt/image/WritableRaster;
MethodParameters:
Name Flags
bi
nColors
}
SourceFile: "IndexImage.java"
NestMembers:
org.apache.batik.ext.awt.image.rendered.IndexImage$Counter org.apache.batik.ext.awt.image.rendered.IndexImage$Cube
InnerClasses:
public abstract Key = java.awt.RenderingHints$Key of java.awt.RenderingHints
private Counter = org.apache.batik.ext.awt.image.rendered.IndexImage$Counter of org.apache.batik.ext.awt.image.rendered.IndexImage
private Cube = org.apache.batik.ext.awt.image.rendered.IndexImage$Cube of org.apache.batik.ext.awt.image.rendered.IndexImage