public static BufferedImage encodeMessage(BufferedImage img, String inputFilePath) {
        //foto omzetten naar een byte array
        byte bImg[] = getBytes(img);
        // byte gegevensopslaan en uitlezen
        byte[] block = null;
        int bLen = 0;
        
        try {
            final File inputFile = new File(inputFilePath);
            final InputStream inputStream = new BufferedInputStream(new FileInputStream(inputFile));

            final long nbBytesFile = inputFile.length();

            if (nbBytesFile > (long) Integer.MAX_VALUE) {
                throw new Exception("File to big.");
            } else {
                bLen = (int) nbBytesFile;
                block = new byte[bLen];
            }

            inputStream.read(block);
            ConsoleHelper.append("Encoding file with: " + nbBytesFile + " bytes");

            inputStream.close();
            
            ConsoleHelper.append("Encoding header");
            addText(bImg, getBytes(bLen), 0);
            ConsoleHelper.append("Encoding file");
            addText(bImg, block, 32);
        
        } catch (Exception ex) {
            ConsoleHelper.appendError(ex.getMessage());
        }
        
        return img;
    }