Menu

#174 %image: Status Icons show in black & white (display_map.pm)

to_be_fixed_later
closed-fixed
nobody
5
2004-03-01
2004-02-10
No

Bug in display-map.pm ?

I am running bs-0.98c8 on a linux server running Suse 8.2
# uname -sr
Linux 2.4.20-4GB

(but I experienced the same problem with bs-0.98b3 on a
HP platform)

The server was installed with
bigsister-server-0.98c8-2.noarch.rpm

I am using display-map to display png icon files which
I created
to represent applications that I am monitoring (and not
just status lights) (I attached a sample file to show
what I mean)

I created one png file for each colour per application.

PROBLEM: These png icons appear in Black and White

I managed to fix it by modifying $BS_BIN/display_map.pm

MY SOLUTION:

in display_map.pm: I added the following line in
subroutine create:

$image=GD::Image->trueColor(1);

----------------------------------------
sub create {
my ( $self ) = @_;
my $cfg = new cfgfile( $self->{"cfg"} );
my $seq = FileHandle->new;
my ($cmd, $args, @args);
my( $image, %stats, $map, $i, %colors, %positions );

$image=GD::Image->trueColor(1); # line added

$cfg->rewind();
print "display_map::create() for
".($cfg->current_file())."\n" if(
$BigSister::common::dl>4 );
----------------------------------------

DIFF FILE
------------------------------------------
# diff ori/display_map.pm display_map.pm

40a41,42
> $image=GD::Image->trueColor(1);
>
#

I now get all colouts and better definitions.
------------------------------------------

Didier

Discussion

  • Didier Garcon

    Didier Garcon - 2004-02-10

    display_map result when colours show

     
  • Thomas Aeby

    Thomas Aeby - 2004-03-01
    • summary: %image: Status Icons show in black & white (display_map.pm) --> %image: Status Icons show in black & white (display_map.pm)
    • status: open --> open-fixed
     
  • Thomas Aeby

    Thomas Aeby - 2004-03-01

    Logged In: YES
    user_id=77961

    Oh, yes, I see, the latest versions of GD now default to
    paletted images. New versions of GD always come with new
    surprises :-(

    Of course, older versions of GD do not even know
    GD::Image->trueColor(), so I changed your proposal to

    eval {
    GD::Image->trueColor(1);
    };

     
  • Thomas Aeby

    Thomas Aeby - 2004-03-01
    • status: open-fixed --> closed-fixed
     
  • Thomas Aeby

    Thomas Aeby - 2004-03-01

    Logged In: YES
    user_id=77961

    fixed in 0.99b1

     

Log in to post a comment.

MongoDB Logo MongoDB