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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea1274528973f538a80dc069dfd9c4866912777a165bb1b47f6b912862d2362d
4
- data.tar.gz: eb0553b11ac7272cc66d17ab7ba5e80c7839066457dc0d3b9306e4cfc32cbca0
3
+ metadata.gz: 2dcbaf490c5d8e6f5723e3ada8b5176a2d4ee88c800b706d784e45744efaa0ee
4
+ data.tar.gz: 6fe409c17ae3582a261d5e2bc7f62ffdf9e9474a4fbf66f853d271f22527bbab
5
5
  SHA512:
6
- metadata.gz: 5d6a8ab0980a6afcd6f9419ae7787af999e78bab30efa0229d38470c6605f6dd55a5f6a8f929b6bfc8f78624f0502b228e1adeac9724394216e2266b6f7392b3
7
- data.tar.gz: c596432e6ff8720e668582ff89c385e722e2a31662b00a2a5792812e1ba51592ca740d30809fca0b61a0548c55339fd7cf59156f289252a1052b8fe1b12b9647
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 one of three randomly-selected dominant colors (R, G, or B).
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
- ![Imgen default red](https://github.com/michaelchadwick/imgen/blob/master/image-example-red.png) ![Imgen default green](https://github.com/michaelchadwick/imgen/blob/master/image-example-green.png) ![Imgen default blue](https://github.com/michaelchadwick/imgen/blob/master/image-example-blue.png)
29
+ ![Imgen solid example 1](https://github.com/michaelchadwick/imgen/blob/master/image-solid-example-1.png) ![Imgen solid example 2](https://github.com/michaelchadwick/imgen/blob/master/image-solid-example-2.png) ![Imgen solid example 3](https://github.com/michaelchadwick/imgen/blob/master/image-solid-example-3.png)
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 10` - Create 10 200x300 JPGs of random dominant-colored noise.
33
+ `imgen -m texture -w 200 -h 300 -f jpg -q 3` - Create 3 200x300 JPGs of randomly-chosen textured color.
34
+
35
+ ![Imgen texture example 1](https://github.com/michaelchadwick/imgen/blob/master/image-texture-example-1.png) ![Imgen texture example 2](https://github.com/michaelchadwick/imgen/blob/master/image-texture-example-2.png) ![Imgen texture example 3](https://github.com/michaelchadwick/imgen/blob/master/image-texture-example-3.png)
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[:debug] = true
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
@@ -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])
@@ -1,3 +1,3 @@
1
1
  module Imgen
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
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.0
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
- - image-example-blue.png
100
- - image-example-green.png
101
- - image-example-red.png
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
Binary file
Binary file
Binary file