Created
December 12, 2012 12:00
-
-
Save ferclaverino/4267249 to your computer and use it in GitHub Desktop.
Realizado por Gaby, del colegio Nehen Peuman, Bariloche
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shoes.setup do | |
gem "chunky_png" | |
end | |
require "chunky_png" | |
Shoes.app(:title => "Fotos copadas", :width => 800, :height => 600, :resize => true) do | |
stack do | |
title("Fotos copadas") | |
button("Load") do | |
@foto = ask_open_file | |
image (@foto) | |
end | |
button "sello" do | |
@sello = ask_open_file | |
image @sello | |
end | |
button("sellar") do | |
avatar = ChunkyPNG::Image.from_file(@foto) | |
badge = ChunkyPNG::Image.from_file(@sello) | |
avatar.compose!(badge, 10, 10) | |
avatar.save("composited.png") # Force the fast saving routine. | |
image("composited.png") | |
end | |
para "Por Gaby" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment