Problem in code to capture image through Enter webcam
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.image.*;
import javax.imageio.*;
import javax.media.*;
import javax.media.control.*;
import javax.media.format.*;
import javax.media.util.*;
public class camHandler{
private CaptureDeviceInfo deviceInfo;
private Player player;
public camHandler() {}
public void ini() {
// Create capture device
this.deviceInfo = CaptureDeviceManager.getDevice("vfw:Microsoft WDM Image Capture (Win32):0");
player = null;
try {
player = Manager.createRealizedPlayer(deviceInfo.getLocator());
catch (CannotRealizeException ex) {
ex.printStackTrace();
catch (NoPlayerException ex) {
ex.printStackTrace();
catch (IOException ex) {
ex.printStackTrace();
player.start();
// Wait a few seconds for camera to initialise (otherwise img==null)
try {
Thread.sleep(2500);
catch (InterruptedException ex1) {
ex1.printStackTrace();
} //init
public BufferedImage capture(String path) {
// Grab a frame from the image device
FrameGrabbingControl frameGrabber = (FrameGrabbingControl) player.
getControl("javax.media.control.FrameGrabbingControl");
Buffer buf = frameGrabber.grabFrame();
// Convert frame to an buffered image so it can be processed and saved
Image img = (new BufferToImage( (VideoFormat) buf.getFormat()).createImage(
buf));
BufferedImage buffImg = new BufferedImage(img.getWidth(null), img.getHeight(null),
BufferedImage.TYPE_INT_RGB);
Graphics2D g = buffImg.createGraphics();
g.drawImage(img, null, null);
// Overlay curent time on image
// Save image to disk as PNG
try {
// ImageIO.write(buffImg, "png", new File(path));
System.out.println("images is saved "+new Date().toString());
catch (Exception ex2) {
return buffImg;
public void closeConn() {
// Stop using webcam
player.close();
player.deallocate();
System.exit(0);
public boolean motion(BufferedImage c, BufferedImage n) {
int crgb, nrgb;
int cav, nav;
for (int i = 0; i < c.getWidth(); i++) {
for (int j = 0; j < c.getHeight(); j++) {
crgb = c.getRGB(i, j);
nrgb = n.getRGB(i, j);
if (crgb != nrgb) {
return true;
return false;
public static void main(String[] args) throws Exception {
BufferedImage current;
camHandler test = new camHandler();
test.ini();
current = test.capture("c:\\webcam.png");
current = test.capture("c:\\webcam.png");
for (int i = 0; i < 30; i++) {
BufferedImage next = test.capture("c:\\webcam"+i+".png");
Thread.sleep(3000);
if (test.motion(current, next)) { // if motion is detected
System.out.println("Motion");
ImageIO.write(next, "png", new File("c:\\next"+i+".png"));
ImageIO.write(next, "png", new File("c:\\current"+i+".png"));
current = next;
test.closeConn();
PROBLEM: this.deviceInfo = CaptureDeviceManager.getDevice("vfw:Microsoft WDM Image Capture (Win32):0");
is returing null because my Web Camera is: Enter USB 2.0 PC CAMERA Model No: E-1.3MPIR
what should i pass inplace of "vfw:Microsoft WDM Image Capture (Win32):0"
this.deviceInfo = CaptureDeviceManager.getDevice("vfw://0");
vfw://0 is the default device. then you havent to know the name of the camera
Regards
- Stefan
Similar Messages
-
Code to capture image through webcam..
hi.. im doing final year engineering.. rite now in project works n so i need a complete code in java to capture image through webcam..
can anybody pls help me in this...
thanks in advance..can anybody suggest me on this coding n get me a full pharse of this program ready for execution....
think tis will b a easiest way to capture an image through webcam...!
INCOMPLETE PROGRAM :
```````````````````````````````````
CaptureDeviceInfo deviceInfo = CaptureDeviceManager.getDevice("vfw:Microsoft WDM Image Capture (Win32):0");
Player player = Manager.createRealizedPlayer(deviceInfo.getLocator());
player.start();
// Wait a few seconds for camera to initialise (otherwise img==null)
Thread.sleep(2000);
//take image from camera
FrameGrabbingControl frameGrabber = (FrameGrabbingControl)player.getControl("javax.media.control.FrameGrabbingControl");
Buffer buf = frameGrabber.grabFrame();
Image img1 = (new BufferToImage((VideoFormat)buf.getFormat()).createImage(buf));
then you can save image as image.jpg into buffer your computer
code:
BufferedImage buffImg = new BufferedImage(img1.getWidth(null), img1.getHeight(null), BufferedImage.TYPE_INT_RGB);
Graphics2D g2D = buffImg.createGraphics();
g2D.drawImage(img1, null, null);
g2D.setColor(Color.RED);
g2D.setFont(new Font("Verdana",Font.BOLD,16));
g2D.drawString((new Date()).toString(),10,25);
g2D.dispose();
ImageIO.write(buffImg,"jpg",new File("../Test/Webcam/Webcam" + " " + Params.Num + ".jpg")); -
Errors in code that captures images from webcam
Here is the code
import javax.swing.*;
import javax.swing.border.*;
import java.io.*;
import javax.media.*;
import javax.media.datasink.*;
import javax.media.format.*;
import javax.media.protocol.*;
import javax.media.util.*;
import javax.media.control.*;
import java.util.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import com.sun.image.codec.jpeg.*;
// import com.sun.media.vfw.VFWCapture; // JMF 2.1.1c version
import com.sun.media.protocol.vfw.VFWCapture; // JMF 2.1.1e version
public class JWebCam extends JFrame
implements WindowListener, ComponentListener
protected final static int MIN_WIDTH = 320;
protected final static int MIN_HEIGHT = 240;
protected static int shotCounter = 1;
protected JLabel statusBar = null;
protected JPanel visualContainer = null;
protected Component visualComponent = null;
protected JToolBar toolbar = null;
protected MyToolBarAction formatButton = null;
protected MyToolBarAction captureButton = null;
protected Player player = null;
protected CaptureDeviceInfo webCamDeviceInfo = null;
protected MediaLocator ml = null;
protected Dimension imageSize = null;
protected FormatControl formatControl = null;
protected VideoFormat currentFormat = null;
protected Format[] videoFormats = null;
protected MyVideoFormat[] myFormatList = null;
protected boolean initialised = false;
* Constructor
public JWebCam ( String frameTitle )
super ( frameTitle );
try
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
catch ( Exception cnfe )
System.out.println ("Note : Cannot load look and feel settings");
setSize ( 320, 260 ); // default size...
addWindowListener ( this );
addComponentListener ( this );
getContentPane().setLayout ( new BorderLayout() );
visualContainer = new JPanel();
visualContainer.setLayout ( new BorderLayout() );
getContentPane().add ( visualContainer, BorderLayout.CENTER );
statusBar = new JLabel ("");
statusBar.setBorder ( new EtchedBorder() );
getContentPane().add ( statusBar, BorderLayout.SOUTH );
* Initialise
* @returns true if web cam is detected
public boolean initialise ( )
throws Exception
return ( initialise ( autoDetect() ) );
* Initialise
* @params _deviceInfo, specific web cam device if not autodetected
* @returns true if web cam is detected
public boolean initialise ( CaptureDeviceInfo _deviceInfo )
throws Exception
statusBar.setText ( "Initialising...");
webCamDeviceInfo = _deviceInfo;
if ( webCamDeviceInfo != null )
statusBar.setText ( "Connecting to : " + webCamDeviceInfo.getName() );
try
setUpToolBar();
getContentPane().add ( toolbar, BorderLayout.NORTH );
ml = webCamDeviceInfo.getLocator();
if ( ml != null )
player = Manager.createRealizedPlayer ( ml );
if ( player != null )
player.start();
formatControl = (FormatControl)player.getControl ( "javax.media.control.FormatControl" );
videoFormats = webCamDeviceInfo.getFormats();
visualComponent = player.getVisualComponent();
if ( visualComponent != null )
visualContainer.add ( visualComponent, BorderLayout.CENTER );
myFormatList = new MyVideoFormat[videoFormats.length];
for ( int i=0; i<videoFormats.length; i++ )
myFormatList = new MyVideoFormat ( (VideoFormat)videoFormats );
Format currFormat = formatControl.getFormat();
if ( currFormat instanceof VideoFormat )
currentFormat = (VideoFormat)currFormat;
imageSize = currentFormat.getSize();
visualContainer.setPreferredSize ( imageSize );
setSize ( imageSize.width, imageSize.height + statusBar.getHeight() + toolbar.getHeight() );
else
System.err.println ("Error : Cannot get current video format");
invalidate();
pack();
return ( true );
else
System.err.println ("Error : Could not get visual component");
return ( false );
else
System.err.println ("Error : Cannot create player");
statusBar.setText ( "Cannot create player" );
return ( false );
else
System.err.println ("Error : No MediaLocator for " + webCamDeviceInfo.getName() );
statusBar.setText ( "No Media Locator for : " + webCamDeviceInfo.getName() );
return ( false );
catch ( IOException ioEx )
statusBar.setText ( "Connecting to : " + webCamDeviceInfo.getName() );
return ( false );
catch ( NoPlayerException npex )
statusBar.setText ("Cannot create player");
return ( false );
catch ( CannotRealizeException nre )
statusBar.setText ( "Cannot realize player");
return ( false );
else
return ( false );
* Dynamically create menu items
* @returns the device info object if found, null otherwise
public void setFormat ( VideoFormat selectedFormat )
if ( formatControl != null )
player.stop();
imageSize = selectedFormat.getSize();
formatControl.setFormat ( selectedFormat );
player.start();
statusBar.setText ( "Format : " + selectedFormat );
currentFormat = selectedFormat;
visualContainer.setPreferredSize ( currentFormat.getSize() );
setSize ( imageSize.width, imageSize.height + statusBar.getHeight() + toolbar.getHeight() );
else
System.out.println ("Visual component not an instance of FormatControl");
statusBar.setText ( "Visual component cannot change format" );
public VideoFormat getFormat ( )
return ( currentFormat );
protected void setUpToolBar ( )
toolbar = new JToolBar();
// Note : If you supply the 16 x 16 bitmaps then you can replace
// the commented line in the MyToolBarAction constructor
formatButton = new MyToolBarAction ( "Resolution", "BtnFormat.jpg" );
captureButton = new MyToolBarAction ( "Capture", "BtnCapture.jpg" );
toolbar.add ( formatButton );
toolbar.add ( captureButton );
getContentPane().add ( toolbar, BorderLayout.NORTH );
protected void toolbarHandler ( MyToolBarAction actionBtn )
if ( actionBtn == formatButton )
Object selected = JOptionPane.showInputDialog (this,
"Select Video format",
"Capture format selection",
JOptionPane.INFORMATION_MESSAGE,
null, // Icon icon,
myFormatList, // videoFormats,
currentFormat );
if ( selected != null )
setFormat ( ((MyVideoFormat)selected).format );
else if ( actionBtn == captureButton )
Image photo = grabFrameImage ( );
if ( photo != null )
MySnapshot snapshot = new MySnapshot ( photo, new Dimension ( imageSize ) );
else
System.err.println ("Error : Could not grab frame");
* autoDetects the first web camera in the system
* searches for video for windows ( vfw ) capture devices
* @returns the device info object if found, null otherwise
public CaptureDeviceInfo autoDetect ( )
Vector list = CaptureDeviceManager.getDeviceList ( null );
CaptureDeviceInfo devInfo = null;
if ( list != null )
String name;
for ( int i=0; i<list.size(); i++ )
devInfo = (CaptureDeviceInfo)list.elementAt ( i );
name = devInfo.getName();
if ( name.startsWith ("vfw:") )
break;
if ( devInfo != null && devInfo.getName().startsWith("vfw:") )
return ( devInfo );
else
for ( int i = 0; i < 10; i++ )
try
name = VFWCapture.capGetDriverDescriptionName ( i );
if (name != null && name.length() > 1)
devInfo = com.sun.media.protocol.vfw.VFWSourceStream.autoDetect ( i );
if ( devInfo != null )
return ( devInfo );
catch ( Exception ioEx )
// ignore errors detecting device
statusBar.setText ( "AutoDetect failed : " + ioEx.getMessage() );
return ( null );
else
return ( null );
* deviceInfo
* @note outputs text information
public void deviceInfo ( )
if ( webCamDeviceInfo != null )
Format[] formats = webCamDeviceInfo.getFormats();
if ( ( formats != null ) && ( formats.length > 0 ) )
for ( int i=0; i<formats.length; i++ )
Format[] aFormat = formats;
if ( aFormat[i] instanceof VideoFormat )
Dimension dim = ((VideoFormat)aFormat).getSize();
// System.out.println ("Video Format " + i + " : " + formats.getEncoding() + ", " + dim.width + " x " + dim.height );
else
System.out.println ("Error : No web cam detected");
* grabs a frame's buffer from the web cam / device
* @returns A frames buffer
public Buffer grabFrameBuffer ( )
if ( player != null )
FrameGrabbingControl fgc = (FrameGrabbingControl)player.getControl ( "javax.media.control.FrameGrabbingControl" );
if ( fgc != null )
return ( fgc.grabFrame() );
else
System.err.println ("Error : FrameGrabbingControl is null");
return ( null );
else
System.err.println ("Error : Player is null");
return ( null );
* grabs a frame's buffer, as an image, from the web cam / device
* @returns A frames buffer as an image
public Image grabFrameImage ( )
Buffer buffer = grabFrameBuffer();
if ( buffer != null )
// Convert it to an image
BufferToImage btoi = new BufferToImage ( (VideoFormat)buffer.getFormat() );
if ( btoi != null )
Image image = btoi.createImage ( buffer );
if ( image != null )
return ( image );
else
System.err.println ("Error : BufferToImage cannot convert buffer");
return ( null );
else
System.err.println ("Error : cannot create BufferToImage instance");
return ( null );
else
System.out.println ("Error : Buffer grabbed is null");
return ( null );
* Closes and cleans up the player
public void playerClose ( )
if ( player != null )
player.close();
player.deallocate();
player = null;
public void windowClosing ( WindowEvent e )
playerClose();
System.exit ( 1 );
public void componentResized ( ComponentEvent e )
Dimension dim = getSize();
boolean mustResize = false;
if ( dim.width < MIN_WIDTH )
dim.width = MIN_WIDTH;
mustResize = true;
if ( dim.height < MIN_HEIGHT )
dim.height = MIN_HEIGHT;
mustResize = true;
if ( mustResize )
setSize ( dim );
public void windowActivated ( WindowEvent e ) { }
public void windowClosed ( WindowEvent e ) { }
public void windowDeactivated ( WindowEvent e ) { }
public void windowDeiconified ( WindowEvent e ) { }
public void windowIconified ( WindowEvent e ) { }
public void windowOpened ( WindowEvent e ) { }
public void componentHidden(ComponentEvent e) { }
public void componentMoved(ComponentEvent e) { }
public void componentShown(ComponentEvent e) { }
protected void finalize ( ) throws Throwable
playerClose();
super.finalize();
class MyToolBarAction extends AbstractAction
public MyToolBarAction ( String name, String imagefile )
// Note : Use version this if you supply your own toolbar icons
// super ( name, new ImageIcon ( imagefile ) );
super ( name );
public void actionPerformed ( ActionEvent event )
toolbarHandler ( this );
class MyVideoFormat
public VideoFormat format;
public MyVideoFormat ( VideoFormat _format )
format = _format;
public String toString ( )
Dimension dim = format.getSize();
return ( format.getEncoding() + " [ " + dim.width + " x " + dim.height + " ]" );
class MySnapshot extends JFrame
protected Image photo = null;
protected int shotNumber;
public MySnapshot ( Image grabbedFrame, Dimension imageSize )
super ( );
shotNumber = shotCounter++;
setTitle ( "Photo" + shotNumber );
photo = grabbedFrame;
setDefaultCloseOperation ( WindowConstants.DISPOSE_ON_CLOSE );
int imageHeight = photo.getWidth ( this );
int imageWidth = photo.getHeight ( this );
setSize ( imageSize.width, imageSize.height );
final FileDialog saveDialog = new FileDialog ( this, "Save JPEG", FileDialog.SAVE );
final JFrame thisCopy = this;
saveDialog.setFile ( "Photo" + shotNumber );
addWindowListener ( new WindowAdapter()
public void windowClosing ( WindowEvent e )
saveDialog.show();
String filename = saveDialog.getFile();
if ( filename != null )
if ( saveJPEG ( filename ) )
JOptionPane.showMessageDialog ( thisCopy, "Saved " + filename );
setVisible ( false );
dispose();
else
JOptionPane.showMessageDialog ( thisCopy, "Error saving " + filename );
else
setVisible ( false );
dispose();
setVisible ( true );
public void paint ( Graphics g )
g.drawImage ( photo, 0, 0, getWidth(), getHeight(), this );
* Saves an image as a JPEG
* @params the image to save
* @params the filename to save the image as
public boolean saveJPEG ( String filename )
boolean saved = false;
BufferedImage bi = new BufferedImage ( photo.getWidth(null),
photo.getHeight(null),
BufferedImage.TYPE_INT_RGB );
Graphics2D g2 = bi.createGraphics();
g2.drawImage ( photo, null, null );
FileOutputStream out = null;
try
out = new FileOutputStream ( filename );
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder ( out );
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam ( bi );
param.setQuality ( 1.0f, false ); // 100% high quality setting, no compression
encoder.setJPEGEncodeParam ( param );
encoder.encode ( bi );
out.close();
saved = true;
catch ( Exception ex )
System.out.println ("Error saving JPEG : " + ex.getMessage() );
return ( saved );
} // of MySnapshot
public static void main (String[] args )
try
JWebCam myWebCam = new JWebCam ( "TimeSlice Web Cam Capture" );
myWebCam.setVisible ( true );
if ( !myWebCam.initialise() )
System.out.println ("Web Cam not detected / initialised");
catch ( Exception ex )
ex.printStackTrace();
when I run it I get the following errors
BufferToImage cannot convert buffer
could not grab frame
pls helpDo you expect anyone to read this?
http://forum.java.sun.com/help.jspa?sec=formatting
By the way, you have a condition that makes it print those messages. Check why that condiiton isn't rue. -
i noticed recently that once i uploading images with MULTIPLE ITEM INFORMATION box in itunes and getting straight through the music folder i have no option to upload tiff. and some jpeg. images connected with that album. the box don't allow me to upload them.i need help here,please.i know i can directly paste the artwork in small window in itunes left corner once i marked all the songs in multiple change.
The following line tells me that this is not a template file, but a document created from a template called index.dwt
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
This means that you saved a child document as a template file at some stage.
If you go to Modify->Templates->Detach from Template, you can remove the template structure from your document. All you then need to do is to re-save the document as a template. -
Problem with capture image from wc
hi all, i want to capture image from my webcam and play it, but it's not work
please help me, here's code
public class Demo extends JFrame {
* @param args
public static void main(String[] args) {
// TODO Auto-generated method stub
Demo demo = new Demo();
public Demo() {
super();
int a=30;
final JPanel panel = new JPanel();
getContentPane().add(panel, BorderLayout.CENTER);
setVisible(true);
DataSource dataSource = null;
PushBufferStream pbs;
Vector deviceList = CaptureDeviceManager.getDeviceList(new VideoFormat(null));
CaptureDeviceInfo deviceInfo=null;boolean VideoFormatMatch=false;
for(int i=0;i<deviceList.size();i++) {
// search for video device
deviceInfo = (CaptureDeviceInfo)deviceList.elementAt(i);
if(deviceInfo.getName().indexOf("vfw:/")<0)continue;
VideoFormat videoFormat=new VideoFormat("YUV");
System.out.println("Format: "+ videoFormat.toString());
Dimension size= videoFormat.getSize();
panel.setSize(size.width,size.height);
MediaLocator loc = deviceInfo.getLocator();
try {
dataSource = (DataSource) Manager.createDataSource(loc);
// dataSource=Manager.createCloneableDataSource(dataSource);
} catch(Exception e){}
Thread.yield();
try {
pbs=(PushBufferStream) dataSource.getStreams()[0];
((com.sun.media.protocol.vfw.VFWSourceStream)pbs).DEBUG=true;
} catch(Exception e){}
Thread.yield();
try{dataSource.start();}catch(Exception e){System.out.println("Exception dataSource.start() "+e);}
Thread.yield();
try{Thread.sleep(1000);}catch(Exception e){} // to let camera settle ahead of processing
}iTool wrote:
hi all, i want to capture image from my webcam and play it, but it's not workThat's a very descriptive error message, "it's not work". Everyone on the board will certainly be able to help you out with that.
The first error I see is that you're using the CaptureDeviceManager in an applet. If T.B.M pops in here, he can tell you why that's going to be a CF 99% of the time.
The other error I see is that your code looks absolutely nothing like any working JMF webcam capture code I've personally ever seen.
Lastly, the big one, even if you were somehow capturing video magically, you're not even trying to display it...so I'm not entirely sure why you expect to see anything with the code you just posted.
[http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JVidCap.html]
Your best bet would be starting over and using the example code from the page linked above. -
Hello Sir and Maam!
i am an engineering student. i have a problem, i want to take pictures form labview using my built in camera in my laptop. I have read many discussions hwo to use it.. I downloaded Ni Imaq, Visa, Vision Assistant too but in the end my built in camera is not supported to capture images. I need to do it but after searching some cameras that Labview is compatible it is too much costy for me.
to make that story short i found an example program that makes me allow to use of my built in camera. I'll attatch it here. But i want to ask a favor on how to add some codes to capture image. it is just using a express vi.
I'll attatch the code! tnx maam and sir!
-hoping for your help
Example Grab Express.vi
Solved!
Go to Solution.
Attachments:
IMAQdx Express Examples.llb 482 KB
IMAQdx Express Examples.llb 482 KBMr_ask wrote:
Hello Sir and Maam!
i am an engineering student. i have a problem, i want to take pictures form labview using my built in camera in my laptop. I have read many discussions hwo to use it.. I downloaded Ni Imaq, Visa, Vision Assistant too but in the end my built in camera is not supported to capture images. I need to do it but after searching some cameras that Labview is compatible it is too much costy for me.
to make that story short i found an example program that makes me allow to use of my built in camera. I'll attatch it here. But i want to ask a favor on how to add some codes to capture image. it is just using a express vi.
I'll attatch the code! tnx maam and sir!
-hoping for your help
Example Grab Express.vi
check this vi i made to snap and save image. You can use MAX to get camera name or to configure them too.
Attachments:
camera snap.vi 52 KB -
Hi,
Is there any way in which Java can be used to capture images from the webcam and save it to a predefined image file name?
Any examples out there?
Alternatively, I could have the application written in other languages, but still, I would need my main Java app to launch this external app.
Thanks alot.Hi,
Is there any way in which Java can be used to capture
images from the webcam and save it to a predefined
image file name?
Any examples out there?
Alternatively, I could have the application written in
other languages, but still, I would need my main Java
app to launch this external app.
Thanks alot.Yes, the ExampleSave from the JavaTwain package at http://www.gnome.sk does this job :)
If you just want to see how Java Twain works with your webcam (works with a scanner too):
- java (1.2 or higher for Windows, 1.3 or higher for Mac OS X) has to be installed on your computer
- a scanner or camera has to be installed on your computer
- download the trial package from http://www.gnome.sk
- unzipp it
- go to the examples directory of the unzipped package
- in Windows: doubleclick the runExampleShow.bat
- in MacOS:
- open the Terminal window
- change the working directory to the examples
- run .sh file (type ExampleShow.sh or sh ExampleShow.sh)
This will pop up the Twain Source Selection user interface. There, all your scanners and cameras which do have a twain driver should be listed. (About 90% of scanners and cameras on the market do have a twain driver for Windows, only a few do have a twain driver for MacOS.) Select one of them. The user interface of the selected scanner (camera) will appear. Confirm the scanning (you can set the scanning parameters first). The scanned image will be displayed in a separate window. To end the application, close that window.
Running different examples, you can test scanning with hidden UI, saving the scanned image, using ADF, ...
If there is any problem, do not hesitate to inquire about it at the technical support, email: [email protected] . I am the member of the staff :)
Erika Kupkova -
Can I capture images with philips toucam 820K?
Hi, I want to capture images from my webcam (philips toucam 820K) with Labview 7? I have IMAQ,too. How can I do it?
Thank's!Hello Juank
Try this
http://digital.ni.com/public.nsf/websearch/274A74A901399D0486256F32007295F9?OpenDocument
Hope this helps
Belens -
Problem deploying captured image
I'm testing our new SCCM 2012 and specifically OSD and deploying a captured image. The image is captured on a separate MDT config.
What I'm seeing with this image deployment is that about 90% of the times it ends with a 80070002 TS error. Examining the smsts.log shows the following:
Successfully completed the action (Setup Windows and ConfigMgr) with the exit win32 code 0
So this step seems to go fine and and then the State Restore step starts and the computer reboots to the full OS.
The group (State Restore) has been successfully started
But then I don't know what happens, non of the following steps are run, for example there's application install and so forth. It seems to parse through the remaining steps but doesn't run them and then ends with Gather Logs and stateStore on Failure.
I just can't see from smsts.log what the problem would be, what other logs should I look in to find out what's going on?Seen that many times when doing deployments, but not on capture mentioned. In that case the error is a known bug. Workaround is to add 2 Task Sequence Variables. Unfortunately R2 is needed for that.
-SMSTSDownloadRetryCount = 5
-SMSTSDownloadRetryDelay = 15
Just have a look at my blogpost for more information on this:
http://henkhoogendoorn.blogspot.nl/2014/07/osd-ts-fails-during-package-download.html
My blogs: Henk's blog and
Virtuall | Follow Me on:
Twitter | View My Profile on:
LinkedIn -
Problem in getting the image through URL
hi all,
I facing the problem,Inwhich i am unable find the solution...I am using the following code to display the image
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException {
int data=0;
response.setContentType("image/png");
ServletOutputStream out = response.getOutputStream();
String file = request.getContextPath()+imageNames[0];
//String file = "C:/Program Files/Apache Group/Tomcat 4.1/webapps/ImageComm/WEB-INF/images"+imageNames[index];
BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
System.out.println("the size of the inputStream is..."+in.available());
System.out.println("the context path is..."+request.getContextPath());
while ((data = in.read()) != -1) {
out.write(data);
with the above i am not getting any error at the compile time but it was giving exception like FileNotFoundException.
but the same thing(URL address) when i am copying on the browser it was displayig the image.
(what might be the reason)
one more thing when i commented on the url address and try to use the actual realpath address it was displaying the image with out any problem
can anybody give me the solution like where to keep my images by which i can able to get the images through url address
thanks in advance
lakshmanhi all,
I am getting the image from the server.but the problem is i am getting the Exception as ArrayOutOfBound exception.
It was displaying the Image for the first time.and when ever it was going for the second time in to the paint method it was displaying the IOException in reading the stream from the connection.
can anybody give me the solution in rectifying that exception.
thanks in advance
lakshman -
Coloring an image through code
Hey guys,
With a basic knowledge of the iphone SDK by now I've been playing around with some code and as expected stumbled upon "a pretty hard to do" idea.
I was wondering how to color the contents of an image through code. Basically something like the "Fill" photoshop effect. Meaning: a UIImage containing a transparent png. The image is a drawing of a star, the outside is transparent, the lines are black and the inner color is purple.
Through code I'd love to find out how to alter the purple color for example with a red one or any other.
Any ideas / help would be appreciated...Search on MacUpdate using 'home decorate' as a search term.
Regards
TD -
I have a HP workforce 610 and cannot scan. I just spoke with HP and they told me it is a software problem with my MAC for image capture. Anyone else having difficulty?
If Image Capture doesn't work you could try the paid for app VueScan ( www.hamrick.com ). You can try it for free in demo mode to see if it works before purchase.
-
I have a problem with the pop-up prompt to enter my serial number for installation, it won't pop up when I entered the redemption code. Can someone help?
There is no pop up. There is a window that is part of the installation process. If you entered a wrong number, like a redemption code, you would have wound up installing it as a trial. In that case, go to the Help menu in the editor and look for an option there.
If that isn't what you're talking about, you really need to explain in more detail. -
http://1drv.ms/1jWJ5a3
Problem with capturing image. Logs included.
Also after deploying letters are swapped. System is on D drive, and data on C drive.
Any idea ?Based on the logfiles:
SMSSITECODE=K01
SMSMP=SCCM.kolubara.local
you could also use DNSSUFFIX=kolubara.local
More on CCMSetup parameters can be found here
http://technet.microsoft.com/en-us/library/gg699356.aspx. Use client.msi parameters in your task sequence separated by spaces, so that your Setup Windows & Configuration Manager Client -step looks like this: -
keep trying to send a message and it wont go through I keep getting a message pop up that says network problems cause code :3 what does this mean
SMS Error: Cause Code 3, Error Code 2
Maybe you are looking for
-
Change payment status for COD order only
Hi, I know that if I click on the edit button within any order, I can click a button to the right of the Status and a window pops up listing the status types. If I click on "Purchase - Awaiting Payment", I can make that the default status type howeve
-
Embedding video in iBooks Author
After embedding a video in iBooks Author, the screen on the iPad stays all black after playing, without showing any steering tools. I need to tip again the screen to get play, rewind, finishing etc. Is there a setting I miss?
-
How to combine two or more adobe forms in Java web dynpro
Hi All, I have a scenario where I have few screens each - a separate adobe form. For e.g. One adobe form for item creation, one fore details, one for planning. I need to combine all this into one and save a copy of the PDF. Save PDF option
-
I have carried a clean install of Lion - Have tired to set up my MS exchange account in Lion mail all goes well email address and accepted and server found. However the password box keeps appearing saying incorrect password. I have changed the passwo
-
How uninstall server 2.2.2 on OS X 10.8.5 ?
I install server 2.2.2 on Macbook Pro on 10.8.5. I want to uninstall this application . How ?