No, but it is in the default SCALE, so if you we using node targets, that would become transparent. I suspect the "best" answer is some much more random colour like 13,99,201, but it's still second best to actual working alpha support (not just transparency). I'll add the SET option in 0.91, so folks who are stuck with this can enable it.submarine wrote:One could replace the half-red color by magenta :
I doubt there are a lot of images/icons using that one.Code: Select all
$nothing=imagecolorallocate($node_im, 255, 0, 255);
Weathermap Editor 0.9 Problem
Moderators: Developers, Moderators
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
This is to fix the Debian GD library problem:
download libgd2-xpm_2.0.34~rc1-2_i386.deb
(it is available from ftp.debian.org/debian/pool/main/libg/libgd2/libgd2-xpm_2.0.34~rc1-2_i386.deb)
run the following:
dpkg -i libgd2-xpm_2.0.34~rc1-2_i386.deb
I then did a reboot and now I can use the original line ($nothing=imagecolorallocatealpha($node_im, 128, 0, 0,127);) and have transparency
Many thanks again!
download libgd2-xpm_2.0.34~rc1-2_i386.deb
(it is available from ftp.debian.org/debian/pool/main/libg/libgd2/libgd2-xpm_2.0.34~rc1-2_i386.deb)
run the following:
dpkg -i libgd2-xpm_2.0.34~rc1-2_i386.deb
I then did a reboot and now I can use the original line ($nothing=imagecolorallocatealpha($node_im, 128, 0, 0,127);) and have transparency
Many thanks again!
And without the fixed GD library, the following lines changed/added in Weathermap.class.php (as you suggested) work well too:
(first line is line number 1155)
#$nothing=imagecolorallocatealpha($node_im,128,0,0,127);
#$nothing=imagecolorallocate($node_im, 128, 0, 0);
$nothing=imagecolorallocate($node_im, 255, 0, 255);
imagefill($node_im, 0, 0, $nothing);
imagecolortransparent($node_im, $nothing);
(first line is line number 1155)
#$nothing=imagecolorallocatealpha($node_im,128,0,0,127);
#$nothing=imagecolorallocate($node_im, 128, 0, 0);
$nothing=imagecolorallocate($node_im, 255, 0, 255);
imagefill($node_im, 0, 0, $nothing);
imagecolortransparent($node_im, $nothing);
Hi.
I've been busy with that alpha. So I tried to replace the following code :
by this one :
It seems to work. Can someone confirm this, please ?
I've been busy with that alpha. So I tried to replace the following code :
Code: Select all
// create an image of that size and draw into it
$node_im=imagecreatetruecolor($bbox_x2 - $bbox_x1 , $bbox_y2 - $bbox_y1 );
imageSaveAlpha($node_im, true);
// ImageAlphaBlending($node_im, true);
$nothing=imagecolorallocatealpha($node_im,128,0,0,127);
imagefill($node_im, 0, 0, $nothing);
Code: Select all
$temp_width = $bbox_x2 - $bbox_x1;
$temp_height = $bbox_y2 - $bbox_y1;
$node_im=imagecreatetruecolor($temp_width , $temp_height );
imagealphablending($node_im, FALSE);
imagesavealpha($node_im,TRUE);
$nothing = imagecolorexactalpha($node_im,128,0,0,127);
imagefilledrectangle($node_im,0,0,$temp_width,$temp_height,$nothing);
Who is online
Users browsing this forum: No registered users and 6 guests