Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #507 from patrickheck/patch-7

Deal nicely with GIF files that have an illegal index-color set.
  • Loading branch information...
commit 1e519596f130fe0d9c77ca0f4ac01c90c76d4df3 2 parents 2599adf + 1c38ece
@aembler aembler authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  web/concrete/helpers/image.php
View
2  web/concrete/helpers/image.php
@@ -130,7 +130,7 @@ public function create($originalPath, $newPath, $width, $height, $crop = false)
$trnprt_indx = imagecolortransparent($im);
// If we have a specific transparent color
- if ($trnprt_indx >= 0) {
+ if ($trnprt_indx >= 0 && $trnprt_indx < imagecolorstotal($im)) {
// Get the original image's transparent color's RGB values
$trnprt_color = imagecolorsforindex($im, $trnprt_indx);
Please sign in to comment.
Something went wrong with that request. Please try again.