import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javafx.event.ActionEvent;
import javafx.scene.image.Image;

import javax.imageio.ImageIO;
public class Loader{

	
	//private Image image;
	private String path;
	private BufferedImage bufferedImage;

	Loader (String uri) {
		if (uri == null){
			System.out.print("Chyba - loader");
			return;
		}
		
		path = uri;
		loadImage();
	}

	public BufferedImage getBufferedImage(){
		return bufferedImage;

	}
	
	private void loadImage(){
		try {
			File f = new File(path);
			bufferedImage = ImageIO.read(f);
			//bufferedImage = ImageIO.read(new File(path));
		} catch (IOException e) {
			System.out.print("Chyba v nacitani");
		}
	}
	
	public String getPath () {
		return path;
	}
	
}
