LoginSignup
2
2

More than 5 years have passed since last update.

RubyKokubanで画像を表示する

Last updated at Posted at 2013-10-21

mrubyを使ってインタラクティブアプリケーションを作ることが出来ます。
インストール方法はこちらをどうぞ。 → [最新記事]

画像の表示に必要なのはたったの4行です。スクリプトと同じ場所にsample.pngを置いて下さい。

def draw
  @image ||= Image.load("sample.png")
  set_color(255, 255, 255)
  @image.draw(0, 0)
end

実行します。

$ kokuban exec image001.rb

表示されました。

image001.png

目次

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2