Sign In

Close
Forgot your password? No account yet?

cramped by PiMouse

cramped

PiMouse

generated with something like this:

#!/usr/bin/env macruby
load "../macruby_graphics/graphics.rb"
source = ARGV.shift || "http://l1.yimg.com/bt/api/res/1.2/C1ZacHCGevQXW2DzmINgWA--/YXBwaWQ9eW5ld3M7cT04NTt3PTMxMA--/http://media.zenfs.com/en-US/blogs/partner/470_2417020.0"
dest = ARGV.shift || "pants.jpg"
canvas = MRGraphics::Canvas.new(type: :image, size: [512, 384], filename: dest)
pic = MRGraphics::Image.new(source, verbose: true)
xfrmpoint = NSPoint.new(rand(512), rand(384))
xfrm = NSAffineTransform.transform.scaleBy(0.95).tap{|e|e.transformPoint xfrmpoint}.rotateByDegrees(70-rand(70*2))
#p xfrm.transformStruct
#p xfrmpoint
bR, bI, tX, tY = rand(15), 0.5+rand(0.5), 128+rand(128), -20+rand(10)
#p [bR, bI, tX, tY]
pic.fit(512,384).
filter('CIAffineClamp', inputTransform: xfrm).
bloom(bR, bI).translate(tX, tY).
filter('CIBumpDistortion',
:inputCenter => CIVector.vectorWithX(256, Y: 192),
:inputRadius => 100,
:inputScale => ([-2, 2].shuffle.first)).crop(0,0,512,384).
draw(canvas.ctx)
canvas.save

Submission Information

Views:
147
Comments:
0
Favorites:
0
Rating:
General
Category:
Visual / Digital