-
Notifications
You must be signed in to change notification settings - Fork 3
Description
`Foscam camera = new Foscam(ip.add.here, 88, username, password);
System.out.println("CHECKING.." + camera.getName());
String ret = camera.snapPicture();
FileOutputStream fout = new FileOutputStream("testfoscam.jpg");
byte[] rawBytes = ret.getBytes();
fout.write( rawBytes , 0, rawBytes.length );
fout.close();`
............................................................................................................................................................
OUTPUT>
CHECKING..FI9800P
............................................................................................................................................................
The output shows name of the camera . But the file foscam.jpg "can not be opened" since its damaged.
Also, I tried retrieving the picture as bufferedImage but it came out as null. The ImageIO can not decipher the bytes!
Maven:
foscamlib-mvn-repo https://raw.github.com/hypothermic/foscamapi/mvn-repo/ nl.hypothermic foscamlib 1.08-RELEASEThere is something wrong with the snapPicture() bytes
Q)
-
How to convert snapPicture() to a viewable BufferedImage in the application itself.
-
Is there any way to access the live video itself?
Thanks! Please help. Have been stuck on this since 2 days