Classes/Utility/JpegExifOrient.php
protected static function read_2_bytes($handle)
    {
        $c1 = fgetc($handle);
        if ($c1 === false) {
            throw new \RuntimeException('Premature EOF in JPEG file', 1363533326);
        }
        $c2 = fgetc($handle);
        if ($c2 === false) {
            throw new \RuntimeException('Premature EOF in JPEG file', 1363533326);
        }
        return (ord($c1) << 8) + (ord($c2));
    }
protected static function read_2_bytes($handle)
    {
        $c1 = fgetc($handle);
        if ($c1 === false) {
            throw new \RuntimeException('Premature EOF in JPEG file', 1363533326);
        }
        $c2 = fgetc($handle);
        if ($c2 === false) {
            throw new \RuntimeException('Premature EOF in JPEG file', 1363533326);
        }
        return (ord($c1) << 8) + (ord($c2));
    }
protected static function read_2_bytes ( $ handle ) { $ c1 = fgetc ( $ handle ) ; if ( $ c1 === false ) { throw new \ RuntimeException ( 'Premature EOF in JPEG file' , 1363533326 ) ; } $ c2 = fgetc ( $ handle ) ; if ( $ c2 === false ) { throw new \ RuntimeException ( 'Premature EOF in JPEG file' , 1363533326 ) ; } return ( ord ( $ c1 ) << 8 ) + ( ord ( $ c2 ) ) ; }
Reads 2 bytes, converts them to unsigned int
Remark: All 2-byte quantities in JPEG markers are MSB first.

@param resource $handle
@return integer
@throws \RuntimeException
Reads 2 bytes converts them to unsigned int Remark : All 2 - byte quantities in JPEG markers are MSB first .