Skip to content

Instantly share code, notes, and snippets.

@ferclaverino
Created December 12, 2012 12:00
Show Gist options
  • Save ferclaverino/4267249 to your computer and use it in GitHub Desktop.
Save ferclaverino/4267249 to your computer and use it in GitHub Desktop.
Realizado por Gaby, del colegio Nehen Peuman, Bariloche
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