public boolean Open(String path)
    {
        try
        {
            FileInputStream open_file = new FileInputStream(path);
            byte fileheader[] = new byte[14];
            byte infoheader[] = new byte[40];
            open_file.read(fileheader);
            open_file.read(infoheader);
            if (fileheader[bf_type] != 0x42 || fileheader[bf_type + 1] != 0x4d)
            {
                open_file.close();
                throw new Exception("Not BMP File");
            }
            this.width = infoheader[bi_width + 3] & 0xff;
            this.width = (this.width << 8) + ((int) infoheader[bi_width + 2] & 0xff);
            this.width = (this.width << 8) + ((int) infoheader[bi_width + 1] & 0xff);
            this.width = (this.width << 8) + ((int) infoheader[bi_width] & 0xff);
            this.height = infoheader[bi_height + 3] & 0xff;
            this.height = (this.height << 8) + ((int) infoheader[bi_height + 2] & 0xff);
            this.height = (this.height << 8) + ((int) infoheader[bi_height + 1] & 0xff);
            this.height = (this.height << 8) + ((int) infoheader[bi_height] & 0xff);
            this.bit_count = infoheader[bi_bitcount];
            int color_byte = this.bit_count == 32 ? 4 : 3;
            int direction = 0;
            if (this.height < 0)
            {
                this.height = -this.height;
                direction = 1;
            }
            this.matrix = new ARGB[this.height][this.width];
            InitColor(ARGB.Black);
            byte argb[] = new byte[color_byte * this.height * this.width];
            open_file.read(argb);
            for (int i = 0; i < this.height; i++)
                for (int j = 0; j < this.width; j++)
                {
                    this.matrix[i][j].SetR(argb[bmp_r + (i * this.height + j) * color_byte]);
                    this.matrix[i][j].SetG(argb[bmp_g + (i * this.height + j) * color_byte]);
                    this.matrix[i][j].SetB(argb[bmp_b + (i * this.height + j) * color_byte]);
                    if (this.bit_count == 32)
                        this.matrix[i][j].SetA(argb[bmp_a + (i * this.height + j) * color_byte]);
                }
            if (direction == 1)
                this.UpToDown();
            open_file.close();
            return true;
        }
        catch (Exception e)
        {
            e.printStackTrace();
            return false;
        }
    }