imgen 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/bin/imgen +3 -3
- data/imgen-solid-example-1.png +0 -0
- data/imgen-solid-example-2.png +0 -0
- data/imgen-solid-example-3.png +0 -0
- data/imgen-texture-example-1.png +0 -0
- data/imgen-texture-example-2.png +0 -0
- data/imgen-texture-example-3.png +0 -0
- data/lib/imgen.rb +1 -1
- data/lib/imgen/version.rb +1 -1
- metadata +7 -4
- data/image-example-blue.png +0 -0
- data/image-example-green.png +0 -0
- data/image-example-red.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dcbaf490c5d8e6f5723e3ada8b5176a2d4ee88c800b706d784e45744efaa0ee
|
4
|
+
data.tar.gz: 6fe409c17ae3582a261d5e2bc7f62ffdf9e9474a4fbf66f853d271f22527bbab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c09b9c5a2fbc1649c3fa480146f2c83ff5cd0ec4aacda7506644e74a692bf50749daa3db7564b078af4a02fee9cb1948d49776031d255d200476f3366168f5d4
|
7
|
+
data.tar.gz: 03f01195275d1342606fd233612b3c6043398078591bd3df43860a35bcd6a721bec00762620f2901acb00dd25c65d4008f49ecd3678e464fad9c3b2ed8de8ee3
|
data/README.md
CHANGED
@@ -22,15 +22,17 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
By default, simply running `imgen` will create a single 100x100 PNG, using
|
25
|
+
By default, simply running `imgen` will create a single 100x100 PNG, using a randomly-selected color.
|
26
26
|
|
27
27
|
The resulting image will look something like one of the following:
|
28
28
|
|
29
|
-
  
|
30
30
|
|
31
31
|
You can change width, height, image format, and the quantity of images generated with switches.
|
32
32
|
|
33
|
-
`imgen -w 200 -h 300 -f jpg -q
|
33
|
+
`imgen -m texture -w 200 -h 300 -f jpg -q 3` - Create 3 200x300 JPGs of randomly-chosen textured color.
|
34
|
+
|
35
|
+
  
|
34
36
|
|
35
37
|
## Contributing
|
36
38
|
|
data/bin/imgen
CHANGED
@@ -23,8 +23,8 @@ def parse_options
|
|
23
23
|
}
|
24
24
|
|
25
25
|
optparse = OptionParser.new do |opts|
|
26
|
-
opts.banner = "Generate images on the command line\n"
|
27
|
-
opts.banner += "usage: imgen [-w, --width WIDTH] [-h, --height HEIGHT] [-d, --directory IMG_DIRECTORY] [-f, --format IMG_FORMAT] [-q, --quantity QUANTITY] [-m, --method GEN_METHOD] [--debug] [--display]\n\n"
|
26
|
+
opts.banner = "Generate random images on the command line\n"
|
27
|
+
opts.banner += "usage: imgen [-w, --width WIDTH] [-h, --height HEIGHT] [-d, --directory IMG_DIRECTORY] [-f, --format IMG_FORMAT] [-q, --quantity QUANTITY] [-m, --method GEN_METHOD] [--verbose] [--debug] [--display-x11] [--display-imgcat]\n\n"
|
28
28
|
|
29
29
|
opts.on('-w', '--width WIDTH_OF_IMAGE', Integer, 'Width of image in pixels (Default: 100)') do |w|
|
30
30
|
options[:width] = w.to_i
|
@@ -51,7 +51,7 @@ def parse_options
|
|
51
51
|
end
|
52
52
|
|
53
53
|
opts.on('--verbose', 'Display image write output') do
|
54
|
-
options[:
|
54
|
+
options[:verbose] = true
|
55
55
|
end
|
56
56
|
|
57
57
|
opts.on('--debug', 'Display pixel debug information') do
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/imgen.rb
CHANGED
@@ -76,7 +76,7 @@ module Imgen
|
|
76
76
|
options[:filename_path] = "#{img_dir}/#{options[:width]}x#{options[:height]}#{img_uniq}.#{img_ext}"
|
77
77
|
end
|
78
78
|
|
79
|
-
puts "writing #{options[:filename_path]} to disk"
|
79
|
+
puts "writing #{options[:filename_path]} to disk" if options[:verbose]
|
80
80
|
|
81
81
|
begin
|
82
82
|
img.write(options[:filename_path])
|
data/lib/imgen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Chadwick
|
@@ -96,9 +96,12 @@ files:
|
|
96
96
|
- README.md
|
97
97
|
- Rakefile
|
98
98
|
- bin/imgen
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
99
|
+
- imgen-solid-example-1.png
|
100
|
+
- imgen-solid-example-2.png
|
101
|
+
- imgen-solid-example-3.png
|
102
|
+
- imgen-texture-example-1.png
|
103
|
+
- imgen-texture-example-2.png
|
104
|
+
- imgen-texture-example-3.png
|
102
105
|
- imgen.gemspec
|
103
106
|
- lib/imgen.rb
|
104
107
|
- lib/imgen/color_names.rb
|
data/image-example-blue.png
DELETED
Binary file
|
data/image-example-green.png
DELETED
Binary file
|
data/image-example-red.png
DELETED
Binary file
|