artfactory 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +107 -5
  3. data/Rakefile +3 -3
  4. data/lib/artfactory/version.rb +2 -2
  5. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86da7cc0067800d873cd61516ea952f9e947e7d331de83e30cd4e9cbfb0507cb
4
- data.tar.gz: 01cf5035ef01e2d06bc3f825c2b5a610fd7e66db388f40f90460914afe4ec7ef
3
+ metadata.gz: 5510b374cec095c795bec897961719a501cabb7e1341f026b1a5d301b838821b
4
+ data.tar.gz: d1324fc9a7706e1bf593657f903d2efad9b647f10f0448671c16e39ba4c30e43
5
5
  SHA512:
6
- metadata.gz: d4ba11a42536240af358fd00686a33792457b84ff80b40279f4ef07c369c71a0ee9383a9343a57be022812a23fd1a02315a4a500a83d401e662b9591ea715f56
7
- data.tar.gz: ea688502cb92c23ab77582387b0fdd98c0cada95e30cf500dd28734a92d8d9019489d22201865861004ebf6e677caf2958026c5998982d261de60db0a57ab229
6
+ metadata.gz: bc5af5ad4b1f44c07b115b49ca2a3827eaf72a159b38924b25e9fad0fda5a6dcf00579b4bf89589c8c81def106d0d2c8ad28a2251d6756677e68d71e182fd151
7
+ data.tar.gz: 70d335a1ae4014607ade5091c7105965b329f0d7ab9030fa6105834296fd8c7f5b1d4eed2852db22f3c2f651a006f1d585d19cacce9dcefea8b981c0d374ebd4
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
-
2
1
  # Art Factory
3
2
 
