in reply to Website screenshot
#!/usr/bin/perl use warnings; use strict; use Image::Magick; #must be on same virtual desktop as the browser #assume browser's xwindow id = 0xa00022 #use xwininfo to find it #xwininfo -name Mozilla #my $blob = `import -window 0xa00022 jpg: - `; sleep 5; #allows you time to minimize this script #else it will be on top #works my $blob = `import -window 0xa00022 jpg:`; # the x: stuff dosn't seem to work #my $blob = `import x: 0xa00022 jpg:`; #my $blob = `import -`; #postscript produced #print "$blob\n"; # now $blob is in memory and you can do what you # want with it. my $output = Image::Magick->new(magick=>'jpg'); $output->BlobToImage( $blob ); #$output->Resize(geometry=>'160x120'); $output->Write( $0.'.jpg'); exit; # png works too
|
---|