Image::XWD - X Window Dump image reader
use Image::XWD; my $img = new Image::XWD; $img->read_file('foo.xwd'); my $window_name = $img->get_window_name(); # get the window name saved by xwd(1) my ($r,$g,$b) = $img->xy_rgb(100,200); # get pixel at (100,200)
Image::XWD can be used to read the screenshot created by xwd(1).
- $img = new Image::XWD();
Constructs a new
Reads the given filename to the memory. Specify '-' as filename to read from stdin.
Returns the width of the image in pixels.
Returns the heigth of the image in pixels.
Returns the window name saved by xwd(1). If the image contains no window name undef is returned. (Note that this differs from emty string as window name.)
- $img->xy_rgb($x, $y)
Get the color of the pixel in RGB. The upper left corner is (0, 0) and the lower right corner is ($img->get_width()-1, $img->get_heigth()-1).
xwd(1), xwud(1), gimp(1), /usr/include/X11/XWDFile.h
Márton Németh, <email@example.com>
Copyright (C) 2008 by Márton Németh
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 387:
Non-ASCII character seen before =encoding in 'Márton'. Assuming UTF-8