-
Notifications
You must be signed in to change notification settings - Fork 25
/
currency-bored-apes.rb
60 lines (36 loc) · 1.48 KB
/
currency-bored-apes.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
require 'pixelart'
BACKGROUND_SPOTS = [
# blue-ish
'49355E', '16437A', '096598', '4B8BBB', '9CD9DE', 'C5A7C6',
# red-ish
'A5282C', 'D14C37', 'CF6A71', 'DD5E36', 'DDA315', 'F3A925',
# green-ish
'4C7031', '95A025', '66BA8C', '316D5F',
# gray-ish /white-ish
'C2B6AF', 'BFC0C5', '3BC8B5',
]
path = "../../awesome-24px/collection/boredapes_au.png"
apes = ImageComposite.new( path, width: 28, height: 28 )
ids = [3, 8, 27, 30]
ids.each do |id|
ape = apes[id]
ape.save( "./i/boredape_au-#{id}.png" )
ape.zoom(4).save( "./i/boredape_au-#{id}@4x.png" )
ape_spots = ape.spots( 10 )
ape_spots.save( "./i/boredape_au-#{id}-spots-v1.png" )
ape_spots = ape.spots( 5, spacing: 5, center: [-1,1], radius: [3,6] )
ape_spots.save( "./i/boredape_au-#{id}-spots-v2.png" )
ape_spots = ape.zoom(2).spots( 5, spacing: 5,
center: [-1,1], radius: [3,6],
background: BACKGROUND_SPOTS )
ape_spots.save( "./i/boredape_au-#{id}[email protected]" )
ape_spots = ape.zoom(2).spots( 5, spacing: 5,
center: [-3,3], radius: [2,8],
background: BACKGROUND_SPOTS )
ape_spots.save( "./i/boredape_au-#{id}[email protected]" )
ape_spots = ape.zoom(2).spots_hidef( 5, spacing: 5,
center: [-3,3], radius: [2,8],
background: BACKGROUND_SPOTS )
ape_spots.save( "./i/boredape_au-#{id}[email protected]" )
end
puts "bye"