Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Mabus
Newbie


Joined: 17 Jun 2006
Posts: 3

PostPosted: Sun Jun 18, 2006 12:04 am   

MXP Error Help
 
Hello,

I am getting a Jpg Error #41 on a MUD that is supposed to have MXP set up. I searched around for an error list but could not find one, so I figured to post and ask what the error was and if there was a complete listing of errors.

I would appreciate any help.
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sun Jun 18, 2006 2:46 am   
 
sounds like its having a problem with an image. Disable images in MXP and see if the problem continues
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Mabus
Newbie


Joined: 17 Jun 2006
Posts: 3

PostPosted: Sun Jun 18, 2006 2:52 am   
 
Thank you for your response.

That would stop the error, but I want to be able to see images. As the MUD is new there could be a problem with path, or missing file or...
..well heck, the "ors" could go on.

Like to be able to find the specific problem, troubleshoot it and make ZMud work with images on the MUD. That was why I was hoping for a comprehensive "Error List" so I could see what that error addressed.

It is a CoffeeMud Codebase MUD, and images work on the main CoffeeMud, just not on this particular game's server. As it is in alpha-phase finding the problem, fixing it (and thus allowing ZMud users another MXP enabled MUD) is my wish.
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sun Jun 18, 2006 6:17 am   
 
Ok i apologize i didnt say this properly i was tired when i posted the above. As the what the error means its simple. JPEG decompression/files arent supported. GIF or BMP. As such i would tell them to convert the images to GIF and then try again and i think you will meet with success.

If they really want to use the JPG format then they need to setup filters to handle it

Code:

Images
MXP supports an <IMAGE> tag to display inline graphics images.  GIF or BMP images are supported.  Additional image types or encrypted images can be supported with MUD-specific Filters as described in the next section.

This is similar to the <IMG> HTML tag but doesn't implement some of the HTML options.  The <IMAGE> tag is very similar to the <SOUND> tag (or !!SOUND command) in MSP.  The attributes of the <IMAGE> tag are:

FName
The name of the graphics file to display.
URL
The URL of the path for the graphic if it should be downloaded on the fly.  This is not recommended for large graphics but is supported to be compatible with the MSP URL parameter for sounds.  The classname is appended to the URL, along with the name of the graphics file itself.
T (type)
The class for the image.  Same as classes used in MSP.
H (height)
The height of the image (in pixels, character heights, or percentage).  If omitted, the height is computed from the actual image.  If the specified height is different from the image, the image is stretched.
W (width)
The width of the image.  Same syntax as height.
HSPACE
Additional space to add before and after the image
VSPACE
Additional space to add above and below the image.
ALIGN (left|right|top|middle|bottom)
Controls the alignment of the image on the line.  For example, if ALIGN=Bottom is used, the rest of the text on the line will align with the bottom of the image.
ISMAP
Indicates that the image is an image-map.  When an image-map is included within a <SEND> tag, the command sent to the MUD is appended with "?X,Y" where X,Y is the position clicked on the image.
Note that when using images, the act as large individual characters as far as the client is concern.  Text cannot wrap on multiple lines next to an image...an image always takes up the entire height of the line.  Text wrapping to the next line will wrap at the normal left margin of the screen until the graphics image.  So, if inline graphics are used, you should make them similar in size to the surrounding text line.   Also remember that the user might be using a different screen font.

The <IMAGE> command is intended to be used with graphic images already loaded to the client's disk.  Using the URL attribute to download graphics on the fly can cause a severe burden to the MUD server.  However, even if the URL attribute is used, the image file is not downloaded if it already exists on the disk.  So, since the image is only downloaded once, the MUD server might be able to handle it.  Also, as with MSP, the downloading will never overwrite an existing file with the same name as a security precaution, or allow any absolute path information.  The file will be stored in a location determined by the client.  To update an image to a new version, you need to specify a new filename.

To implement a clickable image map (server-side map), include an image with the ISMAP attribute within a <SEND> tag.  For example:

<SEND showmap><IMAGE map.jpg ISMAP></SEND>
will create a clickable image map of the map.jpg graphic.  When the user clicks on the image, the command given in <SEND> will be sent to the MUD with the ?X,Y appended to it.  So, for example, if the user clicked on the X=10, Y=20 point on the image, the command:

showmap?10,20
will be sent to the MUD.

File Filters
It is likely that the MUD does not want all of the images stored on the clients disk to be viewable until the MUD server requests them.  MXP allows the MUD to define it's own graphics format and to provide a client plugin module that converts the MUD-specific format to a standard GIF or BMP format.  To define a filter, use the <FILTER> tag, with the SRC attribute to specify the file extension of the MUD-specific format, and the DEST attribute to specify the output file extension (default is BMP).  The NAME attribute gives the name of the plugin to be called, and the optional PROC attribute is a numeric parameter that the plugin can use to support multiple conversions as needed.   So, an example would be:

<FILTER SRC='gff' DEST='gif' NAME='MyPlugin'>
This would call the Filter function in the MYPLUGIN plugin module whenever the MUD tries to display a .gff file.  The .gff file is read into memory and passed to the Filter function in the plugin (with PROC=0 in the above example) and expect a .gif format output to be returned by the function.  Simply provide your plugin for users and you can then store proprietary files on the client that are decoded and displayed as needed.  Note that this same Filter function can also be used to process sound files used by MSP.

_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Mabus
Newbie


Joined: 17 Jun 2006
Posts: 3

PostPosted: Sun Jun 18, 2006 6:37 am   
 
You rock. Thank you.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net