Completed
Push — master ( c994fa...ad8ec0 )
by cam
01:07
created
ecrire/inc/filtres_images_lib_mini.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	$blue = dechex($blue);
44 44
 
45 45
 	if (strlen($red) == 1) {
46
-		$red = '0' . $red;
46
+		$red = '0'.$red;
47 47
 	}
48 48
 	if (strlen($green) == 1) {
49
-		$green = '0' . $green;
49
+		$green = '0'.$green;
50 50
 	}
51 51
 	if (strlen($blue) == 1) {
52
-		$blue = '0' . $blue;
52
+		$blue = '0'.$blue;
53 53
 	}
54 54
 
55 55
 	return "$red$green$blue";
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	$couleur = couleur_html_to_hex($couleur);
68 68
 	$couleur = ltrim($couleur, '#');
69 69
 	if (strlen($couleur) === 3) {
70
-		$couleur = $couleur[0] . $couleur[0] . $couleur[1] . $couleur[1] . $couleur[2] . $couleur[2];
70
+		$couleur = $couleur[0].$couleur[0].$couleur[1].$couleur[1].$couleur[2].$couleur[2];
71 71
 	}
72 72
 	$retour = [];
73 73
 	$retour['red'] = hexdec(substr($couleur, 0, 2));
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
 	$var_G = ($G / 255);
126 126
 	$var_B = ($B / 255);
127 127
 
128
-	$var_Min = min($var_R, $var_G, $var_B);   //Min. value of RGB
129
-	$var_Max = max($var_R, $var_G, $var_B);   //Max. value of RGB
130
-	$del_Max = $var_Max - $var_Min;           //Delta RGB value
128
+	$var_Min = min($var_R, $var_G, $var_B); //Min. value of RGB
129
+	$var_Max = max($var_R, $var_G, $var_B); //Max. value of RGB
130
+	$del_Max = $var_Max - $var_Min; //Delta RGB value
131 131
 
132 132
 	$L = ($var_Max + $var_Min) / 2;
133 133
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
  */
