Showing 1,049 of 26,336 total issues
Avoid deeply nested control flow statements. Open
Open
for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col = $col) {
$paletteindexbyte = ord($BMPpixelData{$pixeldataoffset++});
for ($i = 7; $i >= 0; $i--) {
$paletteindex = ($paletteindexbyte & (0x01 << $i)) >> $i;
$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindex];
Avoid deeply nested control flow statements. Open
Open
for ($i = 0; $i < $firstbyte; $i++) {
$col = $pixelcounter % $thisfile_bmp_header_raw['width'];
$row = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']);
$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindexes[$i % 2]];
$pixelcounter++;
Avoid deeply nested control flow statements. Open
Open
if (preg_match('# \\-crop "([0-9]+)x([0-9]+)\\+0\\+0" #', $commandline, $matches)) {
$commandline = str_replace(' -crop "' . $matches[1] . 'x' . $matches[2] . '+0+0" ',
' -crop ' . phpthumb_functions::escapeshellarg_replacement(($matches[1] - (2 * $width))
. 'x'
. ($matches[2] - (2 * $width))
Avoid deeply nested control flow statements. Open
Open
while (($pixeldataoffset % 4) != 0) {
// lines are padded to nearest DWORD
$pixeldataoffset++;
}
Avoid deeply nested control flow statements. Open
Open
if (strlen($imgdata) <= $this->maxb) {
imagetruecolortopalette($this->gdimg_output, true, pow(2, $i));
break;
}
Avoid deeply nested control flow statements. Open
Open
while (($pixeldataoffset % 4) != 0) {
// lines are padded to nearest DWORD
$pixeldataoffset++;
}
Avoid deeply nested control flow statements. Open
Open
while (($pixeldataoffset % 4) != 0) {
// lines are padded to nearest DWORD
$pixeldataoffset++;
}
Avoid deeply nested control flow statements. Open
Open
while (($pixeldataoffset % 4) != 0) {
// lines are padded to nearest DWORD
$pixeldataoffset++;
}
Avoid deeply nested control flow statements. Open
Open
for ($i = 0; $i < $firstbyte; $i++) {
$col = $pixelcounter % $thisfile_bmp_header_raw['width'];
$row = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']);
$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$secondbyte];
$pixelcounter++;
Avoid deeply nested control flow statements. Open
Open
for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col++) {
$thisfile_bmp['data'][$row][$col] = (ord($BMPpixelData{$pixeldataoffset + 2}) << 16)
| (ord($BMPpixelData{$pixeldataoffset + 1}) << 8)
| ord($BMPpixelData{$pixeldataoffset});
$pixeldataoffset += 3;
Avoid deeply nested control flow statements. Open
Open
for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col++) {
$thisfile_bmp['data'][$row][$col] = (ord($BMPpixelData{$pixeldataoffset + 3}) << 24)
| (ord($BMPpixelData{$pixeldataoffset + 2}) << 16)
| (ord($BMPpixelData{$pixeldataoffset + 1}) << 8)
| ord($BMPpixelData{$pixeldataoffset});
Avoid deeply nested control flow statements. Open
Open
while (($pixeldataoffset % 4) != 0) {
// lines are padded to nearest DWORD
$pixeldataoffset++;
}
Avoid deeply nested control flow statements. Open
Open
for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col = $col) {
$paletteindexbyte = ord($BMPpixelData{$pixeldataoffset++});
for ($i = 1; $i >= 0; $i--) {
$paletteindex = ($paletteindexbyte & (0x0F << (4 * $i))) >> (4 * $i);
$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindex];
Avoid deeply nested control flow statements. Open
Open
while (($pixeldataoffset % 4) != 0) {
// lines are padded to nearest DWORD
$pixeldataoffset++;
}
Avoid deeply nested control flow statements. Open
Open
switch ($secondbyte) {
case 0:
// end of line
// no need for special processing, just ignore
break;
Method Frame
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function Frame(&$gdimg, $frame_width, $edge_width, $hexcolor_frame, $hexcolor1, $hexcolor2)
Avoid deeply nested control flow statements. Open
Open
if ($imagetypes & IMG_GIF) {
$gd_info['GIF Create Support'] = true;
}
Avoid deeply nested control flow statements. Open
Open
if ($imagetypes & IMG_JPG) {
$gd_info['JPG Support'] = true;
}
Method URLreadFsock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function URLreadFsock($host, $file, &$errstr, $successonly = true, $port = 80, $timeout = 10)
Method DropShadow
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function DropShadow(&$gdimg, $distance, $width, $hexcolor, $angle, $alpha)