Skip to content

Commit

Permalink
Fix for detection of truecolor gd library support (Lars Hecking)
Browse files Browse the repository at this point in the history
git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1312 5f96b256-904b-4d8d-8c98-d829582c6739
  • Loading branch information
Ethan Galstad committed Jul 7, 2009
1 parent 36d0298 commit ebda067
Show file tree
Hide file tree
Showing 6 changed files with 3,284 additions and 3,696 deletions.
3 changes: 2 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ Nagios 3.x Change Log
#####################


3.2.0 - 07/03/2009
3.2.0 - 07/??/2009
------------------
* Fix for read-only permissions bug in CGIs that caused problems viewing comments (bug #0000029)
* Fix for incorrect CGI reports (availability, trends, etc.) when reporting period spans Daylight Savings Time (bug #0000046)
* Fix for detection of truecolor support in GD library (Lars Hecking)



Expand Down
1 change: 1 addition & 0 deletions THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ since 1999. If I missed your name, let me know.
* Hugo Hallqvist
* Lars Hansson
* Ben Heavner
* Lars Hecking
* Jason Hedden
* Karl Hegbloom
* Thomas Hepper
Expand Down
8 changes: 8 additions & 0 deletions cgi/statusmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2108,7 +2108,11 @@ int initialize_graphics(void){
return ERROR;

/* allocate buffer for storing image */
#ifndef HAVE_GDIMAGECREATETRUECOLOR
map_image=gdImageCreate(canvas_width,canvas_height);
#else
map_image=gdImageCreateTrueColor(canvas_width,canvas_height);
#endif
if(map_image==NULL)
return ERROR;

Expand All @@ -2127,10 +2131,14 @@ int initialize_graphics(void){
color_transparency_index=gdImageColorAllocate(map_image,color_transparency_index_r,color_transparency_index_g,color_transparency_index_b);

/* set transparency index */
#ifndef HAVE_GDIMAGECREATETRUECOLOR
gdImageColorTransparent(map_image,color_white);
#else
gdImageColorTransparent(map_image,color_transparency_index);

/* set background */
gdImageFill(map_image, 0, 0, color_transparency_index);
#endif

/* make sure the graphic is interlaced */
gdImageInterlace(map_image,1);
Expand Down
Loading

0 comments on commit ebda067

Please sign in to comment.