190 190
 function _couleur_hsl_to_rgb($H, $S, $L) {
191 191
 	// helper
192
-	$hue_2_rgb = function ($v1, $v2, $vH) {
192
+	$hue_2_rgb = function($v1, $v2, $vH) {
193 193
 		if ($vH < 0) {
194 194
 			$vH += 1;
195 195
 		}
@@ -321,11 +321,11 @@  discard block
 block discarded – undo
321 321
 		$img = "<img src='$source' />";
322 322
 	} elseif (
323 323
 		preg_match('@^data:image/([^;]*);base64,(.*)$@isS', $source, $regs)
324
-		and $extension = _image_trouver_extension_depuis_mime('image/' . $regs[1])
324
+		and $extension = _image_trouver_extension_depuis_mime('image/'.$regs[1])
325 325
 		and in_array($extension, _image_extensions_acceptees_en_entree())
326 326
 	) {
327 327
 		# gerer img src="data:....base64"
328
-		$local = sous_repertoire(_DIR_VAR, 'image-data') . md5($regs[2]) . '.' . _image_extension_normalisee($extension);
328
+		$local = sous_repertoire(_DIR_VAR, 'image-data').md5($regs[2]).'.'._image_extension_normalisee($extension);
329 329
 		if (!file_exists($local)) {
330 330
 			ecrire_fichier($local, base64_decode($regs[2]));
331 331
 		}
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 	// les protocoles web prennent au moins 3 lettres
343 343
 	if (tester_url_absolue($source)) {
344 344
 		include_spip('inc/distant');
345
-		$fichier = _DIR_RACINE . copie_locale($source);
345
+		$fichier = _DIR_RACINE.copie_locale($source);
346 346
 		if (!$fichier) {
347 347
 			return '';
348 348
 		}
@@ -440,9 +440,9 @@  discard block
 block discarded – undo
440 440
 			// on garde la terminaison initiale car image simplement copiee
441 441
 			// et on postfixe son nom avec un md5 du path
442 442
 			$terminaison_dest = $terminaison;
443
-			$fichier_dest .= '-' . substr(md5("$identifiant"), 0, 5);
443
+			$fichier_dest .= '-'.substr(md5("$identifiant"), 0, 5);
444 444
 		} else {
445
-			$fichier_dest .= '-' . substr(md5("$identifiant-$effet"), 0, 5);
445
+			$fichier_dest .= '-'.substr(md5("$identifiant-$effet"), 0, 5);
446 446
 		}
447 447
 		$cache = sous_repertoire(_DIR_VAR, $cache);
448 448
 		$cache = sous_repertoire($cache, $effet);
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 		$fichier_dest = substr($fichier_dest, 2);
454 454
 	}
455 455
 
456
-	$fichier_dest = $cache . $fichier_dest . '.' . $terminaison_dest;
456
+	$fichier_dest = $cache.$fichier_dest.'.'.$terminaison_dest;
457 457
 
458 458
 	$GLOBALS['images_calculees'][] = $fichier_dest;
459 459
 
@@ -491,15 +491,15 @@  discard block
 block discarded – undo
491 491
 
492 492
 	if ($creer) {
493 493
 		spip_log(
494
-			'filtre image ' . ($fonction_creation ? reset($fonction_creation) : '') . "[$effet] sur $fichier",
495
-			'images' . _LOG_DEBUG
494
+			'filtre image '.($fonction_creation ? reset($fonction_creation) : '')."[$effet] sur $fichier",
495
+			'images'._LOG_DEBUG
496 496
 		);
497 497
 	}
498 498
 
499 499
 	$term_fonction = _image_trouver_extension_pertinente($fichier);
500
-	$ret['fonction_imagecreatefrom'] = '_imagecreatefrom' . $term_fonction;
500
+	$ret['fonction_imagecreatefrom'] = '_imagecreatefrom'.$term_fonction;
501 501
 	$ret['fichier'] = $fichier;
502
-	$ret['fonction_image'] = '_image_image' . $terminaison_dest;
502
+	$ret['fonction_image'] = '_image_image'.$terminaison_dest;
503 503
 	$ret['fichier_dest'] = $fichier_dest;
504 504
 	$ret['format_source'] = _image_extension_normalisee($terminaison);
505 505
 	$ret['format_dest'] = $terminaison_dest;
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
 
649 649
 	$_terminaison = _image_trouver_extension_depuis_mime($mime);
650 650
 	if ($_terminaison and $_terminaison !== $terminaison) {
651
-		spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.' . _LOG_INFO_IMPORTANTE);
651
+		spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.'._LOG_INFO_IMPORTANTE);
652 652
 		$terminaison = $_terminaison;
653 653
 	}
654 654
 	return $terminaison;
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 	if (!function_exists('imagepng')) {
806 806
 		return false;
807 807
 	}
808
-	$tmp = $fichier . '.tmp';
808
+	$tmp = $fichier.'.tmp';
809 809
 	$ret = imagepng($img, $tmp);
810 810
 	if (file_exists($tmp)) {
811 811
 		$taille_test = getimagesize($tmp);
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
 	if (!function_exists('imagegif')) {
841 841
 		return false;
842 842
 	}
843
-	$tmp = $fichier . '.tmp';
843
+	$tmp = $fichier.'.tmp';
844 844
 	$ret = imagegif($img, $tmp);
845 845
 	if (file_exists($tmp)) {
846 846
 		$taille_test = getimagesize($tmp);
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
 	if (!function_exists('imagejpeg')) {
881 881
 		return false;
882 882
 	}
883
-	$tmp = $fichier . '.tmp';
883
+	$tmp = $fichier.'.tmp';
884 884
 
885 885
 	// Enable interlancing
886 886
 	imageinterlace($img, true);
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
 	if (!function_exists('imagewebp')) {
942 942
 		return false;
943 943
 	}
944
-	$tmp = $fichier . '.tmp';
944
+	$tmp = $fichier.'.tmp';
945 945
 	$ret = imagewebp($img, $tmp, $qualite);
946 946
 	if (file_exists($tmp)) {
947 947
 		$taille_test = getimagesize($tmp);
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
  */
976 976
 function _image_imagesvg($img, $fichier) {
977 977
 
978
-	$tmp = $fichier . '.tmp';
978
+	$tmp = $fichier.'.tmp';
979 979
 	if (strpos($img, '<') === false) {
980 980
 		$img = supprimer_timestamp($img);
981 981
 		if (!file_exists($img)) {
@@ -1032,14 +1032,14 @@  discard block
 block discarded – undo
1032 1032
  */
1033 1033
 function _image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE, $fonction = null) {
1034 1034
 	if (is_null($fonction)) {
1035
-		$fonction = '_image_image' . $valeurs['format_dest'];
1035
+		$fonction = '_image_image'.$valeurs['format_dest'];
1036 1036
 	}
1037 1037
 	$ret = false;
1038 1038
 	#un flag pour reperer les images gravees
1039 1039
 	$lock = (
1040 1040
 		!statut_effacer_images_temporaires('get') // si la fonction n'a pas ete activee, on grave tout
1041 1041
 	    or
1042
-		(@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'] . '.src'))
1042
+		(@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'].'.src'))
1043 1043
 		);
1044 1044
 	if (
1045 1045
 		function_exists($fonction)
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 			// dans tous les cas mettre a jour la taille de l'image finale
1052 1052
 			[$valeurs['hauteur_dest'], $valeurs['largeur_dest']] = taille_image($valeurs['fichier_dest']);
1053 1053
 			$valeurs['date'] = @filemtime($valeurs['fichier_dest']); // pour la retrouver apres disparition
1054
-			ecrire_fichier($valeurs['fichier_dest'] . '.src', serialize($valeurs), true);
1054
+			ecrire_fichier($valeurs['fichier_dest'].'.src', serialize($valeurs), true);
1055 1055
 		}
1056 1056
 	}
1057 1057
 
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
 
1227 1227
 	// attributs deprecies. Transformer en CSS
1228 1228
 	if ($espace = extraire_attribut($tag, 'hspace')) {
1229
-		$style = "margin:${espace}px;" . $style;
1229
+		$style = "margin:${espace}px;".$style;
1230 1230
 		$tag = inserer_attribut($tag, 'hspace', '');
1231 1231
 	}
1232 1232
 
@@ -1353,7 +1353,7 @@  discard block
 block discarded – undo
1353 1353
 	$image = $valeurs['fichier'];
1354 1354
 	$format = $valeurs['format_source'];
1355 1355
 	$destdir = dirname($valeurs['fichier_dest']);
1356
-	$destfile = basename($valeurs['fichier_dest'], '.' . $valeurs['format_dest']);
1356
+	$destfile = basename($valeurs['fichier_dest'], '.'.$valeurs['format_dest']);
1357 1357
 
1358 1358
 	$format_sortie = $valeurs['format_dest'];
1359 1359
 
@@ -1385,14 +1385,14 @@  discard block
 block discarded – undo
1385 1385
 
1386 1386
 	// Si l'image est de la taille demandee (ou plus petite), simplement la retourner
1387 1387
 	if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1388
-		$vignette = $destination . '.' . $format;
1388
+		$vignette = $destination.'.'.$format;
1389 1389
 		@copy($image, $vignette);
1390 1390
 	}
1391 1391
 
1392 1392
 	elseif ($valeurs['format_source'] === 'svg') {
1393 1393
 		if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) {
1394 1394
 			$format_sortie = 'svg';
1395
-			$vignette = $destination . '.' . $format_sortie;
1395
+			$vignette = $destination.'.'.$format_sortie;
1396 1396
 			$valeurs['fichier_dest'] = $vignette;
1397 1397
 			_image_gd_output($svg, $valeurs);
1398 1398
 		}
@@ -1404,9 +1404,9 @@  discard block
 block discarded – undo
1404 1404
 			define('_CONVERT_COMMAND', 'convert');
1405 1405
 		} // Securite : mes_options.php peut preciser le chemin absolu
1406 1406
 		if (!defined('_RESIZE_COMMAND')) {
1407
-			define('_RESIZE_COMMAND', _CONVERT_COMMAND . ' -quality ' . _IMG_CONVERT_QUALITE . ' -resize %xx%y! %src %dest');
1407
+			define('_RESIZE_COMMAND', _CONVERT_COMMAND.' -quality '._IMG_CONVERT_QUALITE.' -resize %xx%y! %src %dest');
1408 1408
 		}
1409
-		$vignette = $destination . '.' . $format_sortie;
1409
+		$vignette = $destination.'.'.$format_sortie;
1410 1410
 		$commande = str_replace(
1411 1411
 			['%x', '%y', '%src', '%dest'],
1412 1412
 			[
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
 		if (!@file_exists($vignette)) {
1423 1423
 			spip_log("echec convert sur $vignette");
1424 1424
 
1425
-			return;  // echec commande
1425
+			return; // echec commande
1426 1426
 		}
1427 1427
 	}
1428 1428
 
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
 		if (!$output) {
1441 1441
 			return;
1442 1442
 		}
1443
-		$vignette = $output . DIRECTORY_SEPARATOR . basename($destination) . '.' . $format_sortie;
1443
+		$vignette = $output.DIRECTORY_SEPARATOR.basename($destination).'.'.$format_sortie;
1444 1444
 
1445 1445
 		$imagick = new Imagick();
1446 1446
 		$imagick->readImage(realpath($image));
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
 			$destHeight,
1450 1450
 			Imagick::FILTER_LANCZOS,
1451 1451
 			1
1452
-		);//, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1452
+		); //, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1453 1453
 		$imagick->writeImage($vignette);
1454 1454
 
1455 1455
 		if (!@file_exists($vignette)) {
@@ -1458,7 +1458,7 @@  discard block
 block discarded – undo
1458 1458
 			return;
1459 1459
 		}
1460 1460
 		// remettre le chemin relatif car c'est ce qu'attend SPIP pour la suite (en particlier action/tester)
1461
-		$vignette = $destination . '.' . $format_sortie;
1461
+		$vignette = $destination.'.'.$format_sortie;
1462 1462
 	}
1463 1463
 
1464 1464
 	// netpbm
@@ -1469,11 +1469,11 @@  discard block
 block discarded – undo
1469 1469
 		if (_PNMSCALE_COMMAND == '') {
1470 1470
 			return;
1471 1471
 		}
1472
-		$vignette = $destination . '.' . $format_sortie;
1472
+		$vignette = $destination.'.'.$format_sortie;
1473 1473
 		$pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', _PNMSCALE_COMMAND);
1474 1474
 		if ($format == 'jpg') {
1475 1475
 			$jpegtopnm_command = str_replace('pnmscale', 'jpegtopnm', _PNMSCALE_COMMAND);
1476
-			exec("$jpegtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1476
+			exec("$jpegtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1477 1477
 			if (!($s = @filesize($vignette))) {
1478 1478
 				spip_unlink($vignette);
1479 1479
 			}
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
 		} else {
1486 1486
 			if ($format == 'gif') {
1487 1487
 				$giftopnm_command = str_replace('pnmscale', 'giftopnm', _PNMSCALE_COMMAND);
1488
-				exec("$giftopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1488
+				exec("$giftopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1489 1489
 				if (!($s = @filesize($vignette))) {
1490 1490
 					spip_unlink($vignette);
1491 1491
 				}
@@ -1497,7 +1497,7 @@  discard block
 block discarded – undo
1497 1497
 			} else {
1498 1498
 				if ($format == 'png') {
1499 1499
 					$pngtopnm_command = str_replace('pnmscale', 'pngtopnm', _PNMSCALE_COMMAND);
1500
-					exec("$pngtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1500
+					exec("$pngtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1501 1501
 					if (!($s = @filesize($vignette))) {
1502 1502
 						spip_unlink($vignette);
1503 1503
 					}
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
 			return;
1520 1520
 		}
1521 1521
 		if (_IMG_GD_MAX_PIXELS && $srcWidth * $srcHeight > _IMG_GD_MAX_PIXELS) {
1522
-			spip_log('vignette gd1/gd2 impossible : ' . $srcWidth * $srcHeight . 'pixels');
1522
+			spip_log('vignette gd1/gd2 impossible : '.$srcWidth * $srcHeight.'pixels');
1523 1523
 
1524 1524
 			return;
1525 1525
 		}
@@ -1831,7 +1831,7 @@  discard block
 block discarded – undo
1831 1831
 		// de l'image, de facon a tromper le cache du navigateur
1832 1832
 		// quand on fait supprimer/reuploader un logo
1833 1833
 		// (pas de filemtime si SAFE MODE)
1834
-		$date = test_espace_prive() ? ('?' . $date) : '';
1834
+		$date = test_espace_prive() ? ('?'.$date) : '';
1835 1835
 
1836 1836
 		return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]);
1837 1837
 	}
@@ -1877,7 +1877,7 @@  discard block
 block discarded – undo
1877 1877
 	public static function LittleEndian2String($number, $minbytes = 1) {
1878 1878
 		$intstring = '';
1879 1879
 		while ($number > 0) {
1880
-			$intstring = $intstring . chr($number & 255);
1880
+			$intstring = $intstring.chr($number & 255);
1881 1881
 			$number >>= 8;
1882 1882
 		}
1883 1883
 
@@ -1909,9 +1909,9 @@  discard block
 block discarded – undo
1909 1909
 					$b = $argb['blue'];
1910 1910
 
1911 1911
 					if ($bpp[$key] == 32) {
1912
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r) . chr($a);
1912
+						$icXOR[$key] .= chr($b).chr($g).chr($r).chr($a);
1913 1913
 					} elseif ($bpp[$key] == 24) {
1914
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r);
1914
+						$icXOR[$key] .= chr($b).chr($g).chr($r);
1915 1915
 					}
1916 1916
 
1917 1917
 					if ($a < 128) {
@@ -1938,48 +1938,48 @@  discard block
 block discarded – undo
1938 1938
 
1939 1939
 			// BITMAPINFOHEADER - 40 bytes
1940 1940
 			$BitmapInfoHeader[$key] = '';
1941
-			$BitmapInfoHeader[$key] .= "\x28\x00\x00\x00";                // DWORD  biSize;
1942
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4);    // LONG   biWidth;
1941
+			$BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD  biSize;
1942
+			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); // LONG   biWidth;
1943 1943
 			// The biHeight member specifies the combined
1944 1944
 			// height of the XOR and AND masks.
1945 1945
 			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); // LONG   biHeight;
1946
-			$BitmapInfoHeader[$key] .= "\x01\x00";                    // WORD   biPlanes;
1947
-			$BitmapInfoHeader[$key] .= chr($bpp[$key]) . "\x00";              // wBitCount;
1948
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biCompression;
1949
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4);      // DWORD  biSizeImage;
1950
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biXPelsPerMeter;
1951
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biYPelsPerMeter;
1952
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrUsed;
1953
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrImportant;
1946
+			$BitmapInfoHeader[$key] .= "\x01\x00"; // WORD   biPlanes;
1947
+			$BitmapInfoHeader[$key] .= chr($bpp[$key])."\x00"; // wBitCount;
1948
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biCompression;
1949
+			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); // DWORD  biSizeImage;
1950
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG   biXPelsPerMeter;
1951
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG   biYPelsPerMeter;
1952
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biClrUsed;
1953
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biClrImportant;
1954 1954
 		}
1955 1955
 
1956 1956
 
1957
-		$icondata = "\x00\x00";                    // idReserved;   // Reserved (must be 0)
1958
-		$icondata .= "\x01\x00";                    // idType;	   // Resource Type (1 for icons)
1959
-		$icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2);  // idCount;	  // How many images?
1957
+		$icondata = "\x00\x00"; // idReserved;   // Reserved (must be 0)
1958
+		$icondata .= "\x01\x00"; // idType;	   // Resource Type (1 for icons)
1959
+		$icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2); // idCount;	  // How many images?
1960 1960
 
1961 1961
 		$dwImageOffset = 6 + (count($gd_image_array) * 16);
1962 1962
 		foreach ($gd_image_array as $key => $gd_image) {
1963 1963
 			// ICONDIRENTRY   idEntries[1]; // An entry for each image (idCount of 'em)
1964 1964
 
1965
-			$icondata .= chr($ImageWidths[$key]);           // bWidth;		  // Width, in pixels, of the image
1966
-			$icondata .= chr($ImageHeights[$key]);          // bHeight;		 // Height, in pixels, of the image
1967
-			$icondata .= chr($totalcolors[$key]);           // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1968
-			$icondata .= "\x00";                    // bReserved;	   // Reserved ( must be 0)
1965
+			$icondata .= chr($ImageWidths[$key]); // bWidth;		  // Width, in pixels, of the image
1966
+			$icondata .= chr($ImageHeights[$key]); // bHeight;		 // Height, in pixels, of the image
1967
+			$icondata .= chr($totalcolors[$key]); // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1968
+			$icondata .= "\x00"; // bReserved;	   // Reserved ( must be 0)
1969 1969
 
1970
-			$icondata .= "\x01\x00";                  // wPlanes;		 // Color Planes
1971
-			$icondata .= chr($bpp[$key]) . "\x00";            // wBitCount;	   // Bits per pixel
1970
+			$icondata .= "\x01\x00"; // wPlanes;		 // Color Planes
1971
+			$icondata .= chr($bpp[$key])."\x00"; // wBitCount;	   // Bits per pixel
1972 1972
 
1973 1973
 			$dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]);
1974 1974
 			$icondata .= phpthumb_functions::LittleEndian2String(
1975 1975
 				$dwBytesInRes,
1976 1976
 				4
1977
-			);     // dwBytesInRes;	// How many bytes in this resource?
1977
+			); // dwBytesInRes;	// How many bytes in this resource?
1978 1978
 
1979 1979
 			$icondata .= phpthumb_functions::LittleEndian2String(
1980 1980
 				$dwImageOffset,
1981 1981
 				4
1982
-			);    // dwImageOffset;   // Where in the file is this image?
1982
+			); // dwImageOffset;   // Where in the file is this image?
1983 1983
 			$dwImageOffset += strlen($BitmapInfoHeader[$key]);
1984 1984
 			$dwImageOffset += strlen($icXOR[$key]);
1985 1985
 			$dwImageOffset += strlen($icAND[$key]);
Please login to merge, or discard this patch.