-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathgenerate_girlswithpearl.rb
More file actions
44 lines (29 loc) · 1.01 KB
/
generate_girlswithpearl.rb
File metadata and controls
44 lines (29 loc) · 1.01 KB
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
require 'pixelart'
require_relative 'base'
specs = parse_data( <<DATA )
girl with pearl
girl with pearl, vr pro
girl with pearl, laser eyes
girl with pearl (pepe)
girl with pearl (pepe), pipe
girl with pearl, 3d glasses
girl with pearl, regular shades
girl with pearl, clown nose
girl with pearl (bitmap orange)
DATA
cols = 5
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/girlwithpearl#{i}.png" )
img.zoom(10).save( "./tmp/@10x/girlwithpearl#{i}@10x.png" )
img.zoom(20).save( "./tmp/@20x/girlwithpearl#{i}@20x.png" )
composite << img
end
composite.save( "./tmp2/girlswithpearl.png" )
composite.zoom(4).save( "./tmp2/girlswithpearl@4x.png" )
composite.zoom(10).save( "./tmp2/girlswithpearl@10x.png" )
puts "bye"