public static void makeCollisionMap(){
        try {
            BufferedImage image = ImageIO.read(new File("map.png"));
            BufferedImage output = new BufferedImage(image.getWidth(),image.getHeight(),BufferedImage.TYPE_INT_ARGB);
            for (int y = 0; y < image.getHeight(); y++) {
                for (int x = 0; x < image.getWidth(); x++) {
                    int  clr   = image.getRGB(x, y);
                    int alpha = (clr >> 24) & 0xFF;
                    if(alpha != 0){
                        output.setRGB(x,y,java.awt.Color.BLACK.getRGB());
                    }
                }
            }
            ImageIO.write(output,"PNG" ,new File("collison_map.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }

    }