?? imageutil.java
字號:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
package mwt.midp2;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import mwt.Skin;
public final class ImageUtil extends Skin
{
public static final Skin createSkin(Image aimage[], int i)
{
Image aimage1[];
// int j;
Image image1;
// int l;
if(i == 0)
return new ImageUtil(aimage, 0);
if(aimage.length != 9)
throw new IllegalArgumentException();
aimage1 = new Image[9];
System.arraycopy(aimage, 0, aimage1, 0, 9);
// j = 0;
//// goto _L1
//_L6:
// j = 4;
//_L1:
// if(aimage1[j].getWidth() == i)
// break MISSING_BLOCK_LABEL_120;
// image1 = aimage1[j];
// aimage1[j] = Image.createImage(i, image1.getHeight());
// alphaPrepare(aimage1[j]);
//// 0;
//_L4:
//// JVM INSTR dup ;
//// l;
//// i;
//// JVM INSTR icmpge 113;
//// goto _L2 _L3
//_L2:
// aimage1[j].getGraphics().drawImage(image1, l, 0, 0);
//// l + image1.getWidth();
//// goto _L4
//_L3:
// alphaProcess(aimage1[j]);
//// if(j != 4) goto _L6; else goto _L5
//_L5:
// j = 6;
// goto _L7
//_L12:
// j = 2;
//_L7:
// if(aimage1[j].getHeight() == i)
// break MISSING_BLOCK_LABEL_209;
// image1 = aimage1[j];
// aimage1[j] = Image.createImage(image1.getWidth(), i);
// alphaPrepare(aimage1[j]);
// 0;
//_L10:
// JVM INSTR dup ;
// l;
// i;
// JVM INSTR icmpge 202;
// goto _L8 _L9
//_L8:
// aimage1[j].getGraphics().drawImage(image1, 0, l, 0);
// l + image1.getHeight();
// goto _L10
//_L9:
// alphaProcess(aimage1[j]);
// if(j != 2) goto _L12; else goto _L11
//_L11:
// Image image;
// if((image = aimage1[8]).getWidth() == i && image.getHeight() == i)
// break MISSING_BLOCK_LABEL_330;
// aimage1[8] = Image.createImage(i, i);
// alphaPrepare(aimage1[8]);
// 0;
//_L18:
// JVM INSTR dup ;
// int k;
// k;
// aimage1[8].getWidth();
// JVM INSTR icmpge 322;
// goto _L13 _L14
//_L13:
// 0;
//_L17:
// JVM INSTR dup ;
// l;
// aimage1[8].getHeight();
// JVM INSTR icmpge 312;
// goto _L15 _L16
//_L15:
// aimage1[8].getGraphics().drawImage(image, k, l, 0);
// l + image.getHeight();
// goto _L17
//_L16:
// k + image.getWidth();
// goto _L18
//_L14:
// alphaProcess(aimage1[8]);
return new ImageUtil(aimage1, 0);
}
private ImageUtil(Image aimage[], int i)
{
// super(aimage, i);
}
protected final Image createBuffer(int i, int j)
{
Image image;
alphaPrepare(image = Image.createImage(i, j));
paint(image.getGraphics(), i, j);
alphaProcess(image);
return image;
}
public static final int[] imageResize(int ai[], int i, int j)
{
int k = ai.length / i;
int l;
int ai1[] = new int[(l = (j * k) / i) * j];
for(int i1 = 0; i1 < j; i1++)
{
int j1 = (i1 * i) / j;
int k1 = l * i1;
int l1 = k * j1;
for(int i2 = 0; i2 < l; i2++)
ai1[k1 + i2] = ai[l1 + (i2 * k) / l];
}
return ai1;
}
public static final Image imageResize(Image image, int i)
{
int ai[] = new int[image.getWidth() * image.getHeight()];
image.getRGB(ai, 0, image.getWidth(), 0, 0, image.getWidth(), image.getHeight());
int ai1[];
int j = (ai1 = imageResize(ai, image.getHeight(), i)).length / i;
return Image.createRGBImage(ai1, j, i, true);
}
public static final void imageColor(int ai[], int i)
{
int j = (i & 0xff0000) >> 16;
int k = (i & 0xff00) >> 8;
int l = (i & 0xff) >> 0;
for(int i1 = 0; i1 < ai.length; i1++)
{
int j1 = (ai[i1] & 0xff000000) >> 24;
int k1 = (ai[i1] & 0xff) >> 0;
ai[i1] = j1 << 24 | (k1 * j) / 255 << 16 | (k1 * k) / 255 << 8 | (k1 * l) / 255;
}
}
public static final Image imageColor(Image image, int i)
{
int ai[] = new int[image.getWidth() * image.getHeight()];
image.getRGB(ai, 0, image.getWidth(), 0, 0, image.getWidth(), image.getHeight());
imageColor(ai, i);
return Image.createRGBImage(ai, image.getWidth(), image.getHeight(), true);
}
public static final void alphaPrepare(Image image)
{
Graphics g;
(g = image.getGraphics()).setColor(0xff00ff);
g.fillRect(0, 0, image.getWidth(), image.getHeight());
}
public static final Image alphaProcess(Image image)
{
int ai[] = new int[image.getWidth() * image.getHeight()];
image.getRGB(ai, 0, image.getWidth(), 0, 0, image.getWidth(), image.getHeight());
alphaProcess(ai);
return Image.createRGBImage(ai, image.getWidth(), image.getHeight(), true);
}
public static final void alphaProcess(int ai[])
{
int i = 0;
//_L6:
// if(i >= ai.length) goto _L2; else goto _L1
//_L1:
// int j;
// j = (ai[i] & 0xff0000) >> 16;
// int k = (ai[i] & 0xff00) >> 8;
// int l = (ai[i] & 0xff) >> 0;
// if(j != l || k != 0)
// continue; /* Loop/switch isn't completed */
// if(j != 255) goto _L4; else goto _L3
//_L3:
// ai;
// i;
// 0;
// goto _L5
////_L4:
//// ai;
//// i;
//// 255 - j << 24 | j << 16 | j << 8 | j;
////_L5:
//// JVM INSTR iastore ;
//// i++;
// goto _L6
//_L2:
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -