Hi I am trying to get path of BufferedImage but how to get path of that loaded image i don't know. I am fetching image from Stack<>. one by one image fetched from it when user click on next button. image changed using pop() method of stack.
code :
Stack<File> pictures ;
final JFileChooser file;
file = new JFileChooser();
file.setCurrentDirectory(dir);
file.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
file.showOpenDialog(panel);
String path = file.getSelectedFile().getAbsolutePath();
System.out.println(path);
pictures= getFilesInFolder(path.toString());
a=ImageIO.read(pictures.pop().getAbsoluteFile());
here a
is Buffered Image instance.
now i want whole path of image that loaded in a
.
anyone guide me ?