-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathgenerate_top.rb
More file actions
40 lines (29 loc) · 893 Bytes
/
generate_top.rb
File metadata and controls
40 lines (29 loc) · 893 Bytes
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
require 'pixelart'
require_relative 'base'
###
# top selling (matt & john's crypo) punks as of dec/30, 2023
specs = parse_data( <<DATA )
alien, bandana
alien, cap forward, pipe, small shades
alien, headband
ape, hoodie
ape, bandana
ape, cowboy hat
ape, eye mask, vape, do-rag
ape, gold chain, knitted cap
zombie, wild hair, 3d glasses
ape, knitted cap, small shades
zombie, chinstrap, earring, crazy hair
zombie, mohawk thin
DATA
composite = ImageComposite.new( 4, 3,
width: 12, height: 12 )
specs.each_with_index do |spec, i|
img = generate( *spec)
img.save( "./tmp/topmini#{i}.png" )
img.zoom(10).save( "./tmp/@10x/topmini#{i}@10x.png" )
composite << img
end
composite.save( "./tmp2/topminis.png" )
composite.zoom(4).save( "./tmp2/topminis@4x.png" )
puts "bye"