-
Notifications
You must be signed in to change notification settings - Fork 7
/
generate_hoodienation.rb
51 lines (36 loc) · 1.2 KB
/
generate_hoodienation.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require 'pixelart'
require_relative 'base'
specs = parse_data( <<DATA )
male2, luxurious beard, hoodie
male2, luxurious beard, hood
male1, normal beard, hoodie dark
male1, normal beard, hood dark
ape, hoodie light, regular shades
ape, hood light
female3, hoodie pink, big shades
female3, hood pink
female2, hood pharoah
ape, hood pharoah
pepe, hoodie ice
male 3, luxurious beard, hoodie ice, regular shades
pepe, hood pharoah purple
pepe, hood pharoah purple (a)
pepe, noun glasses pink
pepe, noun glasses pink, hood pharoah purple (a)
DATA
cols = 4
rows = specs.size / cols
rows += 1 if specs.size % cols != 0
composite = ImageComposite.new( cols, rows,
width: 12, height: 12 )
specs.each_with_index do |spec, i|
img = generate( *spec)
img.save( "./tmp/hoodie#{i}.png" )
img.zoom(10).save( "./tmp/@10x/hoodie#{i}@10x.png" )
img.zoom(20).save( "./tmp/@20x/hoodie#{i}@20x.png" )
composite << img
end
composite.save( "./tmp2/hoodienation.png" )
composite.zoom(4).save( "./tmp2/hoodienation@4x.png" )
composite.zoom(10).save( "./tmp2/hoodienation@10x.png" )
puts "bye"