Capture image of just graph

I need to make a shortcut too capture a single graph of a vi´s panel, but
just the graph and save it as BMP/JPEG is that possible? I can save it but
only the whole front panel or visible area Thanxabunch.
Stirmir

It would help if I attached the code...
This account is no longer active. Contact ShadesOfGray for current posts and information.
Attachments:
ControlToPNG.vi ‏22 KB

Similar Messages

  • Capture images (JPEG) from IP-Camera

    Hey there!
    I have been trying to capture images from an IP-Camera. I understand that this has to be done by using a custom DataSource and I have tried many many example found here on the net, but with no results.
    I think I've tried every piece of code found here at this forum regarding this subject.. :/
    The best I could do was not getting an error while creating a custom DataSource from a BufferedStream..but the when I try to configure/realize the Processor - created with Manager.createProcessor(customdatasource) - it gives me an error which, I think, has something to do with unrecognized content..
    I could post all the examples I tried but I think it would be too much of a confusion so...does anyone have a full working example of code to achieve this? WITH the frame grabber class? plizzzzzzzzz?
    Thanks,
    Edd

    I felt Captfoss' solution was inspired and so gave it a go. The following builds a video from an ip cam jpg stream using a version of Sun's JpegImagesToMovie.java. It is hacked together quickly and with scope for improvement, but it works, proves the idea, and is a good example.
    Run as:- java JpegImagesToMovie -w 320 -h 240 -f 30 -o file:test.avi
    * @(#)JpegImagesToMovie.java     1.3 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    * Some public domain modifications by Andy Dyble for avi etc by self and from 
    * other internet resources 19/11/2008. Reads editable 20 ip cam network jpg files.
    * Supported formats tested for compression options. This code could be much improved
    * further to these amendments. Absolutely no warranties. www.exactfutures.com
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    import javax.media.format.JPEGFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie implements ControllerListener, DataSinkListener {
        public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML, String outputURL)
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
             System.err.println("- create processor for the image datasource ...");
             p = Manager.createProcessor(ids);
         } catch (Exception e) {
             System.err.println("Yikes!  Cannot create a processor from the data source.");
             return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
             System.err.println("Failed to configure the processor.");
             return false;
         // Set the output content descriptor to QuickTime.
         if(outputURL.endsWith(".avi") || outputURL.endsWith(".AVI"))
              p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.MSVIDEO));
         if(outputURL.endsWith(".mov") || outputURL.endsWith(".MOV"))
              p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         for(int i=0;i<tcs.length;i++)
              System.out.println("TrackControl "+i+" "+tcs);
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
         System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
         return false;
         for(int i=0;i<f.length;i++)
              System.out.println("Supported Format "+i+" "+f[i]);
    //     tcs[0].setFormat(f[0]);
         if(outputURL.endsWith(".avi") || outputURL.endsWith(".AVI"))     // must be VideoFormat
              System.err.println("Setting the track format to: "     // INDEO50 CINEPAK f[0] etc
                   + tcs[0].setFormat(new VideoFormat(VideoFormat.INDEO50)));
         if(outputURL.endsWith(".mov") || outputURL.endsWith(".MOV"))
              System.err.println("Setting the track format to: "     // JPEG CINEPAK RGB f[0] etc
                   + tcs[0].setFormat(new VideoFormat(VideoFormat.JPEG)));
         //System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor. Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
         System.err.println("Failed to realize the processor.");
         return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
         System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
         return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
         p.start();
         dsink.start();
         } catch (IOException e) {
         System.err.println("IO error during processing");
         return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
         dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
    * Create the DataSink.
    DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
         System.err.println("Something is really wrong: the processor does not have an output DataSource");
         return null;
         DataSink dsink;
         try {
         System.err.println("- create DataSink for: " + outML);
         dsink = Manager.createDataSink(ds, outML);
         dsink.open();
         } catch (Exception e) {
         System.err.println("Cannot create the DataSink: " + e);
         return null;
         return dsink;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         evt.getSourceController().stop();
         evt.getSourceController().close();
    Object waitFileSync = new Object();
    boolean fileDone = false;
    boolean fileSuccess = true;
    * Block until file writing is done.
    boolean waitForFileDone() {
         synchronized (waitFileSync) {
         try {
              while (!fileDone)
              waitFileSync.wait();
         } catch (Exception e) {}
         return fileSuccess;
    * Event handler for the file writer.
    public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
         public static void createInputFiles(Vector files)
              // Create a file for the directory
              File file = new File("images");
              // Get the file list...
              String s[] = file.list();
              files.removeAllElements();     // if any set from arguments
              for(int i=0;i<s.length;i++)
                   if(s[i].indexOf(".jp")!=-1)
                        files.addElement("images"+File.separator+s[i]);     // and to sort if required
                   else
                        System.out.println((i+1)+": "+s[i]+" - ignored");
    public static void main(String args[]) {
         if (args.length == 0)
         prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
         if (args[i].equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
    ///     createInputFiles(inputFiles);
         if (outputURL == null)// || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if(!outputURL.endsWith(".avi") && !outputURL.endsWith(".AVI") && !outputURL.endsWith(".mov") && !outputURL.endsWith(".MOV"))
              System.err.println("The output file extension should end with a .mov extension");
              prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie imageToMovie = new JpegImagesToMovie();
         imageToMovie.doIt(width, height, frameRate, inputFiles, oml, outputURL);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL>");// <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         float frameRate;
         long seqNo = 0;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
              this.frameRate = (float)frameRate;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
    byte[] input_buffer;
    byte[] imgbytearray;
    byte[] imgusebyte;
    int camWidth = 320;
    int camHeight = 240;
    URL url;
    long timeStamp;long timeStamp0=System.currentTimeMillis();long resultTimeStamp;
         public boolean urlFetchJPG()
              String ipcamserver = "146.176.65.10";     // examples 146.176.65.10 , 62.16.100.204 , 194.168.163.96 , 84.93.217.139 , 194.177.131.229 , 148.61.171.201
              try
                   url = new URL("http://"+ipcamserver+"/axis-cgi/jpg/image.cgi?camera=&resolution=320x240".trim());
              catch(Exception e){System.out.println("Exception url "+e);}
              try
                   if(input_buffer==null)input_buffer = new byte[8192];
                   if(imgbytearray==null)imgbytearray = new byte[camWidth*camHeight*3];
                   URLConnection uc = url.openConnection();
                   uc.setUseCaches(false);
                   //uc.setDoInput(true);
                   //uc.setRequestProperty("accept","image/jpeg,text/html,text/plain");
                   BufferedInputStream in;
                   int bytes_read;
                   int sumread=0;
                   in = new BufferedInputStream(uc.getInputStream());
                   while((bytes_read=in.read(input_buffer, 0, 8192))!=-1)
                        if(sumread+bytes_read>imgbytearray.length)
                             byte[] imgbytearraytemp = new byte[sumread+bytes_read+8192];
                             System.arraycopy(imgbytearray,0,imgbytearraytemp,0,imgbytearray.length);
                        System.arraycopy(input_buffer,0,imgbytearray,sumread,bytes_read);
                        sumread=sumread+bytes_read;
                   in.close();
                   imgusebyte = new byte[sumread];
                   System.arraycopy(imgbytearray,0,imgusebyte,0,sumread);
              catch(Exception e){System.out.println("Exception urlFetchJPG "+e);}
              return true;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= 20) //images.size())
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
    ///     String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
    //     System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
    ///     RandomAccessFile raFile;
    ///     raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
    ///     if (buf.getData() instanceof byte[])
    ///          data = (byte[])buf.getData();
              urlFetchJPG();
              data = imgusebyte;
         // Check to see the given buffer is big enough for the frame.
    ///     if (data == null || data.length < raFile.length()) {
    ///          data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
    ///     raFile.readFully(data, 0, (int)raFile.length());
    //     System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
    ///     buf.setLength((int)raFile.length());
              buf.setLength(data.length);
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
    ///          long time = (long)(seqNo * (1000D / frameRate) * 1000000);
              timeStamp = System.currentTimeMillis();
              resultTimeStamp = timeStamp - timeStamp0;
              long time = resultTimeStamp * 0xf4240L;
              buf.setTimeStamp(time);
              buf.setSequenceNumber(seqNo++);
         // Close the random access file.
    ///     raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    {code}

  • Labview IMAQ VI for capturing images and saving with incremental file names

    Hello,
    I am using LabView 7.1(IMAQ) to capture images with NI's PCI 1426 card, and a JAI CV-M2 camera. Now, with the example VI's like LL Grab, or LL Sequence, or Snap and Save to File.vi, I can capture the images. But what I actually want is to capture images continuously and keep saving them with a sequentially incrementing file name.
    I have tried to modify the Snap and Save to File.vi  by adding a 'for loop', so as to run this for required number of images. This works okay, but I can't really change the file name after every image. However, I'm not confident with this method either. I think it would be better to use the buffer itself, as is given in LL Grab.vi and somehow save images from the buffer. I think this would be faster ?
    In any case, any ideas as to how I should go about implementing auto-incrementing of the file name ?
    Any help will do. 
    Thanks.
    - Prashant

    Hi,
    Thanks a lot for replying. 
    I tried using this in the VI i was working with, but using the "build path" vi doesnt seem to work. If I use just the base path from user's input, it works, but then again it keeps overwriting the images into one file rather than giving each file a new name. I'm attaching the vi. 
    Please take a look and tell me where i'm going wrong.
    Thanks again.
    Attachments:
    LL Sequence_mod.vi ‏62 KB

  • Capture images

    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 KB

    Mr_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

  • Importing Graph to Image (oracle dss graph Graph)

    I am trying to implement a Copy Image of a Graph(oracle.dss .graph.Graph) , My code is working but there is still an issue:
    * When copy and pasting the image, I get a black background due to the transparent background of the Graph. I tried to change the color of the background using the following:
    this._graph.setBackground(Colo.gray);But still not working. Any Idea of how to copy the Graph on the clipboard so that I don't get black background on the image pasted ?
    private oracle.dss.graph.Graph _graph;
                    public void actionPerformed(ActionEvent e) {
                        try{
                           ByteArrayOutputStream out = new ByteArrayOutputStream();
                           _graph.exportGraphToStream(out);
                           BufferedImage image  = ImageIO.read( new ByteArrayInputStream(out.toByteArray()));
                          CopyImagetoClipBoard ci = new CopyImagetoClipBoard(image);
                        }catch(Exception ex) {
                            theLogger.log(Level.SEVERE,ex.getMessage(),ex);
        class CopyImagetoClipBoard implements ClipboardOwner {
                public CopyImagetoClipBoard(Image i) {
                    try {
                        TransferableImage trans = new TransferableImage( i );
                        Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
                        c.setContents( trans, this );
                    catch ( Exception x ) {
                        x.printStackTrace();
                        System.exit( 1 );
    ...Note that this should be in Memory, since It is only a "Copy Image" feature
    Edited by: user13679988 on Mar 13, 2013 3:04 PM

    I'm almost sure the Graph background has transparent background.
    I have 2 available operations that can be done on the graph ( which are the ones that I'm trying to implement )
    1) Save Image As. which It will import the graph to a PNG Image, this one is working fine:
            this.saveImageAs.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        try{
                        JFileChooser fc = new JFileChooser(_graph.getTitle().getText());
                        //fc.addChoosableFileFilter(new ImageFilter());
                        int result =  fc.showDialog(Ide.getMainWindow(), "Save");
                        System.out.println();
                        _graph.setImageSize(new Dimension(1024,600));
                        _graph.exportToPNGWithException(new FileOutputStream(fc.getSelectedFile()));
                         }catch(Exception ex){
                                theLogger.log(Level.SEVERE,ex.getMessage(),ex);
                });If I open the image that was store after this, I see that the transparent background, so It looks good for me. so this is not a problem at all.
    2) the Second one ( Which is actually not working at all ) Is the Copy Image, which It is suppouse to copy the image to the clipboard so that the use can be able paste it on a word document, wordPad, or any other editor. Just as you can do on any image on a Webbrowser.
            this.copyImage.addActionListener(new ActionListener(){
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        try{
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        _graph.setImageSize(new Dimension(1024,600));
                        _graph.exportGraphToStream(out);
                        BufferedImage image  = ImageIO.read( new ByteArrayInputStream(out.toByteArray()));
                         CopyImagetoClipBoard ci = new CopyImagetoClipBoard(image);
                        }catch(Exception ex) {
                            theLogger.log(Level.SEVERE,ex.getMessage(),ex);
                });As a result, when pasting the copied image to paint or to word or anywhere, I always get a black background, what looks horrible btw. this is a big issue.
    I try to use your method makeColorTransparent. but It caused my application to get frozen =/ not sure why.
    as follow:
      CopyImagetoClipBoard ci = new CopyImagetoClipBoard(makeColorTransparent(image,Color.BLACK));The reason why I believe the problem is not on the exportToStream but on the ImageIO.read is because exportToStream uses the exportToPNG that actually works fine to export the image ( since I used it on the Save Image As option )
         * @internal
         * Called when the graph must be rendered to the provided OutputStream
         * @param out OutputStream object to use in exporting the graph
         * @return boolean True if the export completed successfully, False otherwise
        public boolean exportGraphToStream(OutputStream out)
          this.exportToPNG(out);
          return true;Take a look how It looks like to copy and paste on paint:
    [Graph after Copy and Paste on Paint|http://postimage.org/image/m9szt96vr/]
    http://s15.postimage.org/ybodneg4b/graph_After.png
    Now take a look how It looks like when exporting to Image png:
    [Graph Imported as PNG|http://postimage.org/image/4g3dgfic9/]
    http://s12.postimage.org/r4skfzzq5/Export_Img.png
    Edited by: user13679988 on Mar 14, 2013 10:46 AM

  • Capture image after Sysprep w/generalize option...

    Hello all. disclaimer...I'm more versed in IBM mainframe OSes but I can get around pretty good with Windows utils and concepts. But this is probably a noob kinda question ;-)
    I'm in a work environment where i have an image that has already been customized. The default administrator has already been created. So typically when an image is laid down via WDS I can sign in with the default admin account with no issues. I am now trying
    to capture this image after some required customizations. So i use Sysprep with the generalize option...BUT...here's my dilemma. I do not want to use OOBE. So how would I reseal the image under AUDIT before capture so that i may IMAGEX /APPLY my 'captured'
    image to deliver the same default sign-on screen upon successful completion of the apply of the image? I wish for no OOBE Welcome screen nor an AUDIT SYSPREP screen where I have to cancel out of. I wish to come to the same sign-on environment that I would
    come to had I just done a 'capture' with no SYSPREP involved.
    I know that IMAGEX /CAPTURE without a SYSPREP /GENERALIZE usage would give me exactly what I want. However, I do need the unique identifiers removed from the image of the testing PC. So I do need SYSPREP /GENERALIZE functionality.  Would I have to use
    an unattend.xml to achieve this? And if so, what passes would be necessary? I am not that familiar with the unattend file. But I have been reading up on it.
    I hope all of this makes clear sense. Any advice on how to proceed is greatly appreciated. Thanks.

    Yes, use an answer file with sysprep to fill out the OOBE information. Then the user will not see those screens after imaging. Here is an example XML i have handy.
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SetupUILanguage>
    <UILanguage>en-us</UILanguage>
    </SetupUILanguage>
    <InputLocale>en-us</InputLocale>
    <UILanguage>en-us</UILanguage>
    <SystemLocale>en-us</SystemLocale>
    <UILanguageFallback>en-us</UILanguageFallback>
    <UserLocale>en-us</UserLocale>
    </component>
    </settings>
    <settings pass="specialize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ComputerName>*</ComputerName>
    <TimeZone>Eastern Standard Time</TimeZone>
    </component>
    <component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Home_Page>http://www.google.com/</Home_Page>
    <Help_Page>http://www.google.com/</Help_Page>
    <DisableFirstRunWizard>true</DisableFirstRunWizard>
    </component>
    </settings>
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <InputLocale>0409:00000409</InputLocale>
    <SystemLocale>en-us</SystemLocale>
    <UILanguage>en-us</UILanguage>
    <UserLocale>en-us</UserLocale>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <NetworkLocation>Other</NetworkLocation>
    <ProtectYourPC>3</ProtectYourPC>
    </OOBE>
    <UserAccounts>
    <LocalAccounts>
    <LocalAccount wcm:action="add">
    <Group>Administrators</Group>
    <DisplayName>UserAccount</DisplayName>
    <Name>UserAccount</Name>
    <Password>
    <Value>password</Value>
    <PlainText>true</PlainText>
    </Password>
    </LocalAccount>
    </LocalAccounts>
    </UserAccounts>
    </component>
    </settings>
    <cpi:offlineImage cpi:source="catalog:c:/image creation/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

  • Captured images not showing in gallery Nokia N8

    I have 2 identical Nokia N8.
    I have changed nothing on either in terms of programs/ applications/ etc.
    When I took a photo, image would appear in both:
    - Gallery (1st page)
    - Captured (2nd page)
    Suddenly, on one phone only the photo is only appearing in the Captured images.
    Images are saved onto F. Memory card. I have tried ejecting & reinserting the memory card. I get "refreshing your media", but the items are still only showing in "Captured".
    When I sync photos with my pc the captured images are synced correctly.
    It is just annoying that I cannot access the Gallery immediately anymore.
    I do appreciate any tips.

    LFSwiss wrote:hpholm:
    I do not have a card reader [I transfer with PC Suite]. I have tried the SDHC from my other phone, but this makes no difference.
    I do respect your comment on Forum rules (however, "On a repairability scale from 0-10 where 10 is the easiest to repair, the N8 scores 8." has piqued my interest (all the internet searches I have done only say "take it to Nokia Care", which is not an option for me - warranty has long expired). Am I right in thinking I should take it to a "generic" repair shop...
    Many thanks (and happy end to your weekends).
    If changing the SDHC does not help, that would point towards corruption on the C or E drive - which the software recovery tool should have solved. Since you have presumably backed up everything already and the N8 is in a risk-willing state, I suggest safe eject the SDHC from the Files app and then physically remove the memory card from the phone. Now in the Files app format the E drive on the phone (Notice that you lose off-line maps and apps installed on E) Then in the Camera app reset to defaults. Try and snap some photos and see how it goes without the memory card?
    Another run of the software recovery tool without the memory card inserted may also be useful. So may a fresh format of the memory card, to avoid something strange being inherited from the hidden folders and files on the memory card.
    All the above is just off the top of my head. I have never experienced this particular error on my N8 (knock on wood!) - My N8 has lost the notification LED functionality on the button and the small charge indicator LED a year ago. The rest of the phone does what it is supposed to do, and there are no obvious mechanical issues inside after a clean-up, so I decided to ignore it.
    The xenon trouble is either the "bulb" itself failing or the array of spring connectors from the motherboard failing.
    An N8 is built like a tank. Teardown instructions are found elsewhere. Whatever you decide, do not spend too much money on it. A second-hand N8 in fair condition is worth €50-80 in Denmark, perhaps even less now that Skype and the social app stopped working, and some of the root certificates expired. It still wakes me up in the morning every day - a simple task that the Lumia failed several times.
    Hans

  • Capturing image with electronic signature.

    A new functionality of electronic signature is provided with webcenter content. We can create metadata for electronic signature but its type can only be text, int, checkbox, lontText etc. It does not allow capturing image.
    As per our requirement we want a process like
    1. System will allow every user to upload an image of his signature. (We can do it by normal check in so no problem here)
    2. Electronic signature should be configured to take image as a metadata. (Currently I believe signature can't take image)
    3. When user signs a document, image metadata should get automatically populated with users signature as checked in in first step. (Currently I believe we can't set default value for signature metadata)
    4. User should provide password and other metadata information and document should get signed. (No problem here)
    5. As part of water mark we should be able to show image of signature on document.
    How should we achieve it?
    Thanks
    Sanjeev.

    I believe there's a disconnect between what an official "electronic signature" is vs. other electronic signatures. There is a defined regulation that states what an official electronic record signature is: 21 cfr part 11 .
    putting an image isn't a 'real' esig.
    I do not believe that WCContent's new esig feature is what you're after.
    I'm not sure exactly what the last few lines of your previous post were after, but you might be able to get away with only using the PDF Watermark component if you just want to stamp specific content into the pdf.
    If you want to stamp images into pdfs, you'll have to create a custom component that does some custom image manipulation, I believe.
    If you have a requirement for 'real' electronic signatures. you should check if your requirement needs to follow 21 cfr part 11. if so, then you should use what WCContent offers out of the box.
    This document seems to cover the topic in very good detail:
    http://www.usdatamanagement.com/attachments/article/274/Oracle-ECM-Part-11-Certification-White%20Paper.pdf
    Does this help separate what UCM offers as an esig vs. stamping an ink-signature image into a pdf?
    -ryan

  • 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 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.

  • Is it possible to capture image at specified wavelength​s

    The filter is attached to camera. The filter is switching betweeen   5 specified wavelengths. On giving the "Start Aquisition" button the camera will capture image. the problems are
    1)  the wavelength selection is written as  subvi. It changes the wavelengths , but the control returns to the calling vi only with the final wavlength( here 686.7). The other values are not reflected in the main vi.
    2)  on giving the "start aquisition" the image taken is for this final wavelength. Is it possible to take images for all the 5 wavelengths by giving "start aquisition" only at the beginning?
    3)  Now the execution control loops inside the section which captures the image( since I have given a while loop there)
    4) instead of this sub filter vi, is it possible to add a sweep program( i already have one) so that when the desired wavelength values come it will capture the image.
    Attachments:
    image changed2.vi ‏251 KB
    subfilter.vi ‏22 KB
    sweep.vi ‏22 KB

    Your code shows a complete lack of understanding of dataflow programming. Maybe you should start out with a few tutorials and study some example programs from the example finder.
    How are you running the code? Run continuously??? There is no toplevel loop! It is difficult to say more, because most subVIs are missing so we cannot even test.
    Your toplevel is unmaintainable, with loops and sequence structures stacked knee deep. Have a look at state machine architecture instead. Your only seem to work if controls are operated in a specific sequence. Most of the time, controls will not respond because the code does something else.
    Your "sweep program makes no sense. Why are you setting a value property that overwrites a control, making the control useless. Only use controls if the user can actually change something. Why not just initialize the shift register with a diagram constant of 400? After you do that, the sequence structure is obsolete, delete it. Why is there a local variable? Why don't you delete the local variable and place the indicator in its place inside the loop? 
    Your subfilter code makes no sense. Nothing will happen in the main VI while it is running. Data is only returned at the output terminal once the VI is finished. It does not change any wavelenghts as you claim, it simply updates it's front panel. What else do you expect? Why don't you flatten that code in the main VI, simply autoindexing an array with three wavelents in the loop that does the acquisition. Why does the output go to a case strucure with only choices 0 and 1? Since none of the outputs will ever be 0 or 1, only the empty default case will ever execute.
    LabVIEW Champion . Do more with less code and in less time .

  • "Captured" images in Photos application on FP2 pho...

    I have some photographs taken on a Nokia N96 that are only viewable under the "All" option in the Photos application. They don't show up in "Captured" or "Months".
    Is it possible to these images recognised as captured photographs by the device?
    Thank you!

    My N85 (RM333 - 11.047) experience - might be similar for you people.
    I cleared my "Captured Images" via Nokia Photos (which only copies). I then went back and selected all my images on the phone and deleted them. Since then any photo i take no longer shows up in "Captured Images", but this is what I discovered.
    The images are stored on the SD card inthe default "Images" directory where it creates (by default) monthly folders into which it stores the images... eg, 200902 for Feb.
    Since I cleared the gallery the by default creates a new directory called "Camera" under the default "Images" directory and into this directory creates monthly folders into which it stores the images. As a result the images now appear in "ALL" but not in "Captured Images".
    If I shift the monthly image directories from "Camera"  back under "Images" still no joy. But if I turn the phone off and on - it will display the shifted images in "Captured Images". If I then go a take a new image it sticks back into the "Camera" directory. If I delete the "Camera" and try again (even with powering the phone off and on) it just re-creates the "Camera" directory and ditto all over again.
    This definitely a bug in the firmware. So I am going to try a few ideas I think will work and will re-post back here ASAP. Hope this was of some help because it's been a frustrating experience...

  • The capture-image option is unknown

    Hi, 
    I'm trying to capture the C drive to a Image.
    OS: Windows 7 Home Premium
    Booted OS: WinPE 3
    Command: Dism /Capture-Image /ImageFile:R:\WinRE\restore.wim /CaptureDir:C:\ /Name:"Win 7 Home Premium Restore"
    But I get the following error:
    The capture-image option is unknown
    Although this is the EXACT way as described in the Documentation from Microsoft.
    What's going on here?
    BR, 
    Tom

    The error "The capture-image option is unknown" may be due to you not using a absolute path to DISM.EXE in your batch file. DISM is the replacement for IMAGEX (I use it all of the time). It will capture and apply an image along with all of the other
    IMAGEX functionality. Since it is already installed in Windows 8 and on the Install media, you can run it and image a folder or your entire drive directly from the Windows 8 install media without having to create your own WinPE CD (from the Windows 8 install
    media:   REPAIR - TROUBLESHOOTING - ADVANCED - COMMAND PROMPT). Below is the batch file I use. You just need it on a logical drive which isn't in the folder path you are capturing, preferably a different logical drive than the target. It
    is pretty generic and it will prompt you for your selections. It will format your target drive during an APPLY if you select yes. It names the WIM image based on the current date and time. DISM needs a scratch directory to write to and it is created in
    the folder you save your image to. Use at your own risk (I am not entirely sure the formatting in this thread left things alone, but it does appear to have). Let me know if you have any questions.
    HERE IS AN EXAMPLE OF THE INPUT YOU WILL BE ASKED FOR
        ------- THIS SCRIPT IS FOR CAPTURING AND APPLYING DISM IMAGES -------
    Enter the imaging action you want to execute
    (Capture, Apply). . . . . . . . . capture
    Enter the target location (drive\directory) where you want to CAPTURE your
    backup image. . . . . . . . . . . d:\images\a780lw800
    Enter the path (drive\directory) you want to backup (CAPTURE)
    . . . . . . . . . . . . . . . . . c:\
    HERE IS THE VERIFICATION PROMPT
    Verify the below selections prior to beginning . . .
    IMAGING ACTION . . . . . . . . . . . . . capture
    LOCATION WHERE IMAGE WILL BE SAVED . . . d:\images\a780lw800
    DRIVE\DIRECTORY TO BACKUP (CAPTURE). . . c:\
    IMAGE NAME OF BACKUP (CAPTURE) . . . . . 20121122_0819.wim
    Does the above selections appear correct? (yes, no)
    @echo off
    ::    This batch file was created by Curtis Tittle Sr.
    ::    Last updated on 11-22-2012 at 6:20am
    cls
    echo.
    echo     ------- THIS SCRIPT IS FOR CAPTURING AND APPLYING DISM IMAGES -------
    echo.
    echo.
    set today=
    set now=
    set now2kf4=
    set now2kl1=
    set newnow=
    set newnowf2=
    set newnowl2=
    set newnow=
    set now1=
    set now12=
    set now2=
    set now3=
    set mltryhour=13
    set mltryhour=14
    set mltryhour=15
    set mltryhour=16
    set mltryhour=17
    set mltryhour=18
    set mltryhour=19
    set mltryhour=20
    set mltryhour=21
    set mltryhour=22
    set mltryhour=23
    set mltryhour=12
    set mltryhour=
    set mltrytime=
    set currentdaytime=
    FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET today=%%L%%J%%K
    FOR /F "tokens=1-4 delims=:-. " %%G IN ('time /t') DO SET now=%%G%%H%%I
    ::  Last 1 characters of the time
    set now2kck=%now:~-1%
    if /I "%now2kck%"=="a" goto w2k
    if /I "%now2kck%"=="p" goto w2k
    goto wxp
    :w2k
    ::  First 4 characters of the time
    set now2kf4=%now:~0,4%
    ::  Last 1 characters of the time
    set now2kl1=%now2kf4:~-1%
    if /I "%now2kl1%"=="a" goto add0
    if /I "%now2kl1%"=="p" goto add0
    goto noadd0
    :add0
    set newnow=0%now:~0,3%
    set newnowf2=%newnow:~0,2%
    set newnowl2=%newnow:~-2%
    set newnow=%newnowf2%:%newnowl2% %now2kck%m
    set now=%newnowf2%%newnowl2%%now2kck%m
    goto noww2k
    :noadd0
    set newnow=%now:~0,4%
    set newnowf2=%newnow:~0,2%
    set newnowl2=%newnow:~-2%
    set newnow=%newnowf2%:%newnowl2% %now2kck%m
    set now=%newnowf2%%newnowl2%%now2kck%m
    goto noww2k
    :wxp
    FOR /F "tokens=1-4 delims=:-. " %%G IN ('time /t') DO SET now=%%G%%H%%I
    :noww2k
    FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET today=%%L%%J%%K
    ::  First 2 characters of the time
    set now1=%now:~0,2%
    ::  First 4 characters of the time
    set now12=%now:~0,4%
    ::  Middle 2 characters of the time
    set now2=%now12:~-2%
    ::  Last 2 characters of the time
    set now3=%now:~-2%
    if /I not "%now3%"=="pm" goto skpmltryhour
    ::  Setting the military hour
    if "%now1%"=="01" set mltryhour=13
    if "%now1%"=="02" set mltryhour=14
    if "%now1%"=="03" set mltryhour=15
    if "%now1%"=="04" set mltryhour=16
    if "%now1%"=="05" set mltryhour=17
    if "%now1%"=="06" set mltryhour=18
    if "%now1%"=="07" set mltryhour=19
    if "%now1%"=="08" set mltryhour=20
    if "%now1%"=="09" set mltryhour=21
    if "%now1%"=="10" set mltryhour=22
    if "%now1%"=="11" set mltryhour=23
    if "%now1%"=="12" set mltryhour=12
    goto setmltrytime
    :skpmltryhour
    ::  Setting the military hour
    set mltryhour=%now1%
    if "%now1%"=="12" set mltryhour=00
    goto setmltrytime
    :setmltrytime
    ::  Setting the military time
    set mltrytime=%mltryhour%%now2%
    goto setcurrentdaytime
    :setcurrentdaytime
    ::  Setting the current day with the military time
    set currentdaytime=%today%_%mltrytime%
    set dismaction=
    set scrtchdir=
    set captureimgloc=
    set capturepath=
    set vercptrinput=
    set sourcepath=
    set sourcewim=
    set applypath=
    set frmtdrv=
    set verapplinput=
    echo=Enter the imaging action you want to execute
    SET /P dismaction=(Capture, Apply). . . . . . . . .
    if /i "%dismaction%"=="capture" goto capture
    if /i "%dismaction%"=="apply" goto apply
    if /i "%dismaction%"=="" echo. & echo You must enter an imaging action & goto end
    echo. & echo You entered an invalid choice. You must enter Capture or Apply & goto end
    goto %dismaction%
    :capture
    echo.
    echo=Enter the target location (drive\directory) where you want to CAPTURE your
    SET /P captureimgloc=backup image. . . . . . . . . . .
    if /i "%captureimgloc%"=="" echo. & echo You must enter a target location where you want to CAPTURE your backup image & goto end
    if not exist %captureimgloc% echo. & echo You entered an invalid target location & goto end
    ::  First 2 characters of SCRATCHDIR
    set scrtchdir=%captureimgloc:~0,2%
    if not exist %scrtchdir%\images\scratchdir md %scrtchdir%\images\scratchdir
    echo.
    echo=Enter the path (drive\directory) you want to backup (CAPTURE)
    SET /P capturepath=. . . . . . . . . . . . . . . . .
    if /i "%capturepath%"=="" echo. & echo You must enter a drive\directory to backup (CAPTURE) & goto end
    if not exist %capturepath% echo. & echo You entered an invalid drive\directory to backup (CAPTURE) & goto end
    cls
    echo.
    echo Verify the below selections prior to beginning . . .
    echo.
    echo IMAGING ACTION . . . . . . . . . . . . . %dismaction%
    echo LOCATION WHERE IMAGE WILL BE SAVED . . . %captureimgloc%
    echo DRIVE\DIRECTORY TO BACKUP (CAPTURE). . . %capturepath%
    echo IMAGE NAME OF BACKUP (CAPTURE) . . . . . %currentdaytime%.wim
    echo.
    SET /P vercptrinput=Does the above selections appear correct? (yes, no)
    if /i "%vercptrinput%"=="" echo. & echo You must enter yes or no & goto end
    if /i "%vercptrinput%"=="yes" goto startcapture
    if /i "%vercptrinput%"=="no" goto end
    goto end
    :startcapture
    @echo on
    %systemroot%\system32\Dism.exe /capture-image /ImageFile:%captureimgloc%\%currentdaytime%.wim /CaptureDir:%capturepath% /LogLevel:3 /LogPath:%captureimgloc%\%currentdaytime%.log /Compress:max /CheckIntegrity /Verify /ScratchDir:%scrtchdir%\images\scratchdir
    /Name:"DISM WIM image of %capturepath%"
    @echo off
    goto end
    :apply
    echo.
    echo=Enter the path to the drive\directory where the image is you want to APPLY
    SET /P sourcepath=. . . . . . . . . . . . . . . . .
    if /i "%sourcepath%"=="" echo. & echo You must enter a path where there is a valid WIM image file & goto end
    if not exist %sourcepath%\*.wim echo. & echo You entered an invalid path & goto end
    echo.
    dir %sourcepath%\*.wim /b /on
    echo.
    echo Enter a WIM image filename from the above available captured images to APPLY
    SET /P sourcewim=(exclude the WIM file ext.) . . .
    if /i "%sourcewim%"=="" echo. & echo You must enter a WIM image filename to APPLY & goto end
    if not exist %sourcepath%\%sourcewim%.wim echo. & echo You entered an invalid WIM image file [%sourcewim%.wim] & goto end
    ::  First 2 characters of SCRATCHDIR
    set scrtchdir=%sourcepath:~0,2%
    if not exist %scrtchdir%\images\scratchdir md %scrtchdir%\images\scratchdir
    echo.
    echo Enter the target restore path (drive\directory) where you want to APPLY
    SET /P applypath=the image . . . . . . . . . . . .
    if /i "%applypath%"=="" echo. & echo You must enter a path where you want to APPLY the image & goto end
    if not exist %applypath% echo. & echo You entered an invalid path to APPLY the image & goto end
    echo.
    echo Do you want to FORMAT the target drive where you will APPLY the image?
    SET /P frmtdrv=(yes, no) . . . . . . . . . . . .
    if /i "%frmtdrv%"=="" echo. & echo You must enter yes or no & goto end
    if /i "%frmtdrv%"=="yes" goto applyverify
    if /i "%frmtdrv%"=="no" goto applyverify
    :applyverify
    cls
    echo.
    echo Verify the below selections prior to beginning . . .
    echo.
    echo IMAGING ACTION . . . . . . . . . . . . . %dismaction%
    echo SOURCE IMAGE LOCATION. . . . . . . . . . %sourcepath%
    echo IMAGE FILENAME . . . . . . . . . . . . . %sourcewim%.wim
    echo IMAGE RESTORE PATH . . . . . . . . . . . %applypath%
    echo FORMATTING TARGET DRIVE. . . . . . . . . %frmtdrv%
    echo.
    set /p verapplinput=Does the above selections appear correct? (yes, no)
    if /i "%verapplinput%"=="" echo. & echo You must enter yes or no & goto end
    if /i "%verapplinput%"=="no" goto end
    if /i "%verapplinput%"=="yes" echo. & goto formatdrive
    goto end
    :formatdrive
    if /i "%frmtdrv%"=="no" goto startapply
    ::  First 2 characters of APPLYPATH
    set frmtpath=%applypath:~0,2%
    echo.
    if not exist %frmtpath%\bootmgr echo The folder selected is not a SYSTEM folder & goto end
    echo The SYSTEM drive has been verified for FORMATTING & echo.
    %systemroot%\system32\format.com %frmtpath% /fs:ntfs /q /v:SYSTEM /x /y
    :startapply
    @echo on
    %systemroot%\system32\Dism.exe /apply-image /imagefile:%sourcepath%\%sourcewim%.wim /index:1 /ApplyDir:%applypath% /LogLevel:3 /LogPath:%sourcepath%\%sourcewim%.log /ScratchDir:%scrtchdir%\images\scratchdir
    @echo off
    goto end
    :end

  • Capturing image from Webcam

    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

  • Capture Image from Screen and Yosemite Mail

    Composing a new mail message in Yosemite. If use the pull-down option to Capture Image from Screen and place the image in the message body (HTML), the image is not being sent with the message. A broken image icon is sent instead.
    If, on the other hand, I use the paperclip to add an image file to the message body all is well. Same if I copy and paste an image into the message body.
    In both those cases where it works, I also get the Markup pulldown to edit the image. In the Capture Image from Screen case where it doesn't work I also don't get the Markup pulldown menu and options.
    Anyone else seeing this? Is it a known bug with Yosemite or just on my side?

    I'm actually experiencing the same thing, i asked my officemate and he is also getting the same error when using capture on mac mail

Maybe you are looking for

  • Wont Hold Charge?

    I have a 5th Generation 30gb iPod video that I need help with. It cycles from the apple logo to the sad ipod screen and it is not recognized by my computer or itunes. Is this because the battery cant hold the charge? Please help me!

  • Combine iWeb with Pages and ExcelMac

    I would like to introduce a table with data and some functions in iWeb. The objective is to let the user of the web change the data and let him/her to see the result in the cells where the functions are. I've tried in the easy way: copy-paste and it

  • XML Publisher 6.5.2 MS word Template Builder fails

    Dear all, My env is: Oracle DB 10.1.0.5 on redhat Linux, XML publisher 6.5.2 on Windows 2000. While using the XML publisher GUI from the browser, I am able to connect successfully to the database. However, when I try to build a RTF template from MS w

  • Calculated columns to get difference between two dates with half day

    Hi, So there is the problem I'm using a calculated column to track the number of day when an employee make a vacation request. I'm already taking weekends of the case but now I would need to be able to ask for only a half day off. How could I perform

  • I Movie vs. Final Cut /express

    Is it worth it to start doing movie editing in Final cut vs i movie. What are the differences?