Displaying pictures

Posted by ForgottenMUD on Mon 08 Aug 2011 02:53 PM — 3 posts, 16,215 views.

Belgium #0
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.
USA Global Moderator #1
http://www.gammon.com.au/mushclient/mw_intro.htm
Australia Forum Administrator #2
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.