@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $data = substr($data, 6); |
| 78 | 78 | |
| 79 | 79 | //extract ICONDIRENTRY structures |
| 80 | - $data=$this->extractIconDirEntries($data); |
|
| 80 | + $data = $this->extractIconDirEntries($data); |
|
| 81 | 81 | |
| 82 | 82 | // Extract additional headers for each extracted icon header |
| 83 | 83 | $iconCount = count($this->iconDirEntry); |
@@ -304,17 +304,17 @@ discard block |
||
| 304 | 304 | * 32 bits: 4 bytes per pixel [ B | G | R | ALPHA ]. |
| 305 | 305 | **/ |
| 306 | 306 | $offset = 0; |
| 307 | - $binary=$metadata['data']; |
|
| 307 | + $binary = $metadata['data']; |
|
| 308 | 308 | |
| 309 | 309 | for ($i = $metadata['Height'] - 1; $i >= 0; --$i) { |
| 310 | 310 | for ($j = 0; $j < $metadata['Width']; ++$j) { |
| 311 | 311 | //we translate the BGRA to aRGB ourselves, which is twice as fast |
| 312 | 312 | //as calling imagecolorallocatealpha |
| 313 | - $alpha7 = ((~ord($binary[$offset+3])) & 0xff) >> 1; |
|
| 313 | + $alpha7 = ((~ord($binary[$offset + 3])) & 0xff) >> 1; |
|
| 314 | 314 | if ($alpha7 < 127) { |
| 315 | 315 | $col = ($alpha7 << 24) | |
| 316 | - (ord($binary[$offset+2]) << 16) | |
|
| 317 | - (ord($binary[$offset+1]) << 8) | |
|
| 316 | + (ord($binary[$offset + 2]) << 16) | |
|
| 317 | + (ord($binary[$offset + 1]) << 8) | |
|
| 318 | 318 | (ord($binary[$offset])); |
| 319 | 319 | imagesetpixel($im, $j, $i, $col); |
| 320 | 320 | } |
@@ -332,13 +332,13 @@ discard block |
||
| 332 | 332 | **/ |
| 333 | 333 | $offset = 0; |
| 334 | 334 | $bitoffset = 0; |
| 335 | - $binary=$metadata['data']; |
|
| 335 | + $binary = $metadata['data']; |
|
| 336 | 336 | |
| 337 | 337 | for ($i = $metadata['Height'] - 1; $i >= 0; --$i) { |
| 338 | 338 | for ($j = 0; $j < $metadata['Width']; ++$j) { |
| 339 | 339 | if ($maskBits[$bitoffset] == 0) { |
| 340 | 340 | //translate BGR to RGB |
| 341 | - $col = (ord($binary[$offset+2]) << 16) | (ord($binary[$offset+1]) << 8) | (ord($binary[$offset])); |
|
| 341 | + $col = (ord($binary[$offset + 2]) << 16) | (ord($binary[$offset + 1]) << 8) | (ord($binary[$offset])); |
|
| 342 | 342 | imagesetpixel($im, $j, $i, $col); |
| 343 | 343 | } |
| 344 | 344 | $offset += 3; |