Xymon Mailing List Archive search

use png's instead of gif's

5 messages in this thread

list Kris Springer · Sun, 24 Nov 2013 12:21:22 -0800 ·
I create my own icons for xymon, but I'd like to use png files instead of
gif's.  What config file are those specified in?  I can easily overwrite
the old icons with my new icons if I leave everything as gif's, but I'd
like to make them png's instead.  Where do I set that?

Thank you.
*Kris Springer*
list Jeremy Laidman · Mon, 25 Nov 2013 16:34:24 +1100 ·
quoted from Kris Springer
On 25 November 2013 07:21, Kris Springer <user-c2caa0a7a8d5@xymon.invalid> wrote:
I create my own icons for xymon, but I'd like to use png files instead of
gif's.  What config file are those specified in?  I can easily overwrite
the old icons with my new icons if I leave everything as gif's, but I'd
like to make them png's instead.  Where do I set that?
Kris, this is hard-coded in Xymon.  The function dotgiffilename() in
lib/color.c appends ".gif" to the color name when generating webpages.  You
could change the source code and re-compile.  But suspect that if you
simply rename your PNG files to have a .gif extension, then they'll be
recognised by the browser, and displayed correctly anyway.

Cheers
Jeremy
list Josh Luthman · Mon, 25 Nov 2013 00:36:07 -0500 ·
The browser reads the file.  Only Windows executes based on file name.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
quoted from Jeremy Laidman
On Nov 25, 2013 12:34 AM, "Jeremy Laidman" <user-71895fb2e44c@xymon.invalid> wrote:
On 25 November 2013 07:21, Kris Springer <user-c2caa0a7a8d5@xymon.invalid>wrote:
I create my own icons for xymon, but I'd like to use png files instead of
gif's.  What config file are those specified in?  I can easily overwrite
the old icons with my new icons if I leave everything as gif's, but I'd
like to make them png's instead.  Where do I set that?
Kris, this is hard-coded in Xymon.  The function dotgiffilename() in
lib/color.c appends ".gif" to the color name when generating webpages.  You
could change the source code and re-compile.  But suspect that if you
simply rename your PNG files to have a .gif extension, then they'll be
recognised by the browser, and displayed correctly anyway.

Cheers
Jeremy

list Henrik Størner · Mon, 25 Nov 2013 09:19:02 +0100 ·
quoted from Jeremy Laidman
 

Den 25.11.2013 06:34, Jeremy Laidman skrev: 
On 25 November 2013
07:21, Kris Springer <user-c2caa0a7a8d5@xymon.invalid [1]> wrote:
I
create my own icons for xymon, but I'd like to use png files instead of
gif's. What config file are those specified in? I can easily overwrite
the old icons with my new icons if I leave everything as gif's, but I'd
like to make them png's instead. Where do I set that?
Kris, this is
hard-coded in Xymon. The function dotgiffilename() in lib/color.c
appends ".gif" to the color name when generating webpages. You could
change the source code and re-compile. But suspect that if you simply
rename your PNG files to have a .gif extension, then they'll be
recognised by the browser, and displayed correctly anyway.
Hmm, yes -
that is absolutely stupid. The patch for removing that is rather
trivial, I'll include it in the next release (4.3.13, due this week).


Regards, 
Henrik 

 
Links:
[1]
mailto:user-c2caa0a7a8d5@xymon.invalid
list Jeremy Laidman · Tue, 26 Nov 2013 10:19:45 +1100 ·
quoted from Josh Luthman
On 25 November 2013 16:36, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
The browser reads the file.  Only Windows executes based on file name.

Yes, that's a good point.  I wondered if the browser instead gets its
queue from the Content-Type header MIME type (that is "image/gif" or
"image/png").  So I tested it.  Apache gives "image/gif" even for a PNG
file, so Apache is looking only at the file extension.  When my browser
(Chrome) gets the image file, it ignores the MIME type and instead looks at
the image file contents to see what it is and how to display it.  Just like
Josh said.

J