Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ Displaying pictures

Displaying pictures

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by ForgottenMUD   Belgium  (22 posts)  Bio
Date Mon 08 Aug 2011 02:53 PM (UTC)
Message
Greetings,

Is it possible to make a miniwindow that displays pictures? I have an image library for my MUD but I have a tough time using MUSHClient. I would like it to display pictures in a box when you enter a new room. The MUD server would send a code like \img<img #> or something like that and the picture would need to be shrinked or stretched to the box size because my pictures have different sizes. I would greatly appreciate if anyone could help.

Thanks.

ForgottenMUD - original Java MUD
http://sites.google.com/site/forgottenmud
Top

Posted by Fiendish   USA  (2,547 posts)  Bio   Global Moderator
Date Reply #1 on Mon 08 Aug 2011 04:06 PM (UTC)
Message
http://www.gammon.com.au/mushclient/mw_intro.htm

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #2 on Mon 08 Aug 2011 10:09 PM (UTC)

Amended on Mon 08 Aug 2011 10:10 PM (UTC) by Nick Gammon

Message
Also see:

http://www.gammon.com.au/mushclient/mw_images.htm

The images need to be PNG or BMP files. If they are not, a program like IrfanView can convert an entire folder to another format very quickly (and resize if that is desired).

Then you just need a trigger that matches the <img> stuff, pulls out the file name, prepends your local pathname, and displays it.

Basically you need to create a miniwindow as described here:

http://www.gammon.com.au/mushclient/mw_creation.htm

Then load the image as described on the "Drawing images" page, and then actually copy it to the miniwindow. The examples should get you a long way towards doing that.

The WindowDrawImage function can stretch or shrink images if desired.

If you have troubles post your code and explain what is going wrong.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,532 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.