Index: units/helpers/image_helper.php =================================================================== --- units/helpers/image_helper.php (revision 14733) +++ units/helpers/image_helper.php (working copy) @@ -243,7 +243,7 @@ $transparent_index = imagecolortransparent($src_image_rs); // if we have a specific transparent color - if ($transparent_index >= 0) { + if ( $transparent_index >= 0 && $transparent_index < imagecolorstotal($src_image_rs) ) { // get the original image's transparent color's RGB values $transparent_color = imagecolorsforindex($src_image_rs, $transparent_index); @@ -260,7 +260,7 @@ } // always make a transparent background color for PNGs that don't have one allocated already - if ($image_type == IMAGETYPE_PNG) { + if ( $image_type == IMAGETYPE_PNG ) { // turn off transparency blending (temporarily) imagealphablending($dst_image_rs, false);