Code Duplication    Length = 16-16 lines in 2 locations

htdocs/modules/system/class/thumbs/phpthumb.bmp.php 2 locations

@@ 391-406 (lines=16) @@
388
389
				case 0: // BI_RGB
390
					switch ($thisfile_bmp_header_raw['bits_per_pixel']) {
391
						case 1:
392
							for ($row = ($thisfile_bmp_header_raw['height'] - 1); $row >= 0; $row--) {
393
								for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col = $col) {
394
									$paletteindexbyte = ord($BMPpixelData{$pixeldataoffset++});
395
									for ($i = 7; $i >= 0; $i--) {
396
										$paletteindex = ($paletteindexbyte & (0x01 << $i)) >> $i;
397
										$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindex];
398
										$col++;
399
									}
400
								}
401
								while (($pixeldataoffset % 4) != 0) {
402
									// lines are padded to nearest DWORD
403
									$pixeldataoffset++;
404
								}
405
							}
406
							break;
407
408
						case 4:
409
							for ($row = ($thisfile_bmp_header_raw['height'] - 1); $row >= 0; $row--) {
@@ 408-423 (lines=16) @@
405
							}
406
							break;
407
408
						case 4:
409
							for ($row = ($thisfile_bmp_header_raw['height'] - 1); $row >= 0; $row--) {
410
								for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col = $col) {
411
									$paletteindexbyte = ord($BMPpixelData{$pixeldataoffset++});
412
									for ($i = 1; $i >= 0; $i--) {
413
										$paletteindex = ($paletteindexbyte & (0x0F << (4 * $i))) >> (4 * $i);
414
										$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindex];
415
										$col++;
416
									}
417
								}
418
								while (($pixeldataoffset % 4) != 0) {
419
									// lines are padded to nearest DWORD
420
									$pixeldataoffset++;
421
								}
422
							}
423
							break;
424
425
						case 8:
426
							for ($row = ($thisfile_bmp_header_raw['height'] - 1); $row >= 0; $row--) {