Skip to content

Latest commit

 

History

History
106 lines (58 loc) · 1.88 KB

01_mint.md

File metadata and controls

106 lines (58 loc) · 1.88 KB

Do-It-Yourself (DIY) - Yes, You Can! - Mint Your Own Punks in Original 24x24 Pixel Format or With 2X / 4X / 8X Zoom

Step 0 - Download the True Official Genuine CryptoPunks™ composite image

One time / first time only - Download the True Official Genuine CryptoPunks™ composite housing all 10 000 CryptoPunks in a single 2400×2400 image (~830 kb) for free. See punks.png »

Let's create a script to mint punks.

Step 1 - Read True Official Genuine CryptoPunks™ composite image

require 'cryptopunks'

punks = Punks::Image.read( './punks.png' )

Step 2 - Start minting

Note: By default punks get saved in the original 24x24 pixel format and the first punk starts at index zero, that is, 0. running up to 9999.

punks[0].save( './punk-0000.png' )
punks[2890].save( './punk-2890.png' )
punks[8219].save( './punk-8219.png')

And voila!

Let's change the zoom factor:

punks.zoom = 4   # use x4

punks[0].save( './punk-0000x4.png' )
punks[2890].save( './punk-2890x4.png' )
punks[8219].save( './punk-8219x4.png')

punks.zoom = 8   # or use x8

punks[0].save( './punk-0000x4.png' )
punks[2890].save( './punk-2890x4.png' )
punks[8219].save( './punk-8219x4.png')

And x4:

And x8:

And so on. Happy miniting.

Frequently Asked Questions (F.A.Q.s) and Answers

Q: How can I mint all punks from 0 to 9999?

Use a script with a loop like:

# step 1: read composite image
punks = Punks::Image::Composite.read( './punks.png' )

# step 2: mint all punks
(0..9999).each do |i|
  name = '%04d' % i
  punks[i].save( "./punk-#{name}.png" )
end