public void merge(String nameI, String nameO) {
        float[][] data = new float[0][0];
        int size = 0;

        try {
            DataInputStream dis = new DataInputStream(new BufferedInputStream(new FileInputStream(nameI)));
            size = dis.readInt();
            data = new float[size][size];

            for (int i = 0; i < size; i++) {
                for (int j = 0; j < size; j++) {
                    data[i][j] = dis.readFloat();
                }
            }
            dis.close();
        } catch (FileNotFoundException ex) {
        } catch (IOException ex) {
        }

        BufferedImage outputImage = new BufferedImage(size, size, BufferedImage.TYPE_4BYTE_ABGR);

        int color;
        for (int i = 0; i < size; i++) {
            for (int j = 0; j < size; j++) {
                color = (int) data[i][j];
                outputImage.setRGB(i, j, color);
            }
        }

        try {
            ImageIO.write(outputImage, "png", new File(nameO));
        } catch (IOException ex) {
        }
    }