Code Duplication    Length = 13-14 lines in 2 locations

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

@@ 415-427 (lines=13) @@
412
413
	///////////////////////////////////////////////////////////////////////////
414
415
	function toString()
416
	{
417
		$ret = '';
418
419
		for ($i = 0; $i < $this->m_nColors; $i++) {
420
			$ret .=
421
				chr(($this->m_arColors[$i] & 0x000000FF))       . // R
422
				chr(($this->m_arColors[$i] & 0x0000FF00) >>  8) . // G
423
				chr(($this->m_arColors[$i] & 0x00FF0000) >> 16);  // B
424
		}
425
426
		return $ret;
427
	}
428
429
	///////////////////////////////////////////////////////////////////////////
430
@@ 431-444 (lines=14) @@
428
429
	///////////////////////////////////////////////////////////////////////////
430
431
	function toRGBQuad()
432
	{
433
		$ret = '';
434
435
		for ($i = 0; $i < $this->m_nColors; $i++) {
436
			$ret .=
437
				chr(($this->m_arColors[$i] & 0x00FF0000) >> 16) . // B
438
				chr(($this->m_arColors[$i] & 0x0000FF00) >>  8) . // G
439
				chr(($this->m_arColors[$i] & 0x000000FF))       . // R
440
				"\x00";
441
		}
442
443
		return $ret;
444
	}
445
446
	///////////////////////////////////////////////////////////////////////////
447