A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
how to open an image by giving path?
Joined: Apr 13, 2008
Apr 16, 2008 22:37:00
I wrote a program where I get the pixel data from a gif image. for loading the image and getting an image object, i used this statement.
URL url = new URL("http://www.wizard.ca/pics/all_roads_desktop_800x600.gif");
Image m_image= Toolkit.getDefaultToolkit().getImage(url);
Is there any other way by which i can create an image object just by giving general path like "d:\pictures\all_roads_desktop_800x600.gif" instead of an url?
Joined: Mar 22, 2005
Apr 16, 2008 23:22:00
The usual way to opening image files is the javax.imageio.ImageIO.read method, which returns a
Ping & DNS, my free Android app for network diagnostics
I agree. Here's the link:
subject: how to open an image by giving path?
Getting absolute path of image file
Sending image from servlet using standard java io
width and height using image object
request.getHeader() return value ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014