private void launch() {
        try {
            BufferedImage inputImage = ImageIO.read(new File(inputFile));
            widthInPieces = inputImage.getWidth() / pieceSize;
            heightInPieces = inputImage.getHeight() / pieceSize;
            if ((widthInPieces * pieceSize + 1) > inputImage.getWidth()) {
                widthInPieces -= 1;
            }
            if ((heightInPieces * pieceSize + 1) > inputImage.getHeight()) {
                heightInPieces -= 1;
            }

//            System.out.println(inputImage.);
//            widthInPieces = 3;
//            heightInPieces = 3;

            File dir = new File(outputLocation + "/" + outputDirectory);
            dir.mkdirs();

            BufferedImage outputImage;// = new BufferedImage(pieceSize + 1, pieceSize + 1, BufferedImage.TYPE_4BYTE_ABGR);
            for (int i = 0, ik = -widthInPieces / 2; i < widthInPieces; i++, ik++) {
                for (int j = 0, jk = -heightInPieces / 2; j < heightInPieces; j++, jk++) {
                    outputImage = inputImage.getSubimage(i * pieceSize, j * pieceSize, pieceSize + 1, pieceSize + 1);
                    ImageIO.write(outputImage, "png", new File(outputLocation + "/" + outputDirectory + "/" + outputFile + ik + "_" + jk + ".png"));
                }
            }

        } catch (IOException e) {
            System.out.println("error");
        }
    }