How to capture an Image

Hypothetically...
I have an image drawn on a JPanel, say, a line running through a circle. How do I go about capturing this particular image, w/out getting other images that mau be present?
Also, is there a way for me to allow the user to selct an image by either
* - selecting it using a rectangle
* - drawing around the image (via the mouse)
and then pasting it wherever they please?
Thanks again...

weird...
For image capture from components, you can do a couple things...
java.awt.Robot.createScreenCapture() can capture whatever's on the screen within the given area.
Or you can create an image object and paint on it, either by drawing on the graphics object of the image directly, or passing the graphics object to a component to have it draw itself on the component.
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = bi.createGraphics();
comp.paint(g2d);
// or draw on the graphics yourself
hi i actullay new to the forum so can you please tell me first to
whom i sen't this message to.you sent it to everyone...
For video capture stuff, look up Java Media Framework.

Similar Messages

  • How to capture an image from my usb camera and display on my front panel

    How to capture an image from my usb camera and display on my front panel

    Install NI Vision Acquisition Software and NI IMAQ for USB and open an example.
    Christian

  • How to capturing scrolling images with no java controls?

    Can somebody help me? I am trying to capture the image of the browser, using the followed code to do it, but I can not take it scrolling the screen. I do not use any control of java in the browser. Does anybody have an idea?
    Robot r = new Robot();
    image1 = r.createScreenCapture(clippedScreen);
    File file = new File("c:\\Csa\\3.9\\Fimages\\"+counter+".jpg");
    javax.imageio.ImageIO.createImageOutputStream(file);
    ImageIO.write(image1,"jpg",file);
    //Scroll the screen
    scrollTheScreen ();
    //Takes scrolled area
    image2 = r.createScreenCapture(new Rectangle(0,666,1280,80));
    File file2 = new File("c:\\Csa\\3.9\\Fimages\\"+counter+1+".jpg");
    javax.imageio.ImageIO.createImageOutputStream(file2);
    ImageIO.write(image2,"jpg",file2);
    As you can see I take two parts of the screen but I am having troubles adding the images, I do not know if there is an easier way to do this.
    Thank you in advance.

    Thanks to anybody, but i found the way on how to capture the image.
    1. Take a snapshot of the screen.
    2. Scroll the screen pushing the button down.
    3. Take the snapshot of the scrolled part of the screen.
    4. Scroll the screen pushing the button down.
    5. Take the snapshot of the scrolled part of the screen.
    6. Compare the 2 last images, if they are equals, stop scrolling, else scroll again.
    7. Join the images first, second and third images, to get a single one corresponding to the hole info of the browser.
    8. Save the resulting image.
    The thing in this problem is to manage the images as RGB components for that you must use the getPixel(col, row, color); method to manipulate the components in matrix and added to a bigger matrix where you join the complete components. Be sure that you manage the 3D matrix correctly, [width of the screen] [height of the screen] [RGB components], i.e.
    * This saves just the red component, the green and blue must be saved too.
    public int[][] imreadRed(BufferedImage bi)
              Raster r = null;     // * Raster
              int [][] image;     // * Image array
              int imageWidth = bi.getWidth();     // * Image Width
              int imageHeight = bi.getHeight();     // * Image Height
              int[] color = new int[3];     // * array to colors RGB (r -> 0, g -> 1, b -> 2)
              r = bi.getData();
              image = new int[imageHeight][imageWidth];
              for(int row = 0; row < imageHeight; row++)
                   for(int col = 0; col < imageWidth; col++)
                        r.getPixel(col, row, color);
                        image[row][col] = color[0];          //Saves the red color to the array image on the first coordinate
              return image;     //Return the array with the red component
         }* This merge the matrix into a bigger one.
    public int [][] mergeMatrix (int [][] mat1, int [][] mat2){
             int rowsMat1 = (mat1.length-53), colsMat1 = mat1[0].length,     //mat1.length da los renglones de la matriz height  
             rowsMat2 = mat2.length, colsMat2 = mat2[0].length;          //mat1[0].length da las columnas de la matriz width
             int [][] addedMatrix = new int [rowsMat1+rowsMat2][colsMat1];
             for (int row = 0; row < rowsMat1; row++) {
                  for (int col = 0; col < colsMat1; col++) {
                       addedMatrix [row] [col] = mat1 [row] [col];
              for (int row=0; row < rowsMat2; row++) {
                   for (int col = 0; col < colsMat2; col++) {
                        addedMatrix [rowsMat1+row] [col]  = mat2 [row] [col];
             return addedMatrix;
        }* This convert the matrix into an image.
    public BufferedImage imwriteComponents (int [][] arrRedImg, int [][] arrGreenImg, int [][] arrBlueImg) {
              int arrayWidth = arrRedImg[0].length;     // * Image Width
              int arrayHeight = arrRedImg.length;     // * Image Height
              BufferedImage completeImage = new BufferedImage(arrayWidth, arrayHeight, BufferedImage.TYPE_INT_RGB);     // Create a BufferedImage with RGB pixels
              WritableRaster wRaster = completeImage.getRaster();     // Create a raster so we can access the BufferedImage pixels
              int [] color = new int [3];     //color variable to save all the components
              //join the 3 matrix in one color type
              for(int row = 0; row < arrayHeight; row++)
                   for(int col = 0; col < arrayWidth; col++) {
                        color [0] = arrRedImg [row][col];
                        color [1] = arrGreenImg [row][col];
                        color [2] = arrBlueImg [row][col];
                        wRaster.setPixel(col, row, color);
              return completeImage;     //Return the Buffered image with the red array component
        }That is a solution that I found to this problem, if someone has an easy way to do it please tell us.
    Thank you.

  • Deployment Workbench - how to capture an image after customisation?

    I have deployed Vista to a machine using WinPE (Created through Workbench) and chose the option when deploying "Prepare for capture"
    I then customised Vista - in this case removing the Fax applications and ran Sysprep with OOBE, Generalise and Shutdown.
    In workbench I created a new task sequence 'Standard Client Replace task sequence' which seems to be the right task to capture an image.
    When selecting the task when booting the machine with WinPE, it forces me to capture the user data - I cannot select 'Do not save data and settings'
    I must be doing something wrong!
    What I want to do is:
    Deploy Vista
    Install some apps manually i.e. not using a task sequence
    Capture the image
    Deploy to machines
    How can I do this using Workbench? Thanks.

    Hi,
    Thank you for the reply.
    I suggest referring to the following article:
    Creating a Computer Image
    http://technet.microsoft.com/en-us/library/bb977918.aspx
    If you select “Capture an image of this reference computer” on the “Specify whether to capture an image” page when running Deployment Wizard, it will sysprep and capture the system for you automatically.
    If you would like to
    “Install Vista and prepare for capture
    Install my own applications WITHOUT using task sequences
    Capture the OS”,
    I am afraid that you do not need to use MDT (you cannot perform a LTI without running Task Sequences). You can do this by only using WDS.
    1.   Install and configure the WDS Server.
    2.   Add the default Windows Server 2008 boot image to the WDS Server.
    3.   Create Capture Boot Image and add it to boot image in WDS Server.
    4.  Create a reference computer (install the operating system, applications, and make any other changes)
    5.  Sysprep.
    6.  PXE boot the reference computer into capture image on the boot screen and then capture the image (If non-PXE supported, make a discover image to boot)
    7.  Upload the captured image to WDS server.
    8.  Clients can PXE boot and install Windows (If non-PXE supported, use a discover image to boot).
    Hope it helps.
    Tim Quan - MSFT

  • How to capture an image and save it using action script

    Hello,
    I need to know if is posible to capture an image or a screen region and save it using action scrip.
    Somebody know how to do it ??
    Thanks

    you can capture an image using the bitmapdata class and getPixel().  you can then save that to a bitmap using server-side code like php.

  • How to capture an image from a clip

    Hi,
    Is there a way to capture an image from a movie clip using iMovie 06?
    I would like to save some frames from the vedio footage as photos.
    Any help will be greatly appreciated. Thank you.
    New Mac User
      Mac OS X (10.4.5)  

    Hi iMac User:
    Yes-you can save a single frame from iMovie by selecting the File-->Save Frame As option. From there it will ask you where and in what format you want to save it.
    Just be aware that the quality won't be perfect because it is taken from a video clip.
    Sue

  • How to capture an image with the camera axis

    Hi,
    I have an camera axis. I can receive the video. Now I try to capture an image, for example when I push the button take. I do the .vi but I confused between the different Method.
    SaveCurrentImageave the current Image
    GetImage:Gets the data corresponding to the image currently being
    displayed.SetImage:Adds an Image to the Clipboard in the Bitmap format
    That I search is to know if to capture image and saving when I push an button  I need to put all Icons so SetImage after Getimage and SavecurrentImage.
    I put my .vi.  
    Attachments:
    Capture_image.vi ‏11 KB

    Hello,
    Did you download the kit sdkfor using the axis media control active X:
    http://www.axis.com/fr/techsup/cam_servers/dev/activex.htm
    Did you test the sample and did you test with another language?
    Regards,
    Nacer M. | Certified LabVIEW Architecte

  • Need to capture multiple image paths for responsive design when only one will be displayed at a time

    I'm new to CQ and am having enough trouble following the documentation on image components as it is (why is there no master reference for all this?). I have a requirement where we need to capture three versions of an image and put the URLs into three attributes of a tag. The appropriately sized image will be selected via JavaScript based on the browser/device capabilities. I need to know how to capture those images when seemingly only one at a time can be dropped onto the page. Or perhaps there is a more CQ solution to this.

    Hi,
    You need to customize image component. I mean selected image is a asset in the repository and each asset by default has 3 rendtion generated when the image is uploaded in the dam.
    For example when you upload image.jpg file into the DAM, standard workflow is launched and after a while inside the repository (see paths) are created following renditions:
    /content/dam/project/image/image.jpg/jcr:content/renditions/cq5dam.thumbnail.140.100.png
    /content/dam/project/image/image.jpg/jcr:content/renditions/cq5dam.thumbnail.319.319.png
    /content/dam/project/image/image.jpg/jcr:content/renditions/cq5dam.thumbnail.48.48.png
    This process can be customized by changing /etc/workflow/models/dam/update_asset.html workflow and modifing "Thumbnail creation" step by adding in the Process tab -> Arguments field new values for new rendition. So for example if you add there [400,400] new rendition will be created in the path
    /content/dam/project/image/image.jpg/jcr:content/renditions/cq5dam.thumbnail.400.400.png
    Next step is to customize jsp for image component. Using path to the drag and dropped image from a component attributes you can easily take all renditions iterating on the /content/dam/project/image/yourimage.jpg/jcr:content/renditions node and then set paths to all renditions in the tag attributes. Then like you wrote using js you can select proper rendition.
    I hope that it hepls you.
    Regards,
    Adam

  • How to get my images always order by file name, and not by time of captur, in all the folders in the library?

    How to get my images always order by arquive name, and not by time of captur, in all the folders in the library?
    Sorry for the poor english, but im portugues.
    In the library we can change the order of classification of image by, time of capture, name of file etc... I'm wondering if its possible define to be always by the name of file.
    It ´s possible?
    And i have other question, in print label we have an option to auto rotate to feet in page to have the image using the maximum area in the page (auto rotate, zoom etc), its possible to change the orientation of the rotation to be always in  the other direction?

    The Muvos are USB Mass Storage devices and do not have the ability to display track information based upon ID3 tags.
    The Zens all read and display track info based upon ID3 tag information that is either gathered from an online source or entered by the end-user.
    If you want the track information displayed instead of the ID3 tag information, you could edit the ID3 tags and rename the title to whatever you have as the file name. Not sure why your file names would differ so much from the ID3 tag info though, almost all of my content has the same name for the filename as it does on the ID3 tag title.

  • When I am trying to package my artwork in Adobe Illustrator CC, it is not capturing my images and fonts. How do I make sure my linked photos and fonts are captured?

    When I am trying to package my artwork in Adobe Illustrator CC, it is not capturing my images and fonts. How do I make sure my linked photos and fonts are captured?

    Not all fonts can be packaged depending on their licensing. Some fonts are set to not allow packaging. For those you would have to manually locate them on your computer and add them to the folder where the packaging occurred.
    For the images have you checked the "copy links" option?

  • How to change the path of sysprep files that were copied to reference computer when i capture the image from reference.

    Dears ,,
    how to change the path that sysprep were copied to reference computer when i capture the image from reference.
    Should i modify some codes in LTIAPPLY.wsf? how to modify it?
    Thanks.

    Sysprep and capture has *Three* steps.
    1. Run sysprep on the local machine (easy).
    2. Copy WinPE down to the local machine so we can reboot into winpe for capture.
    3. Capture the drive in an *offline* state from within WinPE.
    What is most likely happening is that you are having problems with step #2. 100MB is *WAY* too small to copy down WinPE. By default MDT will make this System partition much bigger, 499MB. IF you install Windows 7 from the default media. IT will only create
    a 100MB partition.
    By default MDT 2012 Update 1 and greater *should* recover to a fallback drive with the OS on it, however if you are running older versions that might not happen correctly.
    If you are still having problems, copy your BDD.log file to a public share like OneDrive and copy the link here.
    Keith Garner - keithga.wordpress.com

  • How do I get Image Capture to recognize a printer on my network?

    I just got a new MacBook Pro. I have my epson printer on my network. How do I get Image Capture to recognize that I have a printer. Nothing comes up on devices. I'm sort of stabbing in the dark at network settings and I downloaded the latest Epson driver. Nothing seems to work. Can anyone help? Suz

    In Image Capture, a network printer / scanner will appear under "Shared". If it is hidden, a number will appear adjacent to it, representing the number of hidden devices.
    If it still does not appear, try resetting the printing system: Mac OS X: How to reset the printing system
    After you do that you will need to add the device again according to the instructions here:
    OS X Mavericks: Set up a printer
    Follow the instructions below Add a network printer
    Also read:
    Troubleshooting printer issues in OS X

  • How to Capture a UEFI Image Using ImageX

    Is there any special steps needed to capture a UEFI Windows 7 or 8 Image? Do I need to capture all partitions or just the Windows Partition?
    I have found articles describing how to apply the image but not how to capture it.
    Yeah Buddy!

    Hi,
    Here are 2 ways to capture the image,
    1st using Windows Deployment Server,
    http://www.petenetlive.com/KB/Article/0000735.htm
    2nd using Imagex my  Step
    by Step Guide
    Please bear in mind, that my answer is based on the details given in your post. The more I get the better the answer, Slan go foill, Paul

  • How to capture image from USB camera in Labview 2010

    Hey all,
    I am very new to Labview but am working on a project that requires me to use a sensor to send a signal to Labview to capture an image from a USB camera and save.  Then apply some image processing to do some geometric calculations.  The calculation will be based on pixels so I guess the image needs to be in bitmap form.  Right now I am just trying to start with the image acquisition part and was wondering if this can be done in Labview 2010.  I have the vision toolbox and NXT Robotics.  Are there any examples on this website that will help and do I have te proper tools to do this?  Once I get the image capture/grab to work using labview, then I could work getting a sensor signal to trigger that capture and finally the processing side. 
    Like I said, I am very new to this so I am not sure if I need to download any particular drivers or vi's that I am missing or what those might be.  Can someone provide some insight, links, or any help would be appreciated.
    Thanks in advance for any help/suggestions.

    Hi wklove,
    In order to do vision with LabVIEW you need to to have the Vision development module and have NI Vision Acquisition Software (VAS) installed. It sounds like you are missing VAS you can download it here. Once you have this installed you should be able to see your camera in Measurement and Automation (MAX). After you are able to see the camera, take a look at the NI Example Finder by going to Help » Find Examples
    Joe Daily
    National Instruments
    Applications Engineer
    may the G be with you ....

  • How do I capture still images with iSight?

    Is that possible. Do I need software to do this?
    Please help

    Hello, Judith,
    iSight needs software to do ANYTHING.
    Several apps that you can use to capture still images are listed in the Some Applications you can use with iSight FAQ, starting with iChat AV.
    The iChat AV menu command for a video snapshot is shown right at the top. You just need to have the Video Preview (My iSight) window active to do it.

Maybe you are looking for

  • Commons- jar's Compatibility with Java 1.7

    Hi, I need to know the compatibility between the following jar files and java 1.7: commons-beanUtils 1.8.0 commons-codec 1.3 commons-collections 3.1 commons-digester 1.8.1 commons-Fileupload 1.1.1 commonsHttpClient 3.1 commons-io 1.1 jcifs 1.2.25 jdo

  • Application does not work on firefox 3.5

    If the application is not working in mozilla firefox 3.5 then we are not able to test it in any other browser through this tool. What should be the fix for this issue

  • Output 'incorrectly processed', 'output could not be issued'

    Hi, We trying to trigger a Bill of Lading custom Z print output type. This output was working correctly for some time and now it has started failing. When we try to issue the output through screen option it gives message 'output could not be issued'.

  • Safari 3 still not displaying some pages correctly

    Since I'm a .mac subscriber I would love to switch back to Safari from Camino so I can keep my bookmarks all in sync. Safari version 3 seems to be much faster and perhaps a bit lighter than 2.0 so I'm fully ready to make the switch. However, I do hav

  • CASH AND BANK DAY BOOK

    Dear Freinds Where can i find Cash & Bank Day Book ..I am using Sap B1 2007B.. Is there any Journal Register in SAP B1 2007B Waiting for your reply warm regards anand