Re: help,ImageIO
- From: Thomas Weidenfeller <nobody@xxxxxxxxxxxxxxxx>
- Date: Wed, 25 Oct 2006 15:35:05 +0200
Subha wrote:
I'm dynamiclly creating image files through screenshot utility of
java(prog name:- Test_ScreenShot.java) and saving
them in memory sequentially(pic0.jpg,pic1.jpg....etc).Simultaneously
I'm accessing the saved files from another
This statement doesn't make much sense (well, most of what you write doesn't make much sense to me ...).
Above you claim you write the data to memory, while at the same time you claim you write it to a file, or to several files. What is it what you are doing?
independent application(Prog name:- Test_Main.java) through
piping(executing the application like this "Java
Test_ScreenShot|Java Test_Main").The application is in infinite
loop.I'm using Version JDK 1.5
And here you claim variant number three, writing the data to standard out. Again, what is it what you are really doing?
I use java ImageIO to read and write image:-
My application was running well for days.But now I'm getting sudden
exceptions.
So something changed. The code or the environment. So what did recently change?
I got an excepton while trying to save an dynamically generated image
file in the local memory using the ImageIO
class.In brief I'm getting exactly 3 types of exceptions:-
Well, in general it seems as if you where sloppy in implementing your tools, and don't handle exceptions well. I would guess the first one is the real problem, the others are there, because you didn't handle the first exception correctly.
1)java.io.FileNotFoundException: pic5.jpg (Access is denied)
That one means what it says. Check if you have the necessary rights.
/* Robot robot = new Robot();
BufferedImage image = robot.createScreenCapture(screenRect);
// save captured image to jpg file
ImageIO.write(image, "jpg", new File(outFileName));*/
And we now have to guess how you do your exception handling? Well, I have enough, maybe others can guess more.
/Thomas
--
The comp.lang.java.gui FAQ:
http://gd.tuwien.ac.at/faqs/faqs-hierarchy/comp/comp.lang.java.gui/
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
.
- Follow-Ups:
- Re: help,ImageIO
- From: Subha
- Re: help,ImageIO
- References:
- help,ImageIO
- From: Subha
- help,ImageIO
- Prev by Date: Re: Can not figure out what I am doing wrong
- Next by Date: load properties from xml into objects
- Previous by thread: help,ImageIO
- Next by thread: Re: help,ImageIO
- Index(es):
Relevant Pages
|