public function writeImageHeader($width, $height, $colorType) 
    {
        $this->buffer->startChunk("IHDR");
        $this->buffer->writeUInt32BE($width);
        $this->buffer->writeUInt32BE($height);
        $this->buffer->writeUInt8(8); // Bit depth
        $this->buffer->writeUInt8($colorType);
        $this->buffer->writeUInt8(0); // Compression
        $this->buffer->writeUInt8(0); // Filter
        $this->buffer->writeUInt8(0); // Interlace
        $this->buffer->endChunk();
    }
public function writeImageHeader($width, $height, $colorType) 
    {
        $this->buffer->startChunk("IHDR");
        $this->buffer->writeUInt32BE($width);
        $this->buffer->writeUInt32BE($height);
        $this->buffer->writeUInt8(8); // Bit depth
        $this->buffer->writeUInt8($colorType);
        $this->buffer->writeUInt8(0); // Compression
        $this->buffer->writeUInt8(0); // Filter
        $this->buffer->writeUInt8(0); // Interlace
        $this->buffer->endChunk();
    }
public function writeImageHeader ( $ width , $ height , $ colorType ) { $ this -> buffer -> startChunk ( "IHDR" ) ; $ this -> buffer -> writeUInt32BE ( $ width ) ; $ this -> buffer -> writeUInt32BE ( $ height ) ; $ this -> buffer -> writeUInt8 ( 8 ) ; // Bit depth $ this -> buffer -> writeUInt8 ( $ colorType ) ; $ this -> buffer -> writeUInt8 ( 0 ) ; // Compression $ this -> buffer -> writeUInt8 ( 0 ) ; // Filter $ this -> buffer -> writeUInt8 ( 0 ) ; // Interlace $ this -> buffer -> endChunk ( ) ; }
Writes an IHDR chunk to the png data stream.

@param int $width Image width in pixels.
@param int $height Image height in pixels.
@param int $colorType Color depth, speocfy one of the constants in
PngEncoder.
Writes an IHDR chunk to the png data stream .