public void convert(String nameI, String nameO) {
        int width = 0;
        int height = 0;
        float[][] data = new float[0][0];

        try {
            BufferedImage inputImage = ImageIO.read(new File(nameI));

            width = inputImage.getWidth();
            height = inputImage.getHeight();

            data = new float[height][width];

            for (int h = 0; h < height; h++) {
                for (int w = 0; w < width; w++) {
                    data[h][w] = (float) inputImage.getRGB(w, h);
                }
            }
        } catch (IOException ex) {
        }

        try {
            DataOutputStream dos = new DataOutputStream(new FileOutputStream(nameO));
//            dos.write((int) size);
            dos.writeInt(width);
            dos.writeInt(height);
            for (int i = height - 1; i >= 0; i--) {
                for (int j = 0; j < width; j++) {
//                    dos.write((int) heightData[j + (i * imageHeight)]);
                    dos.writeFloat(data[i][j]);
                }
            }
            dos.close();
        } catch (FileNotFoundException e) {
        } catch (IOException e) {
        }
    }