-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy paththebeginning.rb
64 lines (40 loc) · 1.58 KB
/
thebeginning.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
52
53
54
55
56
57
58
59
60
61
62
63
64
require 'pixelart'
names = %w[
william
fergie
taboo
apldeap
]
blackeyedpeas_i = ImageComposite.new( 2, 2, width: 25,
height: 25,
background: '#638596' )
names.each do |name|
blackeyedpeas_i << Image.read( "./#{name}-25x25.png" )
end
blackeyedpeas_i.save( "./tmp/thebeginning_vol1.png" )
blackeyedpeas_i.zoom(8).save( "./tmp/[email protected]" )
YELLOW = '#ffff00'
GREEN = '#00ff00'
RED = '#ff0000'
BLUE = '#0000ff'
blackeyedpeas_ii = ImageComposite.new( 2, 2, width: 25,
height: 25,
background: [YELLOW, GREEN, RED, BLUE] )
names.each do |name|
blackeyedpeas_ii << Image.read( "./#{name}-25x25.png" )
end
blackeyedpeas_ii.save( "./tmp/thebeginning_vol2.png" )
blackeyedpeas_ii.zoom(8).save( "./tmp/[email protected]" )
composite = ImageComposite.new( 3, 1, width: 300,
height: 300)
composite << blackeyedpeas_ii.zoom(6) ## 6x zoom = 300x300
composite << blackeyedpeas_i.zoom(6)
composite << Image.read( "./thebeginning-300x300.png")
composite.save( "./tmp/[email protected]" )
composite = ImageComposite.new( 3, 1, width: 200,
height: 200)
composite << blackeyedpeas_ii.zoom(4) ## 4x zoom = 200x200
composite << blackeyedpeas_i.zoom(4)
composite << Image.read( "./thebeginning-200x200.png")
composite.save( "./tmp/[email protected]" )
puts "bye"