src/Elphin/IcoFileLoader/GdRenderer.php 1 location
|
@@ 199-206 (lines=8) @@
|
| 196 |
|
$bytes = 0; |
| 197 |
|
$bytes_per_line = ($img->width / 8); |
| 198 |
|
$bytes_to_remove = (($width - $img->width) / 8); |
| 199 |
|
for ($i = 0; $i < $total_bytes; ++$i) { |
| 200 |
|
$maskBits .= str_pad(decbin(ord($img->bmpData[$offset + $i])), 8, '0', STR_PAD_LEFT); |
| 201 |
|
++$bytes; |
| 202 |
|
if ($bytes == $bytes_per_line) { |
| 203 |
|
$i += $bytes_to_remove; |
| 204 |
|
$bytes = 0; |
| 205 |
|
} |
| 206 |
|
} |
| 207 |
|
return $maskBits; |
| 208 |
|
} |
| 209 |
|
|
src/Elphin/IcoFileLoader/Ico.php 1 location
|
@@ 427-434 (lines=8) @@
|
| 424 |
|
$bytes = 0; |
| 425 |
|
$bytes_per_line = ($metadata['Width'] / 8); |
| 426 |
|
$bytes_to_remove = (($width - $metadata['Width']) / 8); |
| 427 |
|
for ($i = 0; $i < $total_bytes; ++$i) { |
| 428 |
|
$maskBits .= str_pad(decbin(ord($metadata['data'][$offset + $i])), 8, '0', STR_PAD_LEFT); |
| 429 |
|
++$bytes; |
| 430 |
|
if ($bytes == $bytes_per_line) { |
| 431 |
|
$i += $bytes_to_remove; |
| 432 |
|
$bytes = 0; |
| 433 |
|
} |
| 434 |
|
} |
| 435 |
|
return $maskBits; |
| 436 |
|
} |
| 437 |
|
|