Hi right now I have the following method I am using to read one file at a time in a the same directory as the class that has this method:
private byte[][] getDoubleByteArrayOfFile(String fileName, Region region) throws IOException { BufferedImage image = ImageIO.read(getClass().getResource(fileName)); byte[][] alphaInputData = new byte[region.getInputXAxisLength()][region.getInputYAxisLength()]; for (int x = 0; x < alphaInputData.length; x++) { for (int y = 0; y < alphaInputData[x].length; y++) { int color = image.getRGB(x, y); alphaInputData[x][y] = (byte)(color >> 23); } } return alphaInputData; } I was wondering how I can make it so that instead of having "fileName" as a argument I can but a directory name as a argument and then iterate through all of the files within that directory and perform the same operation on it. Thanks!
regionbe the same for each file?