Forum: Ruby showing a picture

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.
Sigge S. (Guest)
on 2009-02-20 16:53
Can anyone tell me the code for showing a picture in the "my pictures"
folder? Please!!
I've just started programing, so I don't so much about it.
Pascal J. Bourguignon (Guest)
on 2009-02-20 17:15
(Received via mailing list)
Sigge Sg <removed_email_address@domain.invalid> writes:

> Can anyone tell me the code for showing a picture in the "my pictures"
> folder? Please!!
> I've just started programing, so I don't so much about it.

Gandalf! Where are you when we need you?
Oh great Gandalf! Please tell us the secret code to show a picture from
the "My Pictures" folder!
Sigge S. (Guest)
on 2009-02-20 17:59
Pascal J. Bourguignon wrote:
> Sigge Sg <removed_email_address@domain.invalid> writes:
>
>> Can anyone tell me the code for showing a picture in the "my pictures"
>> folder? Please!!
>> I've just started programing, so I don't so much about it.
>
> Gandalf! Where are you when we need you?
> Oh great Gandalf! Please tell us the secret code to show a picture from
> the "My Pictures" folder!

I meant in a ruby program!!!!!
Philip McDonald (Guest)
on 2009-02-20 19:30
(Received via mailing list)
>>
>>
>>
>> Gandalf! Where are you when we need you?
>> Oh great Gandalf! Please tell us the secret code to show a picture
>> from
>> the "My Pictures" folder!I
>


I think he's trying to tell you to try to figure out the process on
your own, and come back with some ideas and a little work under your
belt.

I've been wrong before.

mac
Phlip (Guest)
on 2009-02-20 19:40
(Received via mailing list)
Sigge Sg wrote:
> I meant in a ruby program!!!!!
Pascal is being an anus. The group apologizes for him.

His point, however, is that the Gods help those who help themselves.
There are
dozens of Ruby tutorials out there, and reciting them on this newsgroup
will not
improve anything!
Jeff S. (Guest)
on 2009-02-20 19:55
(Received via mailing list)
Pascal J. Bourguignon wrote:
> Sigge Sg <removed_email_address@domain.invalid> writes:
>
>> Can anyone tell me the code for showing a picture in the "my pictures"
>> folder? Please!!
>> I've just started programing, so I don't so much about it.
>
> Gandalf! Where are you when we need you?
> Oh great Gandalf! Please tell us the secret code to show a picture from
> the "My Pictures" folder!

Speak friend, and enter.
Robert H. (Guest)
on 2009-02-20 20:08
> Speak friend, and enter.

No, go away. We dont want any Gandalf here.
Tom R. (Guest)
on 2009-02-20 21:14
(Received via mailing list)
Sigge Sg wrote:
> Can anyone tell me the code for showing a picture in the "my pictures"
> folder? Please!!
> I've just started programing, so I don't so much about it.
>
For someone recently into programming, the internet does indeed supply
an almost unlimited supply of information, uncoordinated, unrelated, and
overwhelming and certainly not helpful.

Sometimes someone submitting a simple Ruby program which does what one
needs is just what someone needs to begin understanding the process so
that he is able to use the internet information more effectively.  And
certainly he is not asking someone else to do his programming for him.

tr
Justin C. (Guest)
on 2009-02-21 02:08
(Received via mailing list)
Sigge Sg wrote:
> Can anyone tell me the code for showing a picture in the "my pictures"
> folder? Please!!
> I've just started programing, so I don't so much about it.
>

RMagick is probably a good place to start for displaying messages.
(http://studio.imagemagick.org/RMagick/doc/usage.ht...)
I bet you could poke around and find some examples.

-Justin
Tim H. (Guest)
on 2009-02-21 02:24
(Received via mailing list)
Justin C. wrote:
> -Justin
>
>

Thanks for the recommendation, Justin, but while RMagick can do many
things, it can't display an image on MS Windows because its display
method depends on a X server, which doesn't exist for MS Windows. So it
goes.

I'm not a Win guru, but wouldn't the simplest thing to do be to start an
  external image display program like IrfanView and tell it to display
the image?

my_image = "test.bmp"
system("start /wait i_view32 " + my_image)
Michael W. Ryder (Guest)
on 2009-02-21 02:45
(Received via mailing list)
Tim H. wrote:
>> -Justin
> the image?
>
> my_image = "test.bmp"
> system("start /wait i_view32 " + my_image)
>
If you are running XP and have the file associations set you can just
use:

system("start /wait " + my_image)

This way you can display multiple types of files without having to check
for extensions.  I used this method in a C program I wrote years ago to
display mixed file types.
vimal (Guest)
on 2009-02-21 07:50
(Received via mailing list)
So far i've seen this group as very helpful and energetic than any
other groups.
For the first time i've seen someone like Pascal B. replying
in a confusing manner. :(

Group members come for help to solve their own needs and not to gather
or grab your programming capability.
This topic is locked and can not be replied to.