Forum: Ruby Showing a file

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
94d72929e2f1005d353d85d676c9b08d?d=identicon&s=25 Sigge Sg (siggesg)
on 2009-01-21 21:24
I am a noob in programing, and have just learned some of the basics.

And i wonder if i could show a file (like a picture) when running the
program??.
391f9b787cdc12aa2c179713f5103e3a?d=identicon&s=25 Ilan Berci (iberci)
on 2009-01-21 22:28
Sigge Sg wrote:
> I am a noob in programing, and have just learned some of the basics.
>
> And i wonder if i could show a file (like a picture) when running the
> program??.

yes...
94d72929e2f1005d353d85d676c9b08d?d=identicon&s=25 Sigge Sg (siggesg)
on 2009-01-21 23:05
Ilan Berci wrote:
> Sigge Sg wrote:
>> I am a noob in programing, and have just learned some of the basics.
>>
>> And i wonder if i could show a file (like a picture) when running the
>> program??.
>
> yes...

How??
59193d8082ee0fe75675d3bb376cf2ba?d=identicon&s=25 Pierre Pierre (pierre_p)
on 2009-01-22 03:11
Sigge Sg wrote:
> How??

By using a GUI library. And for which one, it depends of your needs...

But if you just want to display a picture, the asiest way would be Shoes
I guess.

Shoes.app do
  image "foo/bar.jpg"
end

But I guess the question is too vague to answer accurately
94d72929e2f1005d353d85d676c9b08d?d=identicon&s=25 Sigge Sg (siggesg)
on 2009-01-22 08:06
>
> By using a GUI library. And for which one, it depends of your needs...
>
> But if you just want to display a picture, the asiest way would be Shoes
> I guess.
>
> Shoes.app do
>   image "foo/bar.jpg"
> end
>
> But I guess the question is too vague to answer accurately

can i display any picture with the Shoe library??
59193d8082ee0fe75675d3bb376cf2ba?d=identicon&s=25 Pierre Pierre (pierre_p)
on 2009-01-22 09:13
Sigge Sg wrote:
> can i display any picture with the Shoe library??

At least for PNG, JPEG or GIF format, yes.
You can even make it point to an image on the net.
94d72929e2f1005d353d85d676c9b08d?d=identicon&s=25 Sigge Sg (siggesg)
on 2009-01-22 17:37
Sorry! i didn't understand the code.

I know i'm a noob.

What should I write if i wanna display a picture named "lol.JPEG" from
the "my picture" folder??
This topic is locked and can not be replied to.