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.

Similar Messages

  • 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

  • How to embed the Images in the java sourse

    How to embed the Images in the java sourse
    The size of the file will be too large while I put the binary code of the image into the java sourse!
    thanks

    You could encrypt them with a private key and then
    decrypt them with a public key.
    Almost had it... public key encryption works the other
    way around... otherwise what's the point of
    encrypting... if the decryption key is public?Spinoza's right. Public key encryption works both ways, but it would be useless in this case to encrypt with the private key. The problem is, how do you package your private key with the application in a way that doesn't allow the user to get it? Encrypt it? :-) I agree that there's no point to this exercize. If users want to screw up the application by editing its image files, let 'em.

  • 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 change a setting in the Java Control Panel with command line

    Hi,
    I am trying to figure out how to change a setting in the Java Control Panel with command line or with a script. I want to enable "Use SSL 2.0 compatible ClientHello format"
    I can't seem to find any documentation on how to change settings in the Java Control Panel via the command line
    Edited by: 897133 on Nov 14, 2011 7:15 AM

    OK figured it out. This is for the next person seeking the same solution.
    When you click on the Java Control Panel (found in the Control panel) in any version of Windows, it first looks for a System Wide Java Configuration (found here: C:\Windows\Sun\Java\Deployment). At this point you must be wondering why you don't have this folder (C:\Windows\Sun\Java\Deployment) or why its empty. Well, for an enterprise environment, you have to create it and place something in it - it doesn't exist by default. So you'll need a script (I used Autoit) to create the directory structure and place the the two files into it. The two files are "deployment.properties" and "deployment.config".
    Example: When you click on the Java Control Panel it first checks to see if this directory exists (C:\Windows\Sun\Java\Deployment) and then checks if there is a "deployment.config". If there is one it opens it and reads it. If it doesn't exist, Java creates user settings found here C:\Users\USERNAME\AppData\LocalLow\Sun\Java\Deployment on Windows 7.
    __deployment.config__
    It should look like this inside:
    *#deployment.config*
    *#Mon Nov 14 13:06:38 AST 2011*
    *# The First line below specifies if this config is mandatory which is simple enough*
    *# The second line just tells Java where to the properties of your Java Configuration*
    *# NOTE: These java settings will be applied to each user file and will overwrite existing ones*
    deployment.system.config.mandatory=True
    deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    If you look in C:\Users\USERNAME\AppData\LocalLow\Sun\Java\Deployment on Windows 7 for example you will find "deployment.properties". You can use this as your default example and add your settings to it.
    How?
    Easy. If you want to add *"Use SSL 2.0 compatible ClientHello format"*
    Add this line:
    deployment.security.SSLv2Hello=true
    Maybe you want to disable Java update (which is a big problem for enterprises)
    Add these lines:
    deployment.javaws.autodownload=NEVER
    deployment.javaws.autodownload.locked=
    Below is a basic AutoIt script you could use (It compiles the files into the executable. When you compile the script the two Java files must be in the directory you specify in the FileInstall line, which can be anything you choose. It will also create your directory structure):
    #NoTrayIcon
    #RequireAdmin
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    Func _JavaConfig()
         $ConfigFile_1 = @TempDir & "\deployment.properties"
         $ConfigFile_2 = @TempDir & "\deployment.config"
         FileInstall ("D:\My Documents\Autoit\Java config\deployment.properties", $ConfigFile_1)
    FileInstall ("D:\My Documents\Autoit\Java config\deployment.config", $ConfigFile_2)
         FileCopy($ConfigFile_1, @WindowsDir & "\Sun\Java\Deployment\", 9)
         FileCopy($ConfigFile_2, @WindowsDir & "\Sun\Java\Deployment\", 9)
         Sleep(10000)
         FileDelete(@TempDir & "\deployment.properties")
         FileDelete(@TempDir & "\deployment.config")
    EndFunc
    _JavaConfig()
    Now if you have SCUP and have setup Self Cert for your organization, you just need to create a SCUP update for JRE.
    Edited by: 897133 on Nov 16, 2011 4:53 AM

  • In iPhoto, how can I export images with the metadata - including the title and caption information - intact as part of the image?

    In iPhoto, how can I export images with the metadata — including the title and caption information — intact as part of the image?

    Check those boxes in the export dialogue - Exporting From iPhoto
    LN

  • HELP!!!! I have spent hours trying to find out how to embed an image with a link or a Microsoft Word document with a hyperlink built within the document -- not as an attachment! Does ANYONE know the secret? Can it be done, or not! My PC clients do it.

    HELP!!!! I have spent hours trying to find out how to embed an image with a link, or embed a Microsoft Word document with a hyperlink built within the document -- not as an attachment into my email -- but where it shows as the email content when opened! Does ANYONE know the secret? Can it be done, or not? My PC clients do it all the time easily. Then I want to be able to send the embedded image/document (not as an attachment, but visable within the email when opened) to many email contacts at once, BUT the individuals receiveing them DO NOT SEE the other email contacts. Cannot seem to be able to find anything on being able to do these 2 tasks.PLEASE, SOMEONE, HELP!!!

    Don't know if this applies to Lion, but read here:
    http://www.makeuseof.com/tag/create-html-announcement-mail-iweb-mac/

  • How to import the image by using java application

    1.how to import the image by using java APPLICATION and display it on the textarea that you have been created.
    2.how to store the image into the file.
    3. what class should i used?
    4. how to create an object to keep track the image in java application.
    * important : not java applet.
    plzzzzzzz.
    regards fenny

    follow the link:
    http://java.sun.com/docs/books/tutorial/2d/images/index.html

  • How to make slide images with Dreamweaver CS6?

    How to make slide images with Dreamweaver CS6? Please teach me.

    Hello
    in addition to Jon's hint, I'll send you some links to nice sliders (have fun with the different representations ):
    http://sandbox.scriptiny.com/javascript-slideshow/
    http://jquery.malsup.com/cycle/
    http://wowslider.com/best-jquery-slider-crystal-linear-demo.html
    http://www.jcoverflip.com/demo
    http://www.jacksasylum.eu/ContentFlow/
    http://addyosmani.com/blog/jqueryuicoverflow/
    You only need to use the source code to implant these shows there where you want. In my eyes it would be the best that you use first a very new and blank DW file to perform (maybe in LiveView) the one or the other.
    Hans-Günter

  • How to write a messenger with using java?

    May I know how to write a messenger with using java? The messenger need included two functions which are file transfer and add users to join the conversation.
    Thank you.

    Ok, so you need to start from the beginning, the requirements, is it a swing (i.e. GUI) app, web app, console, etc...?
    As stated by sprizor making an IM client is no easy task, you need to both implement the server side and the client side, which both communicate with each other, file transfers are also quite complex, and even maintaining a multi-user chat can be quite difficult.
    If you are after a Web Based app, then you will need to look into Push technologies, like Grizzly Comet which is a nice wrapper for the NIO java stuff:
    https://grizzly.dev.java.net/
    Good luck...

  • Can anybody tell how to compare two documents with two pointers controlled with the same mouse

    can anybody tell how to compare two documents with two pointers controlled with the same mouse ??

    I saw what I need but in a game to find the differences between two photos (two screens, two pointers controlled by one mouse), and I need a program to make the same thing   (compare a chosen files)

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

  • 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 can i Display images with may own table

    Hi
    I want display images with my own table. How can I use in this query.
    SELECT    '<a href="#" onclick="javascript:'
           || 'getImageHeight(''my_img'
           || '#ROWNUM#'');javascript:redirect'
           || '(''f?p=&APP_ID.:212'
           || ':&SESSION.:DISPLAY:NO::P212_IMAGE_ID:'
           || ID
           || ''');">'
           || '<img src="#IMAGE_PREFIX#edit.gif" '
           || 'alt="Edit"></a>' ID,
              '<img id="my_img'
           || '#ROWNUM#" src="#WORKSPACE_IMAGES#'
           || filename
           || '"/>' image
      FROM wwv_flow_filesThanks
    Nr
    Edited by: user10966033 on Sep 28, 2009 1:41 PM

    You don't use #workspace_images# since that is for STATIC files, not images in a table..
    see this thread for help: Re: Display image from blob
    Thank you,
    Tony Miller
    Webster, TX

Maybe you are looking for

  • Install Windows 8.1 on my Xperia Z2

    Hey guys is it possible to install Windows 8.1 on my Xperia device because i really love Sony and i really love Windows OS! Really i don't know how to fix this problem i like Sony and hate Android OS! I like Windows OS i hate Nokia device with ugly d

  • Flatfile output mask with source file name without extension

    I have an input file with name abcdefgh.xml. This is converted to flatfile output, but I want the flatfile output name to be abcdefgh. If I use the %SourceFileName%, I am getting the output filename as abcdefgh.xml, I want it to be abcdefgh

  • How to use win32 API in flex

    hi, Can someone share some sample codes about using win32 API in Flex if possible ? Thanks

  • Oracle 11gR2 on Windows 7 Questions

    I am thinking about installing Oracle 11g R2 Express Edition on my 64bit Windows 7 laptop. I am wanting to use it to access an Oracle 10g database and develop SSRS 2008 reports against that database. Here are my questions... Will the 11g R2 connect t

  • 3D Print Resolution on MakerBot Replicator 2

    HI All, Is a week that i'm printing with Photoshop on my Replicator 2... but i found some resolution problems. as you can see in this detail the  model printed at 0.07 mm resolution is almost alf respect the same model printed on makerware at 0.1mm.