win32screenshot has finally made it to the version 1.0.0 (that’s
partly because Semantic Versioning (http://semver.org) rules are being
It’s taken over 4 years to arrive to that version number and i’m
pretty happy with the results.
Install it with
gem install win32screenshot and start using.
With the previous versions of win32screenshot you had to have
installed ImageMagick and RMagick to save pictures into some other
format than bmp. I think everyone who has walked that path knows how
pain-in-the-*** these things feel. Starting from this version
ImageMagick and RMagick are not needed to have to be installed! All
necessary ImageMagick libraries/binaries are bundled with the gem to
allow saving screenshots into bmp, gif, jpg and png formats.
The API got changed a lot (meaning that this version is backwards
incompatible), hopefully to the better. Check out the examples below:
Win32::Screenshot::Take.of(:window, :title => “Windows Internet
Win32::Screenshot::Take.of(:window, :title => /internet/i, :area =>
[10, 10, 20, 20]).write(“image.jpg”)
Win32::Screenshot::Take.of(:window, :hwnd =>
RAutomation::Window.new(:hwnd => 123456).
child(:class => “Internet
image = Win32::Screenshot::Take.of(:window, :hwnd => 123456)
image.height # => height of the image
image.width # => width of the image
image.bitmap # => bitmap blob
- Bundling all necessary libraries/binaries with the gem - ImageMagick
and RMagick are no more needed, finally!
- Using MiniMagick to save images to gif, jpg and png format
- Simplified and deleted a lot of code causing backwards
incompatibility and major API changes!
Refer to the README.rdoc and documentation for the overview of the
new and better API
- From now on this library is following Semantic Versioning (http://
Check out the source code at GitHub - jarmo/win32screenshot: Capture Screenshots on Windows with Ruby