// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   Class16.java

package pack4;

import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.nio.ByteBuffer;
import pack1.Class13;

public class Class16
{

    public Class16()
    {
        aString109 = Class13.method344(1778);
        anInt110 = -1;
        anInt112 = 0;
        anInt113 = 0;
        anInt114 = 0;
        anInt115 = 0;
        anIntArray106 = new int[0];
        anInt107 = 0;
        anInt108 = 0;
    }

    public Class16(int ai[], int i, int j)
    {
        aString109 = Class13.method344(1778);
        anInt110 = -1;
        anInt112 = 0;
        anInt113 = 0;
        anInt114 = 0;
        anInt115 = 0;
        anIntArray106 = ai;
        anInt107 = i;
        anInt108 = j;
    }

    public void method350(int i, int j)
    {
        anInt114 = i;
        anInt115 = j;
    }

    public int method351()
    {
        return anInt114;
    }

    public int method352()
    {
        return anInt115;
    }

    public void method353(int i, int j)
    {
        anInt112 = i;
        anInt113 = j;
    }

    public void method354(boolean flag)
    {
        aBoolean111 = flag;
    }

    public boolean method355()
    {
        return aBoolean111;
    }

    public int method356()
    {
        return anInt112;
    }

    public int method357()
    {
        return anInt113;
    }

    public int[] method358()
    {
        return anIntArray106;
    }

    public int method359()
    {
        return anInt107;
    }

    public int method360()
    {
        return anInt108;
    }

    public String toString()
    {
        return (new StringBuilder()).append(Class13.method344(2024)).append(anInt110).append(Class13.method344(2030)).append(aString109).toString();
    }

    public static Class16 method361(BufferedImage bufferedimage)
    {
        int ai[] = new int[bufferedimage.getWidth() * bufferedimage.getHeight()];
        for(int i = 0; i < bufferedimage.getHeight(); i++)
        {
            for(int j = 0; j < bufferedimage.getWidth(); j++)
            {
                int k = bufferedimage.getRGB(j, i);
                if(k == anInt105)
                    k = 0;
                ai[j + i * bufferedimage.getWidth()] = k;
            }

        }

        return new Class16(ai, bufferedimage.getWidth(), bufferedimage.getHeight());
    }

    public static Class16 method362(ByteBuffer bytebuffer)
    {
        if(bytebuffer.remaining() < 25)
            throw new IOException(Class13.method344(16597));
        int i = bytebuffer.getInt();
        int j = bytebuffer.getInt();
        boolean flag = bytebuffer.get() == 1;
        int k = bytebuffer.getInt();
        int l = bytebuffer.getInt();
        int i1 = bytebuffer.getInt();
        int j1 = bytebuffer.getInt();
        int ai[] = new int[i * j];
        if(bytebuffer.remaining() < ai.length * 4)
            throw new IOException(Class13.method344(16641));
        for(int k1 = 0; k1 < ai.length; k1++)
            ai[k1] = bytebuffer.getInt();

        Class16 class16 = new Class16(ai, i, j);
        class16.method354(flag);
        class16.method353(k, l);
        class16.method350(i1, j1);
        return class16;
    }

    public static int anInt105;
    public int anIntArray106[];
    public int anInt107;
    public int anInt108;
    public String aString109;
    public int anInt110;
    public boolean aBoolean111;
    public int anInt112;
    public int anInt113;
    public int anInt114;
    public int anInt115;

    static 
    {
        anInt105 = Color.BLACK.getRGB();
    }
}
