Code Duplication    Length = 12-13 lines in 2 locations

thumbs/phpthumb.gif.php 2 locations

@@ 506-517 (lines=12) @@
503
    /**
504
     * @return string
505
     */
506
    public function toString()
507
    {
508
        $ret = '';
509
510
        for ($i = 0; $i < $this->m_nColors; $i++) {
511
            $ret .= chr($this->m_arColors[$i] & 0x000000FF) . // R
512
                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
513
                    chr(($this->m_arColors[$i] & 0x00FF0000) >> 16);  // B
514
        }
515
516
        return $ret;
517
    }
518
519
    ///////////////////////////////////////////////////////////////////////////
520
@@ 524-536 (lines=13) @@
521
    /**
522
     * @return string
523
     */
524
    public function toRGBQuad()
525
    {
526
        $ret = '';
527
528
        for ($i = 0; $i < $this->m_nColors; $i++) {
529
            $ret .= chr(($this->m_arColors[$i] & 0x00FF0000) >> 16) . // B
530
                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
531
                    chr($this->m_arColors[$i] & 0x000000FF) . // R
532
                    "\x00";
533
        }
534
535
        return $ret;
536
    }
537
538
    ///////////////////////////////////////////////////////////////////////////
539