win32screenshot 2.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.yardopts +2 -2
- data/CHANGES.md +174 -0
- data/Gemfile.lock +39 -39
- data/README.md +48 -0
- data/Rakefile +1 -0
- data/ext/{ImageMagick-6.9.3-0-portable-Q16-x86 → ImageMagick-7.0.9-8-portable-Q16-x86}/LICENSE.txt +103 -103
- data/ext/{ImageMagick-6.9.3-0-portable-Q16-x86 → ImageMagick-7.0.9-8-portable-Q16-x86}/convert.exe +0 -0
- data/ext/{ImageMagick-6.9.3-0-portable-Q16-x86/mogrify.exe → ImageMagick-7.0.9-8-portable-Q16-x86/identify.exe} +0 -0
- data/ext/{ImageMagick-6.9.3-0-portable-Q16-x86/identify.exe → ImageMagick-7.0.9-8-portable-Q16-x86/mogrify.exe} +0 -0
- data/lib/win32/screenshot.rb +1 -1
- data/lib/win32/screenshot/version.rb +1 -1
- data/rdoc.rb +3 -0
- data/spec/win32/screenshot/take_spec.rb +2 -2
- data/win32screenshot.gemspec +3 -3
- metadata +16 -17
- data/History.rdoc +0 -113
- data/README.rdoc +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 715102dbb42b3d540877ce3c29143f96cdb82038e6693807e174630b0c212df7
|
4
|
+
data.tar.gz: 8b9e11a96da5eb9fbc917d8ed84bcff3d9235e41d6ebb0c8abcd5c386f7899e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 237afec95fe95cf6b209fad244763c350adbfdd6477d72d6b74af6c7783cd33fb09d20f4a1f06aa07251529344bb190b17a43250c465239095b772e5d4407cb7
|
7
|
+
data.tar.gz: d36b345764cd101b823a2b742f96947b9137634739c00c08249159c2f5453a9ebf84a199692279f6e37fb8a78e008ae2ebb9fe356109c6bcc509aeb93e68f0b8
|
data/.yardopts
CHANGED
data/CHANGES.md
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
# 3.0.0 2019-12-11
|
2
|
+
* Use RAutomation 1.0.0 as its dependency to be able to use newer ffi.
|
3
|
+
* Update bundled ImageMagick to 7.0.9-8.
|
4
|
+
* Update MiniMagick dependency.
|
5
|
+
|
6
|
+
# 2.1.0 2016-01-09
|
7
|
+
* Add Image#write! for overwriting images.
|
8
|
+
* Update MiniMagick dependency.
|
9
|
+
* Update bundled ImageMagick version to 6.9.3-0-portable-Q16-x86.
|
10
|
+
|
11
|
+
|
12
|
+
# 2.0.0 2015-06-28
|
13
|
+
* Update MiniMagick dependency due to CVE-2013-2616.
|
14
|
+
* Update bundled ImageMagick version to 6.9.1-6-Q16-x86.
|
15
|
+
|
16
|
+
|
17
|
+
# 1.0.10 2013-11-01
|
18
|
+
* Add license to gemspec.
|
19
|
+
|
20
|
+
|
21
|
+
# 1.0.9 2013-10-05
|
22
|
+
* Set mini_magick 3.5.0 as a dependency because 3.6.0 is broken.
|
23
|
+
|
24
|
+
|
25
|
+
# 1.0.8 2013-03-09
|
26
|
+
* Loosen up dependencies
|
27
|
+
|
28
|
+
|
29
|
+
# 1.0.7 2012-02-23
|
30
|
+
* Bump RAutomation dependency
|
31
|
+
|
32
|
+
|
33
|
+
# 1.0.6 2011-10-16
|
34
|
+
* Screenshot will be taken of the whole window instead of client area - e.g.
|
35
|
+
with title bar and such.
|
36
|
+
* Added :context option to specify which area to take screenshot of -
|
37
|
+
possible values are :window or :client
|
38
|
+
Win32::Screenshot::Take.of(:window, :hwnd => 1234, :context => :client)
|
39
|
+
|
40
|
+
|
41
|
+
# 1.0.5 2011-08-18
|
42
|
+
* Minor output message change
|
43
|
+
|
44
|
+
|
45
|
+
# 1.0.4 2011-06-18
|
46
|
+
* Make sure that mini_magick 3.2 is used due to bug in 3.3-s dependency
|
47
|
+
subexec https://github.com/nulayer/subexec/issues/4
|
48
|
+
|
49
|
+
|
50
|
+
# 1.0.3 2011-04-17
|
51
|
+
* Try to take a screenshot of the window even if the activation of that
|
52
|
+
window fails.
|
53
|
+
|
54
|
+
|
55
|
+
# 1.0.2 2011-01-20
|
56
|
+
* Fixed to work with RAutomation version 0.4
|
57
|
+
|
58
|
+
|
59
|
+
# 1.0.1 2010-12-18
|
60
|
+
* Increased RAutomation dependency for version 0.3.0 due to it's new
|
61
|
+
Window#child method
|
62
|
+
* Making sure that RAutomation's Ffi adapter is always used
|
63
|
+
|
64
|
+
|
65
|
+
# 1.0.0 2010-12-17 - The New Beginning
|
66
|
+
* Bundling all necessary libraries/binaries with the gem - ImageMagick and
|
67
|
+
RMagick are no more needed, finally!
|
68
|
+
* Using MiniMagick to save images to gif, jpg and png format
|
69
|
+
* Simplified and deleted a lot of code causing backwards incompatibility and
|
70
|
+
major API changes!
|
71
|
+
Refer to the README.rdoc and documentation for the overview of the new and better API
|
72
|
+
|
73
|
+
* From now on this library is following Semantic Versioning
|
74
|
+
(http://semver.org) rules
|
75
|
+
|
76
|
+
|
77
|
+
# 0.0.8 2010-12-13
|
78
|
+
* Renamed Win32::Screenshot::Util.all_windows to all_desktop_windows (Roger
|
79
|
+
Pack)
|
80
|
+
* Added methods to Win32::Screenshot::Util class (Roger Pack):
|
81
|
+
* window_process_id
|
82
|
+
* window_class
|
83
|
+
* windows_hierarchy_with_info
|
84
|
+
* get_info
|
85
|
+
* location_of
|
86
|
+
|
87
|
+
* It's possible to search windows also by class name (Roger Pack)
|
88
|
+
* Child windows will be also searched for (Roger Pack)
|
89
|
+
|
90
|
+
|
91
|
+
# 0.0.7 2010-08-18
|
92
|
+
* Supports now fully JRuby, 1.9.1 and 1.9.2 MRI!
|
93
|
+
|
94
|
+
|
95
|
+
# 0.0.6 2010-08-07
|
96
|
+
* Trying to bring window to the foreground more aggressively (Roger Pack)
|
97
|
+
* Added utility class Win32::Screenshot.Util with some helper methods not
|
98
|
+
related directly with taking of the screenshots:
|
99
|
+
* all_windows - enumerates all windows and returns their titles and
|
100
|
+
window handles as an Array (Roger Pack)
|
101
|
+
* window_title(hwnd) - returns title of the window for specified handle
|
102
|
+
(Jarmo Pertman)
|
103
|
+
* window_hwnd(title_query) - returns handle of the window for specified
|
104
|
+
title (Jarmo Pertman)
|
105
|
+
* dimensions_for(hwnd) - returns a width and height for a window with
|
106
|
+
specified handle (Jarmo Pertman)
|
107
|
+
|
108
|
+
* Removed a file 'win32screenshot.rb' which was solely used for displaying
|
109
|
+
deprecation warnings for versions older than 0.0.4. Make sure than from
|
110
|
+
now on all require statements require 'win32/screenshot'!
|
111
|
+
|
112
|
+
|
113
|
+
## Bug Fixes:
|
114
|
+
* Fixed usages of gdi32.dll BitBlt (Roger Pack)
|
115
|
+
* It was impossible to specify correctly window titles with regular
|
116
|
+
expressions special characters in them (Roger Pack)
|
117
|
+
|
118
|
+
|
119
|
+
# 0.0.5 2010-07-07
|
120
|
+
* Added method window_area for capturing specified area of the window
|
121
|
+
instead of full window (Jarmo Pertman) Usage:
|
122
|
+
Win32::Screenshot.window_area(title, x1, y1, x2, y2) {|width, height,
|
123
|
+
bmp|}
|
124
|
+
* Added method foreground_area for capturing area of the foreground (Jarmo
|
125
|
+
Pertman) Usage: Win32::Screenshot.foreground_area(x1, y1, x2, y2) {|width,
|
126
|
+
height, bmp|}
|
127
|
+
* Added method desktop_area for capturing area of the visible view (Jarmo
|
128
|
+
Pertman) Usage: Win32::Screenshot.desktop_area(x1, y1, x2, y2) {|width,
|
129
|
+
height, bmp|}
|
130
|
+
* Added method hwnd_area for capturing area of the window with specified
|
131
|
+
handle (Jarmo Pertman) Usage: Win32::Screenshot.hwnd_area(hwnd, x1, y1,
|
132
|
+
x2, y2) {|width, height, bmp|}
|
133
|
+
|
134
|
+
|
135
|
+
## Internal changes
|
136
|
+
* Removed usage of ShowWindow with parameter SW_SHOW when trying to bring
|
137
|
+
window to front due it's behaviour of resizing window if it was maximized
|
138
|
+
(Jarmo Pertman)
|
139
|
+
* Using FFI::Struct when searching window handle (Roger Pack)
|
140
|
+
|
141
|
+
|
142
|
+
# 0.0.4 2010-05-27 - A Complete Overhaul
|
143
|
+
* Fixed a bug where taking of screenshots failed on some sizes of windows
|
144
|
+
(thanks for the tip from Tony Popiel)
|
145
|
+
* Blocks should be used when taking screenshots for cleaning up resources
|
146
|
+
after usage (Aslak Hellesøy)
|
147
|
+
* Changed library structure - it is now needed to require 'win32/screenshot'
|
148
|
+
(Aslak Hellesøy)
|
149
|
+
* Replaced Ruby::DL with Ruby-FFI for better VM support and less segfaults
|
150
|
+
(Jarmo Pertman)
|
151
|
+
* Added Ruby 1.9.1 support (Jarmo Pertman)
|
152
|
+
* Win32::Screenshot.window restores window if it's minimized before taking
|
153
|
+
screenshots and brings it to the foreground (Jarmo Pertman)
|
154
|
+
* Changed some internal method names (Jarmo Pertman)
|
155
|
+
* Replaced Test::Unit with RSpec and made specs more robust (Jarmo Pertman)
|
156
|
+
|
157
|
+
|
158
|
+
PS! This version is not backwards compatible due to different method names and
|
159
|
+
usage, but upgrading should be relatively easy nevertheless.
|
160
|
+
|
161
|
+
# 0.0.3 2007-01-18
|
162
|
+
* Fixed bug with too many callbacks
|
163
|
+
* Added get_hwnd(Regexp)
|
164
|
+
|
165
|
+
|
166
|
+
# 0.0.2 2006-12-02
|
167
|
+
* Added desktop method (patch from Ryan Schuft)
|
168
|
+
* Added HTTP server example (patch from Ryan Schuft)
|
169
|
+
* Added window(regexp) method
|
170
|
+
|
171
|
+
|
172
|
+
# 0.0.1 2006-11-29
|
173
|
+
* First release
|
174
|
+
|
data/Gemfile.lock
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
win32screenshot (
|
5
|
-
ffi (~> 1.
|
6
|
-
mini_magick (~> 4.
|
7
|
-
rautomation (~> 0.
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
diff-lcs (1.2.1)
|
13
|
-
ffi (1.
|
14
|
-
mini_magick (4.
|
15
|
-
rake (10.1.0)
|
16
|
-
rautomation (0.
|
17
|
-
ffi (~> 1.
|
18
|
-
rspec (2.13.0)
|
19
|
-
rspec-core (~> 2.13.0)
|
20
|
-
rspec-expectations (~> 2.13.0)
|
21
|
-
rspec-mocks (~> 2.13.0)
|
22
|
-
rspec-core (2.13.0)
|
23
|
-
rspec-expectations (2.13.0)
|
24
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
25
|
-
rspec-mocks (2.13.0)
|
26
|
-
yard (0.
|
27
|
-
|
28
|
-
PLATFORMS
|
29
|
-
ruby
|
30
|
-
x86-mingw32
|
31
|
-
|
32
|
-
DEPENDENCIES
|
33
|
-
rake
|
34
|
-
rspec (~> 2.5)
|
35
|
-
win32screenshot!
|
36
|
-
yard
|
37
|
-
|
38
|
-
BUNDLED WITH
|
39
|
-
1.
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
win32screenshot (3.0.0)
|
5
|
+
ffi (~> 1.11.0)
|
6
|
+
mini_magick (~> 4.9)
|
7
|
+
rautomation (~> 1.0.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
diff-lcs (1.2.1)
|
13
|
+
ffi (1.11.3-x86-mingw32)
|
14
|
+
mini_magick (4.9.5)
|
15
|
+
rake (10.1.0)
|
16
|
+
rautomation (1.0.0)
|
17
|
+
ffi (~> 1.11.0)
|
18
|
+
rspec (2.13.0)
|
19
|
+
rspec-core (~> 2.13.0)
|
20
|
+
rspec-expectations (~> 2.13.0)
|
21
|
+
rspec-mocks (~> 2.13.0)
|
22
|
+
rspec-core (2.13.0)
|
23
|
+
rspec-expectations (2.13.0)
|
24
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
25
|
+
rspec-mocks (2.13.0)
|
26
|
+
yard (0.9.20)
|
27
|
+
|
28
|
+
PLATFORMS
|
29
|
+
ruby
|
30
|
+
x86-mingw32
|
31
|
+
|
32
|
+
DEPENDENCIES
|
33
|
+
rake
|
34
|
+
rspec (~> 2.5)
|
35
|
+
win32screenshot!
|
36
|
+
yard
|
37
|
+
|
38
|
+
BUNDLED WITH
|
39
|
+
1.17.2
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# Win32::Screenshot
|
2
|
+
|
3
|
+
* http://github.com/jarmo/win32screenshot
|
4
|
+
|
5
|
+
|
6
|
+
## DESCRIPTION
|
7
|
+
|
8
|
+
Capture Screenshots on Windows with Ruby to bmp, gif, jpg or png formats!
|
9
|
+
|
10
|
+
## INSTALL
|
11
|
+
|
12
|
+
gem install win32screenshot
|
13
|
+
|
14
|
+
## SYNOPSIS
|
15
|
+
|
16
|
+
require 'win32/screenshot'
|
17
|
+
|
18
|
+
# Take a screenshot of the window with the specified title
|
19
|
+
Win32::Screenshot::Take.of(:window, title: "Windows Internet Explorer").write("image.bmp")
|
20
|
+
|
21
|
+
# Take a screenshot of the foreground
|
22
|
+
Win32::Screenshot::Take.of(:foreground).write("image.png")
|
23
|
+
|
24
|
+
# Take a screenshot of the foreground, and writing over previous image if it exists
|
25
|
+
Win32::Screenshot::Take.of(:foreground).write!("image.png")
|
26
|
+
|
27
|
+
# Take a screenshot of the specified window's top-left corner's area
|
28
|
+
Win32::Screenshot::Take.of(:window, title: /internet/i, area: [10, 10, 20, 20]).write("image.jpg")
|
29
|
+
|
30
|
+
# Take a screenshot of the window with the specified handle
|
31
|
+
Win32::Screenshot::Take.of(:window, hwnd: 123456).write("image.gif")
|
32
|
+
|
33
|
+
# Take a screenshot of the window's client area (e.g. without title bar) with the specified handle
|
34
|
+
Win32::Screenshot::Take.of(:window, hwnd: 123456, context: :client)
|
35
|
+
|
36
|
+
# Take a screenshot of the child window with the specified internal class name
|
37
|
+
Win32::Screenshot::Take.of(:rautomation, RAutomation::Window.new(hwnd: 123456).
|
38
|
+
child(class: "Internet Explorer_Server")).write("image.png")
|
39
|
+
|
40
|
+
# Use the bitmap blob for something else
|
41
|
+
image = Win32::Screenshot::Take.of(:window, hwnd: 123456)
|
42
|
+
image.height # => height of the image
|
43
|
+
image.width # => width of the image
|
44
|
+
image.bitmap # => bitmap blob
|
45
|
+
|
46
|
+
## Copyright
|
47
|
+
|
48
|
+
Copyright (c) Jarmo Pertman, Aslak Hellesøy. See LICENSE for details.
|
data/Rakefile
CHANGED
data/ext/{ImageMagick-6.9.3-0-portable-Q16-x86 → ImageMagick-7.0.9-8-portable-Q16-x86}/LICENSE.txt
RENAMED
@@ -1,103 +1,103 @@
|
|
1
|
-
Before we get to the text of the license, lets just review what the license says in simple terms:
|
2
|
-
|
3
|
-
It allows you to:
|
4
|
-
|
5
|
-
* freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes;
|
6
|
-
* use ImageMagick software in packages or distributions that you create;
|
7
|
-
* link against a library under a different license;
|
8
|
-
* link code under a different license against a library under this license;
|
9
|
-
* merge code into a work under a different license;
|
10
|
-
* extend patent grants to any code using code under this license;
|
11
|
-
* and extend patent protection.
|
12
|
-
|
13
|
-
It forbids you to:
|
14
|
-
|
15
|
-
* redistribute any piece of ImageMagick-originated software without proper attribution;
|
16
|
-
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that ImageMagick Studio LLC endorses your distribution;
|
17
|
-
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that you created the ImageMagick software in question.
|
18
|
-
|
19
|
-
It requires you to:
|
20
|
-
|
21
|
-
* include a copy of the license in any redistribution you may make that includes ImageMagick software;
|
22
|
-
* provide clear attribution to ImageMagick Studio LLC for any distributions that include ImageMagick software.
|
23
|
-
|
24
|
-
It does not require you to:
|
25
|
-
|
26
|
-
* include the source of the ImageMagick software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it;
|
27
|
-
* submit changes that you make to the software back to the ImageMagick Studio LLC (though such feedback is encouraged).
|
28
|
-
|
29
|
-
A few other clarifications include:
|
30
|
-
|
31
|
-
* ImageMagick is freely available without charge;
|
32
|
-
* you may include ImageMagick on a DVD as long as you comply with the terms of the license;
|
33
|
-
* you can give modified code away for free or sell it under the terms of the ImageMagick license or distribute the result under a different license, but you need to acknowledge the use of the ImageMagick software;
|
34
|
-
* the license is compatible with the GPL V3.
|
35
|
-
* when exporting the ImageMagick software, review its export classification.
|
36
|
-
|
37
|
-
Terms and Conditions for Use, Reproduction, and Distribution
|
38
|
-
|
39
|
-
The legally binding and authoritative terms and conditions for use, reproduction, and distribution of ImageMagick follow:
|
40
|
-
|
41
|
-
Copyright 1999-
|
42
|
-
|
43
|
-
1. Definitions.
|
44
|
-
|
45
|
-
License shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
46
|
-
|
47
|
-
Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
48
|
-
|
49
|
-
Legal Entity shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, control means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
50
|
-
|
51
|
-
You (or Your) shall mean an individual or Legal Entity exercising permissions granted by this License.
|
52
|
-
|
53
|
-
Source form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
54
|
-
|
55
|
-
Object form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
56
|
-
|
57
|
-
Work shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
58
|
-
|
59
|
-
Derivative Works shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
60
|
-
|
61
|
-
Contribution shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution.
|
62
|
-
|
63
|
-
Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
64
|
-
|
65
|
-
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
66
|
-
|
67
|
-
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
68
|
-
|
69
|
-
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
70
|
-
|
71
|
-
* You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
72
|
-
* You must cause any modified files to carry prominent notices stating that You changed the files; and
|
73
|
-
* You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
74
|
-
* If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
75
|
-
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
76
|
-
|
77
|
-
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
78
|
-
|
79
|
-
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
80
|
-
|
81
|
-
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
82
|
-
|
83
|
-
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
84
|
-
|
85
|
-
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
86
|
-
|
87
|
-
How to Apply the License to your Work
|
88
|
-
|
89
|
-
To apply the ImageMagick License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information (don't include the brackets). The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
90
|
-
|
91
|
-
Copyright [yyyy] [name of copyright owner]
|
92
|
-
|
93
|
-
Licensed under the ImageMagick License (the "License"); you may not use
|
94
|
-
this file except in compliance with the License. You may obtain a copy
|
95
|
-
of the License at
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
Unless required by applicable law or agreed to in writing, software
|
100
|
-
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
101
|
-
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
102
|
-
License for the specific language governing permissions and limitations
|
103
|
-
under the License.
|
1
|
+
Before we get to the text of the license, lets just review what the license says in simple terms:
|
2
|
+
|
3
|
+
It allows you to:
|
4
|
+
|
5
|
+
* freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes;
|
6
|
+
* use ImageMagick software in packages or distributions that you create;
|
7
|
+
* link against a library under a different license;
|
8
|
+
* link code under a different license against a library under this license;
|
9
|
+
* merge code into a work under a different license;
|
10
|
+
* extend patent grants to any code using code under this license;
|
11
|
+
* and extend patent protection.
|
12
|
+
|
13
|
+
It forbids you to:
|
14
|
+
|
15
|
+
* redistribute any piece of ImageMagick-originated software without proper attribution;
|
16
|
+
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that ImageMagick Studio LLC endorses your distribution;
|
17
|
+
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that you created the ImageMagick software in question.
|
18
|
+
|
19
|
+
It requires you to:
|
20
|
+
|
21
|
+
* include a copy of the license in any redistribution you may make that includes ImageMagick software;
|
22
|
+
* provide clear attribution to ImageMagick Studio LLC for any distributions that include ImageMagick software.
|
23
|
+
|
24
|
+
It does not require you to:
|
25
|
+
|
26
|
+
* include the source of the ImageMagick software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it;
|
27
|
+
* submit changes that you make to the software back to the ImageMagick Studio LLC (though such feedback is encouraged).
|
28
|
+
|
29
|
+
A few other clarifications include:
|
30
|
+
|
31
|
+
* ImageMagick is freely available without charge;
|
32
|
+
* you may include ImageMagick on a DVD as long as you comply with the terms of the license;
|
33
|
+
* you can give modified code away for free or sell it under the terms of the ImageMagick license or distribute the result under a different license, but you need to acknowledge the use of the ImageMagick software;
|
34
|
+
* the license is compatible with the GPL V3.
|
35
|
+
* when exporting the ImageMagick software, review its export classification.
|
36
|
+
|
37
|
+
Terms and Conditions for Use, Reproduction, and Distribution
|
38
|
+
|
39
|
+
The legally binding and authoritative terms and conditions for use, reproduction, and distribution of ImageMagick follow:
|
40
|
+
|
41
|
+
Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available.
|
42
|
+
|
43
|
+
1. Definitions.
|
44
|
+
|
45
|
+
License shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
46
|
+
|
47
|
+
Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
48
|
+
|
49
|
+
Legal Entity shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, control means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
50
|
+
|
51
|
+
You (or Your) shall mean an individual or Legal Entity exercising permissions granted by this License.
|
52
|
+
|
53
|
+
Source form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
54
|
+
|
55
|
+
Object form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
56
|
+
|
57
|
+
Work shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
58
|
+
|
59
|
+
Derivative Works shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
60
|
+
|
61
|
+
Contribution shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution.
|
62
|
+
|
63
|
+
Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
64
|
+
|
65
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
66
|
+
|
67
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
68
|
+
|
69
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
70
|
+
|
71
|
+
* You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
72
|
+
* You must cause any modified files to carry prominent notices stating that You changed the files; and
|
73
|
+
* You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
74
|
+
* If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
75
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
76
|
+
|
77
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
78
|
+
|
79
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
80
|
+
|
81
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
82
|
+
|
83
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
84
|
+
|
85
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
86
|
+
|
87
|
+
How to Apply the License to your Work
|
88
|
+
|
89
|
+
To apply the ImageMagick License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information (don't include the brackets). The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
90
|
+
|
91
|
+
Copyright [yyyy] [name of copyright owner]
|
92
|
+
|
93
|
+
Licensed under the ImageMagick License (the "License"); you may not use
|
94
|
+
this file except in compliance with the License. You may obtain a copy
|
95
|
+
of the License at
|
96
|
+
|
97
|
+
https://imagemagick.org/script/license.php
|
98
|
+
|
99
|
+
Unless required by applicable law or agreed to in writing, software
|
100
|
+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
101
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
102
|
+
License for the specific language governing permissions and limitations
|
103
|
+
under the License.
|
data/ext/{ImageMagick-6.9.3-0-portable-Q16-x86 → ImageMagick-7.0.9-8-portable-Q16-x86}/convert.exe
RENAMED
Binary file
|
Binary file
|
Binary file
|
data/lib/win32/screenshot.rb
CHANGED
@@ -8,4 +8,4 @@ require File.dirname(__FILE__) + '/screenshot/image'
|
|
8
8
|
require File.dirname(__FILE__) + '/screenshot/bitmap_maker'
|
9
9
|
|
10
10
|
# add bundled ImageMagick into path
|
11
|
-
ENV["PATH"] = "#{File.dirname(__FILE__) + "/../../ext/ImageMagick-
|
11
|
+
ENV["PATH"] = "#{File.dirname(__FILE__) + "/../../ext/ImageMagick-7.0.9-8-portable-Q16-x86"};#{ENV["PATH"]}"
|
data/rdoc.rb
ADDED
@@ -138,8 +138,8 @@ describe Win32::Screenshot::Take do
|
|
138
138
|
it "doesn't allow to capture an area of the window with too big coordinates" do
|
139
139
|
window = RAutomation::Window.new(:pid => @notepad)
|
140
140
|
expected_width, expected_height = Win32::Screenshot::BitmapMaker.dimensions_for(window.hwnd, :window)
|
141
|
-
expect {Win32::Screenshot::Take.of(:window, :pid => @notepad, :area => [0, 0, 10,
|
142
|
-
to raise_exception("specified coordinates (x1: 0, y1: 0, x2: 10, y2:
|
141
|
+
expect {Win32::Screenshot::Take.of(:window, :pid => @notepad, :area => [0, 0, 10, 100000])}.
|
142
|
+
to raise_exception("specified coordinates (x1: 0, y1: 0, x2: 10, y2: 100000) are invalid - maximum x2: #{expected_width} and y2: #{expected_height}!")
|
143
143
|
end
|
144
144
|
|
145
145
|
after :all do
|
data/win32screenshot.gemspec
CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.require_paths = ["lib"]
|
16
16
|
s.license = "MIT"
|
17
17
|
|
18
|
-
s.add_dependency("ffi", "~> 1.
|
19
|
-
s.add_dependency("mini_magick", "~> 4.
|
20
|
-
s.add_dependency("rautomation", "~> 0.
|
18
|
+
s.add_dependency("ffi", "~> 1.11.0")
|
19
|
+
s.add_dependency("mini_magick", "~> 4.9")
|
20
|
+
s.add_dependency("rautomation", "~> 1.0.0")
|
21
21
|
|
22
22
|
s.add_development_dependency("rspec", "~> 2.5")
|
23
23
|
s.add_development_dependency("yard")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32screenshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarmo Pertman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -17,42 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.
|
20
|
+
version: 1.11.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.
|
27
|
+
version: 1.11.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: mini_magick
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 4.
|
34
|
+
version: '4.9'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 4.
|
41
|
+
version: '4.9'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rautomation
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 1.0.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 1.0.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rspec
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,21 +106,22 @@ files:
|
|
106
106
|
- ".gitignore"
|
107
107
|
- ".rspec"
|
108
108
|
- ".yardopts"
|
109
|
+
- CHANGES.md
|
109
110
|
- Gemfile
|
110
111
|
- Gemfile.lock
|
111
|
-
- History.rdoc
|
112
112
|
- LICENSE
|
113
|
-
- README.
|
113
|
+
- README.md
|
114
114
|
- Rakefile
|
115
|
-
- ext/ImageMagick-
|
116
|
-
- ext/ImageMagick-
|
117
|
-
- ext/ImageMagick-
|
118
|
-
- ext/ImageMagick-
|
115
|
+
- ext/ImageMagick-7.0.9-8-portable-Q16-x86/LICENSE.txt
|
116
|
+
- ext/ImageMagick-7.0.9-8-portable-Q16-x86/convert.exe
|
117
|
+
- ext/ImageMagick-7.0.9-8-portable-Q16-x86/identify.exe
|
118
|
+
- ext/ImageMagick-7.0.9-8-portable-Q16-x86/mogrify.exe
|
119
119
|
- lib/win32/screenshot.rb
|
120
120
|
- lib/win32/screenshot/bitmap_maker.rb
|
121
121
|
- lib/win32/screenshot/image.rb
|
122
122
|
- lib/win32/screenshot/take.rb
|
123
123
|
- lib/win32/screenshot/version.rb
|
124
|
+
- rdoc.rb
|
124
125
|
- spec/spec_helper.rb
|
125
126
|
- spec/win32/screenshot/image_spec.rb
|
126
127
|
- spec/win32/screenshot/take_spec.rb
|
@@ -144,8 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
- !ruby/object:Gem::Version
|
145
146
|
version: '0'
|
146
147
|
requirements: []
|
147
|
-
|
148
|
-
rubygems_version: 2.4.4
|
148
|
+
rubygems_version: 3.0.3
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Capture Screenshots on Windows with Ruby to bmp, gif, jpg or png formats.
|
@@ -153,4 +153,3 @@ test_files:
|
|
153
153
|
- spec/spec_helper.rb
|
154
154
|
- spec/win32/screenshot/image_spec.rb
|
155
155
|
- spec/win32/screenshot/take_spec.rb
|
156
|
-
has_rdoc:
|
data/History.rdoc
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
= 2.1.0 2016-01-09
|
2
|
-
* Add Image#write! for overwriting images.
|
3
|
-
* Update MiniMagick dependency.
|
4
|
-
* Update bundled ImageMagick version to 6.9.3-0-portable-Q16-x86.
|
5
|
-
|
6
|
-
= 2.0.0 2015-06-28
|
7
|
-
* Update MiniMagick dependency due to CVE-2013-2616.
|
8
|
-
* Update bundled ImageMagick version to 6.9.1-6-Q16-x86.
|
9
|
-
|
10
|
-
= 1.0.10 2013-11-01
|
11
|
-
* Add license to gemspec.
|
12
|
-
|
13
|
-
= 1.0.9 2013-10-05
|
14
|
-
* Set mini_magick 3.5.0 as a dependency because 3.6.0 is broken.
|
15
|
-
|
16
|
-
= 1.0.8 2013-03-09
|
17
|
-
* Loosen up dependencies
|
18
|
-
|
19
|
-
= 1.0.7 2012-02-23
|
20
|
-
* Bump RAutomation dependency
|
21
|
-
|
22
|
-
= 1.0.6 2011-10-16
|
23
|
-
* Screenshot will be taken of the whole window instead of client area - e.g. with title bar and such.
|
24
|
-
* Added :context option to specify which area to take screenshot of - possible values are :window or :client
|
25
|
-
Win32::Screenshot::Take.of(:window, :hwnd => 1234, :context => :client)
|
26
|
-
|
27
|
-
= 1.0.5 2011-08-18
|
28
|
-
* Minor output message change
|
29
|
-
|
30
|
-
= 1.0.4 2011-06-18
|
31
|
-
* Make sure that mini_magick 3.2 is used due to bug in 3.3-s dependency subexec https://github.com/nulayer/subexec/issues/4
|
32
|
-
|
33
|
-
= 1.0.3 2011-04-17
|
34
|
-
* Try to take a screenshot of the window even if the activation of that window fails.
|
35
|
-
|
36
|
-
= 1.0.2 2011-01-20
|
37
|
-
* Fixed to work with RAutomation version 0.4
|
38
|
-
|
39
|
-
= 1.0.1 2010-12-18
|
40
|
-
* Increased RAutomation dependency for version 0.3.0 due to it's new Window#child method
|
41
|
-
* Making sure that RAutomation's Ffi adapter is always used
|
42
|
-
|
43
|
-
= 1.0.0 2010-12-17 - The New Beginning
|
44
|
-
* Bundling all necessary libraries/binaries with the gem - ImageMagick and RMagick are no more needed, finally!
|
45
|
-
* Using MiniMagick to save images to gif, jpg and png format
|
46
|
-
* Simplified and deleted a lot of code causing backwards incompatibility and major API changes!
|
47
|
-
Refer to the README.rdoc and documentation for the overview of the new and better API
|
48
|
-
* From now on this library is following Semantic Versioning (http://semver.org) rules
|
49
|
-
|
50
|
-
= 0.0.8 2010-12-13
|
51
|
-
* Renamed Win32::Screenshot::Util.all_windows to all_desktop_windows (Roger Pack)
|
52
|
-
* Added methods to Win32::Screenshot::Util class (Roger Pack):
|
53
|
-
- window_process_id
|
54
|
-
- window_class
|
55
|
-
- windows_hierarchy_with_info
|
56
|
-
- get_info
|
57
|
-
- location_of
|
58
|
-
* It's possible to search windows also by class name (Roger Pack)
|
59
|
-
* Child windows will be also searched for (Roger Pack)
|
60
|
-
|
61
|
-
= 0.0.7 2010-08-18
|
62
|
-
* Supports now fully JRuby, 1.9.1 and 1.9.2 MRI!
|
63
|
-
|
64
|
-
= 0.0.6 2010-08-07
|
65
|
-
* Trying to bring window to the foreground more aggressively (Roger Pack)
|
66
|
-
* Added utility class Win32::Screenshot.Util with some helper methods not related directly with taking of the screenshots:
|
67
|
-
- all_windows - enumerates all windows and returns their titles and window handles as an Array (Roger Pack)
|
68
|
-
- window_title(hwnd) - returns title of the window for specified handle (Jarmo Pertman)
|
69
|
-
- window_hwnd(title_query) - returns handle of the window for specified title (Jarmo Pertman)
|
70
|
-
- dimensions_for(hwnd) - returns a width and height for a window with specified handle (Jarmo Pertman)
|
71
|
-
* Removed a file 'win32screenshot.rb' which was solely used for displaying deprecation warnings for versions older than 0.0.4. Make sure than from now on all require statements require 'win32/screenshot'!
|
72
|
-
|
73
|
-
== Bug Fixes:
|
74
|
-
* Fixed usages of gdi32.dll BitBlt (Roger Pack)
|
75
|
-
* It was impossible to specify correctly window titles with regular expressions special characters in them (Roger Pack)
|
76
|
-
|
77
|
-
= 0.0.5 2010-07-07
|
78
|
-
* Added method window_area for capturing specified area of the window instead of full window (Jarmo Pertman)
|
79
|
-
Usage: Win32::Screenshot.window_area(title, x1, y1, x2, y2) {|width, height, bmp|}
|
80
|
-
* Added method foreground_area for capturing area of the foreground (Jarmo Pertman)
|
81
|
-
Usage: Win32::Screenshot.foreground_area(x1, y1, x2, y2) {|width, height, bmp|}
|
82
|
-
* Added method desktop_area for capturing area of the visible view (Jarmo Pertman)
|
83
|
-
Usage: Win32::Screenshot.desktop_area(x1, y1, x2, y2) {|width, height, bmp|}
|
84
|
-
* Added method hwnd_area for capturing area of the window with specified handle (Jarmo Pertman)
|
85
|
-
Usage: Win32::Screenshot.hwnd_area(hwnd, x1, y1, x2, y2) {|width, height, bmp|}
|
86
|
-
|
87
|
-
== Internal changes
|
88
|
-
* Removed usage of ShowWindow with parameter SW_SHOW when trying to bring window to front due it's behaviour of resizing window if it was maximized (Jarmo Pertman)
|
89
|
-
* Using FFI::Struct when searching window handle (Roger Pack)
|
90
|
-
|
91
|
-
= 0.0.4 2010-05-27 - A Complete Overhaul
|
92
|
-
* Fixed a bug where taking of screenshots failed on some sizes of windows (thanks for the tip from Tony Popiel)
|
93
|
-
* Blocks should be used when taking screenshots for cleaning up resources after usage (Aslak Hellesøy)
|
94
|
-
* Changed library structure - it is now needed to require 'win32/screenshot' (Aslak Hellesøy)
|
95
|
-
* Replaced Ruby::DL with Ruby-FFI for better VM support and less segfaults (Jarmo Pertman)
|
96
|
-
* Added Ruby 1.9.1 support (Jarmo Pertman)
|
97
|
-
* Win32::Screenshot.window restores window if it's minimized before taking screenshots and brings it to the foreground (Jarmo Pertman)
|
98
|
-
* Changed some internal method names (Jarmo Pertman)
|
99
|
-
* Replaced Test::Unit with RSpec and made specs more robust (Jarmo Pertman)
|
100
|
-
|
101
|
-
PS! This version is not backwards compatible due to different method names and usage, but upgrading should be relatively easy nevertheless.
|
102
|
-
|
103
|
-
= 0.0.3 2007-01-18
|
104
|
-
* Fixed bug with too many callbacks
|
105
|
-
* Added get_hwnd(Regexp)
|
106
|
-
|
107
|
-
= 0.0.2 2006-12-02
|
108
|
-
* Added desktop method (patch from Ryan Schuft)
|
109
|
-
* Added HTTP server example (patch from Ryan Schuft)
|
110
|
-
* Added window(regexp) method
|
111
|
-
|
112
|
-
= 0.0.1 2006-11-29
|
113
|
-
* First release
|
data/README.rdoc
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
= Win32::Screenshot
|
2
|
-
|
3
|
-
* http://github.com/jarmo/win32screenshot
|
4
|
-
|
5
|
-
== DESCRIPTION
|
6
|
-
|
7
|
-
Capture Screenshots on Windows with Ruby to bmp, gif, jpg or png formats!
|
8
|
-
|
9
|
-
== INSTALL
|
10
|
-
|
11
|
-
gem install win32screenshot
|
12
|
-
|
13
|
-
== SYNOPSIS
|
14
|
-
|
15
|
-
require 'win32/screenshot'
|
16
|
-
|
17
|
-
# Take a screenshot of the window with the specified title
|
18
|
-
Win32::Screenshot::Take.of(:window, title: "Windows Internet Explorer").write("image.bmp")
|
19
|
-
|
20
|
-
# Take a screenshot of the foreground
|
21
|
-
Win32::Screenshot::Take.of(:foreground).write("image.png")
|
22
|
-
|
23
|
-
# Take a screenshot of the foreground, and writing over previous image if it exists
|
24
|
-
Win32::Screenshot::Take.of(:foreground).write!("image.png")
|
25
|
-
|
26
|
-
# Take a screenshot of the specified window's top-left corner's area
|
27
|
-
Win32::Screenshot::Take.of(:window, title: /internet/i, area: [10, 10, 20, 20]).write("image.jpg")
|
28
|
-
|
29
|
-
# Take a screenshot of the window with the specified handle
|
30
|
-
Win32::Screenshot::Take.of(:window, hwnd: 123456).write("image.gif")
|
31
|
-
|
32
|
-
# Take a screenshot of the window's client area (e.g. without title bar) with the specified handle
|
33
|
-
Win32::Screenshot::Take.of(:window, hwnd: 123456, context: :client)
|
34
|
-
|
35
|
-
# Take a screenshot of the child window with the specified internal class name
|
36
|
-
Win32::Screenshot::Take.of(:rautomation, RAutomation::Window.new(hwnd: 123456).
|
37
|
-
child(class: "Internet Explorer_Server")).write("image.png")
|
38
|
-
|
39
|
-
# Use the bitmap blob for something else
|
40
|
-
image = Win32::Screenshot::Take.of(:window, hwnd: 123456)
|
41
|
-
image.height # => height of the image
|
42
|
-
image.width # => width of the image
|
43
|
-
image.bitmap # => bitmap blob
|
44
|
-
|
45
|
-
== Copyright
|
46
|
-
|
47
|
-
Copyright (c) Jarmo Pertman, Aslak Hellesøy. See LICENSE for details.
|