punk art

punkart gem - (automagically) turn your "classic" punk (pixel) heads into dollar greenbacks, gold/silver/bronze coins, and much more

Usage

Image#greenback (also known as dollar, dollarize)

Let's print dollar greenbacks... brrr...

require 'punkart'

specs = [
  ['Robot Male', 'Big Beard'],
  ['Human Male 2', 'Birthday Hat', 'Bubble Gum'],
  ['Human Female 1', 'Dark Hair', 'Flowers', 'Frown', 'Gold Chain'],
  ['Demon Male',     'Hoodie', 'Pipe'],
  ['Ape Male Blue',  'Bandana', 'Earring'],
  ['Human Male 3',  'Cowboy Hat', 'Smile', 'Laser Eyes'],
]

specs.each_with_index do |attributes, i|
   punk = Punk::Image.generate( *attributes )

   dollar = punk.greenback  ## turn into greenback dollar
   dollar.save( "dollar-#{i+1}.png" )
   dollar.zoom(4).save( "dollar-#{i+1}@4x.png" )
end

Voila!

turns into

4x

Image#goldcoin or silvercoin or bronzecoin

Let's continue and let's mint gold/silver/bronze coins...

specs.each_with_index do |attributes, i|
   punk = Punk::Image.generate( *attributes )

   coin = punk.goldcoin  ## turn into goldcoin
   coin.save( "goldcoin-#{i+1}.png" )
   coin.zoom(4).save( "goldcoin-#{i+1}@4x.png" )

   coin = punk.silvercoin  ## turn into silvercoin
   coin.save( "silvercoin-#{i+1}.png" )
   coin.zoom(4).save( "silvercoin-#{i+1}@4x.png" )

   coin = punk.bronzecoin  ## turn into bronzecoin
   coin.save( "bronzecoin-#{i+1}.png" )
   coin.zoom(4).save( "bronzecoin-#{i+1}@4x.png" )
end

Voila!

4x

That's it.

License

The scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.

Questions? Comments?

Post them over at the Help & Support page. Thanks.