4
- Yes, you can! Generate your own pixel art images (off chain) from text attributes (via spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
3
+ Yes, you can! Generate your own art images from text attributes (via spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
5
4
 
6
5
 
7
6
 
8
- * home :: [github.com/pixelartexchange/pixelart](https://github.com/pixelartexchange/pixelart)
9
- * bugs :: [github.com/pixelartexchange/pixelart/issues](https://github.com/pixelartexchange/pixelart/issues)
7
+ * home :: [github.com/generativeartfactory/artfactory](https://github.com/generativeartfactory/artfactory)
8
+ * bugs :: [github.com/generativeartfactory/artfactory/issues](https://github.com/generativeartfactory/artfactory/issues)
10
9
  * gem :: [rubygems.org/gems/artfactory](https://rubygems.org/gems/artfactory)
11
10
  * rdoc :: [rubydoc.info/gems/artfactory](http://rubydoc.info/gems/artfactory)
12
11
 
@@ -15,8 +14,111 @@ Yes, you can! Generate your own pixel art images (off chain) from text attribute
15
14
 
16
15
  ## Usage
17
16
 
17
+ Let's try punk doge shiba inus in the 24x24px format.
18
+
19
+ ![](sandbox/config/spritesheet.png)
20
+
21
+ (Source: [config/spritesheet.png](sandbox/config/spritesheet.png))
22
+
23
+ ```
24
+ id, category, name, more_names
25
+ 0, , classic,
26
+ 1, , dark,
27
+ 2, , zombie,
28
+ 3, , alien,
29
+ 4, , crazyhair,
30
+ 5, , beanie,
31
+ 6, , cap,
32
+ 7, , capforward,
33
+ 8, , cowboyhat,
34
+ 9, , fedora,
18
35
  ...
36
+ ```
37
+
38
+ (Source: [config/spritesheet.csv](sandbox/config/spritesheet.png))
39
+
40
+
41
+
42
+ ### Setup Variant 1
43
+
44
+
45
+ ``` ruby
46
+ require 'artfactory'
47
+
48
+ # step 1 - setup the art factory;
49
+ # pass-in the spritesheet image & (meta) dataset and
50
+ # the format (e.g. 24x24px)
51
+
52
+ shiba1 = Artfactory.read( './config/spritesheet.png',
53
+ './config/spritesheet.csv',
54
+ width: 24,
55
+ height: 24)
56
+
57
+
58
+ # step 2 - generate images via text (prompts)
59
+
60
+ doge = shiba1.generate( 'Classic', '3D Glasses' )
61
+ doge.save( './doge1.png' )
62
+ doge.zoom(4).save( './doge1@4x.png' )
63
+
64
+ doge = shiba1.generate( 'Alien', 'Headband' )
65
+ doge.save( './doge2.png' )
66
+ doge.zoom(4).save( './doge2@4x.png' )
67
+
68
+ doge = doge.background( 'Matrix 1', 'Rainbow 1' )
69
+ doge.save( './doge2b.png' )
70
+ doge.zoom(4).save( './doge2b@4x.png' )
71
+ ```
72
+
73
+ Resulting in:
74
+
75
+ ![](i/doge1.png)
76
+ ![](i/doge2.png)
77
+ ![](i/doge2b.png)
78
+
79
+ 4x:
80
+ ![](i/doge1@4x.png)
81
+ ![](i/doge2@4x.png)
82
+ ![](i/doge2b@4x.png)
83
+
84
+
85
+
86
+
87
+ ### Setup Variant 2
88
+
89
+ ``` ruby
90
+ require 'artfactory'
91
+
92
+ # step 1 - setup the art factory;
93
+ # use an "external" spritesheet configuration
94
+
95
+ sheet = Pixelart::Spritesheet.read( './config/spritesheet.png',
96
+ './config/spritesheet.csv',
97
+ width: 24,
98
+ height: 24)
99
+ shiba2 = Artfactory.use( sheet )
100
+
101
+
102
+ # step 2 - generate images via text (prompts)
103
+
104
+ doge = shiba2.generate( 'Classic', '3D Glasses' )
105
+ doge.save( './doge1.png' )
106
+ doge.zoom(4).save( './doge1@4x.png' )
107
+
108
+
109
+ doge = shiba2.generate( 'Alien', 'Headband' )
110
+ doge.save( './doge2.png' )
111
+ doge.zoom(4).save( './doge2@4x.png' )
112
+
113
+ doge = doge.background( 'Matrix 1', 'Rainbow 1' )
114
+ doge.save( './doge2b.png' )
115
+ doge.zoom(4).save( './doge2b@4x.png' )
116
+ ```
117
+
118
+
119
+
19
120
 
20
121
  ## Questions? Comments?
21
122
 
22
- Post them on the [D.I.Y. Punk (Pixel) Art reddit](https://old.reddit.com/r/DIYPunkArt). Thanks.
123
+ Post them over at the [Help & Support](https://github.com/geraldb/help) page. Thanks.
124
+
data/Rakefile CHANGED
@@ -13,10 +13,10 @@ Hoe.spec 'artfactory' do
13
13
 
14
14
  self.version = Pixelart::Module::Artfactory::VERSION
15
15
 
16
- self.summary = "artfactory - generate your own pixel art images (off chain) from text attributes (via spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more"
16
+ self.summary = "artfactory - generate your own art images from text attributes (via spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more"
17
17
  self.description = summary
18
18
 
19
- self.urls = { home: 'https://github.com/pixelartexchange/pixelart' }
19
+ self.urls = { home: 'https://github.com/generativeartfactory/artfactory' }
20
20
 
21
21
  self.author = 'Gerald Bauer'
22
22
  self.email = 'wwwmake@googlegroups.com'
@@ -26,7 +26,7 @@ Hoe.spec 'artfactory' do
26
26
  self.history_file = 'CHANGELOG.md'
27
27
 
28
28
  self.extra_deps = [
29
- ['pixelart', '>= 1.3.2'],
29
+ ['pixelart', '>= 1.3.2'],
30
30
  ['backgrounds', '>= 0.2.0'],
31
31
  ]
32
32
 
@@ -4,8 +4,8 @@ module Pixelart
4
4
  module Module
5
5
  module Artfactory
6
6
 
7
- MAJOR = 0
8
- MINOR = 2
7
+ MAJOR = 1
8
+ MINOR = 0
9
9
  PATCH = 0
10
10
  VERSION = [MAJOR,MINOR,PATCH].join('.')
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artfactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-10 00:00:00.000000000 Z
11
+ date: 2023-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pixelart
@@ -72,8 +72,8 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '3.23'
75
- description: artfactory - generate your own pixel art images (off chain) from text
76
- attributes (via spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
75
+ description: artfactory - generate your own art images from text attributes (via
76
+ spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
77
77
  email: wwwmake@googlegroups.com
78
78
  executables: []
79
79
  extensions: []
@@ -90,7 +90,7 @@ files:
90
90
  - lib/artfactory/artfactory.rb
91
91
  - lib/artfactory/base.rb
92
92
  - lib/artfactory/version.rb
93
- homepage: https://github.com/pixelartexchange/pixelart
93
+ homepage: https://github.com/generativeartfactory/artfactory
94
94
  licenses:
95
95
  - Public Domain
96
96
  metadata: {}
@@ -114,6 +114,6 @@ requirements: []
114
114
  rubygems_version: 3.3.7
115
115
  signing_key:
116
116
  specification_version: 4
117
- summary: artfactory - generate your own pixel art images (off chain) from text attributes
118
- (via spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
117
+ summary: artfactory - generate your own art images from text attributes (via spritesheets);
118
+ incl. 2x/4x/8x zoom for bigger sizes and more
119
119
  test_files: []