Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #4210
| X-Received | by 10.200.33.202 with SMTP id 10mr25683680qtz.29.1516005906798; Mon, 15 Jan 2018 00:45:06 -0800 (PST) |
|---|---|
| X-Received | by 10.31.170.131 with SMTP id t125mr3703679vke.6.1516005906590; Mon, 15 Jan 2018 00:45:06 -0800 (PST) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!ottix-news.ottix.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!z1no2313668qta.0!news-out.google.com!e39ni686qtk.1!nntp.google.com!z1no2313662qta.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.java.help |
| Date | Mon, 15 Jan 2018 00:45:06 -0800 (PST) |
| In-Reply-To | <fab9b7de-cf42-47be-961a-bc2cc99d3378@e6g2000prf.googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=41.215.29.158; posting-account=XnicyAoAAAAxiDlG30xuJkNO2IwJFPLF |
| NNTP-Posting-Host | 41.215.29.158 |
| References | <fab9b7de-cf42-47be-961a-bc2cc99d3378@e6g2000prf.googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <9a305105-5f0d-4fb4-bd78-2cde20c95f96@googlegroups.com> (permalink) |
| Subject | Re: Compare two images....? |
| From | peter.kariuki@nbo.samadc.org |
| Injection-Date | Mon, 15 Jan 2018 08:45:06 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Lines | 48 |
| Xref | csiph.com comp.lang.java.help:4210 |
Show key headers only | View raw
On Tuesday, April 1, 2008 at 10:11:23 PM UTC+3, TheBigPJ wrote:
> Suggestions on the best (preferably easiest way) to compare two images
> (captured both from the desktop via java robot) ?
>
> The following code is the code I will be using to take the screen shot
> (currently it saves just to a file):
>
> import java.awt.*;
> import java.awt.image.*;
> import java.io.*;
> import javax.imageio.*;
>
> class Screenshot{
>
> static public void main()
> {
> try
> {
> //Get the screen size
> Toolkit toolkit = Toolkit.getDefaultToolkit();
> Dimension screenSize = toolkit.getScreenSize();
> Rectangle rect = new
> Rectangle(0,0,screenSize.width,screenSize.height);
> Robot robot = new Robot();
> BufferedImage image = robot.createScreenCapture(rect);
> File file;
>
> //Save the screenshot as a png
> file = new File("screen.png");
> ImageIO.write(image, "png", file);
>
> //Save the screenshot as a jpg
> file = new File("screen.jpg");
> ImageIO.write(image, "jpg", file);
> }
> catch (Exception e)
> {
> System.out.println(e.getMessage());
> }
> }
> }
>
>
> Thank you,
> Peter (thebigpj)
https://photos.google.com/u/1/photo/AF1QipO13vU8-ye2z6EpePeG291YDp7MMupEVxl6rs9V
https://photos.google.com/u/1/photo/AF1QipPplix9mZCFzWdOl7GJiZWjrid2qcKxlagwluzY
Back to comp.lang.java.help | Previous | Next | Find similar
Re: Compare two images....? peter.kariuki@nbo.samadc.org - 2018-01-15 00:45 -0800
csiph-web