Fix local location reading.
This commit is contained in:
parent
2e03a7591a
commit
05e886c61b
@ -143,8 +143,12 @@ public class Controller {
|
||||
BufferedImage img = null;
|
||||
if (url.contains("http://projectdivar.com/")) {
|
||||
//System.out.println("Locally available. "+"./"+url.replace("http://projectdivar.com/", ""));
|
||||
f = new File("../../server/"+url.replace("http://projectdivar.com/", ""));
|
||||
img = ImageIO.read(f);
|
||||
/*f = new File("../../server/"+url.replace("http://projectdivar.com/", ""));
|
||||
img = ImageIO.read(f);*/
|
||||
img = ImageIO.read(new URL(url));
|
||||
img = ImageIO.read(new URL(url));
|
||||
f = new File("temp.png");
|
||||
ImageIO.write(img,"png",f);
|
||||
} else {
|
||||
/*downloadFileFromUrl(url,"temp");
|
||||
//BufferedImage img = ImageUtils.toBufferedImage(ImageIO.read(new File("temp")).getScaledInstance(1227, 690, Image.SCALE_SMOOTH));
|
||||
|
Loading…
x
Reference in New Issue
Block a user