Lines Matching refs:key

23 		foreach ($gd_image_array as $key => $gd_image) {
25 $ImageWidths[$key] = imagesx($gd_image);
26 $ImageHeights[$key] = imagesy($gd_image);
27 $bpp[$key] = imageistruecolor($gd_image) ? 32 : 24;
28 $totalcolors[$key] = imagecolorstotal($gd_image);
30 $icXOR[$key] = '';
31 for ($y = $ImageHeights[$key] - 1; $y >= 0; $y--) {
32 for ($x = 0; $x < $ImageWidths[$key]; $x++) {
39 if ($bpp[$key] == 32) {
40 $icXOR[$key] .= chr($b).chr($g).chr($r).chr($a);
41 } elseif ($bpp[$key] == 24) {
42 $icXOR[$key] .= chr($b).chr($g).chr($r);
46 @$icANDmask[$key][$y] .= '1';
48 @$icANDmask[$key][$y] .= '0';
52 while (strlen($icANDmask[$key][$y]) % 32) {
53 $icANDmask[$key][$y] .= '0';
56 $icAND[$key] = '';
57 foreach ($icANDmask[$key] as $y => $scanlinemaskbits) {
59 $icAND[$key] .= chr(bindec(str_pad(substr($scanlinemaskbits, $i, 8), 8, '0', STR_PAD_LEFT)));
65 foreach ($gd_image_array as $key => $gd_image) {
66 $biSizeImage = $ImageWidths[$key] * $ImageHeights[$key] * ($bpp[$key] / 8);
69 $BitmapInfoHeader[$key] = '';
70 $BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD biSize;
71 …$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); //…
74 …$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); //…
75 $BitmapInfoHeader[$key] .= "\x01\x00"; // WORD biPlanes;
76 $BitmapInfoHeader[$key] .= chr($bpp[$key])."\x00"; // wBitCount;
77 …$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biCompressio…
78 …$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); //…
79 …$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biXPelsPerMe…
80 …$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biYPelsPerMe…
81 $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrUsed;
82 …$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrImporta…
91 foreach ($gd_image_array as $key => $gd_image) {
94 …$icondata .= chr($ImageWidths[$key]); // bWidth; // Width, in pixels,…
95 …$icondata .= chr($ImageHeights[$key]); // bHeight; // Height, in pixels…
96 …$icondata .= chr($totalcolors[$key]); // bColorCount; // Number of colors …
100 $icondata .= chr($bpp[$key])."\x00"; // wBitCount; // Bits per pixel
102 $dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]);
106 $dwImageOffset += strlen($BitmapInfoHeader[$key]);
107 $dwImageOffset += strlen($icXOR[$key]);
108 $dwImageOffset += strlen($icAND[$key]);
111 foreach ($gd_image_array as $key => $gd_image) {
112 $icondata .= $BitmapInfoHeader[$key];
113 $icondata .= $icXOR[$key];
114 $icondata .= $icAND[$key];