/**
  * Constructor
  *
  * @param   io.Stream stream
  * @param   int foreground default 0
  */
 public function __construct($stream, $foreground = 0)
 {
     parent::__construct($stream);
     $this->foreground = $foreground;
 }
 /**
  * Constructor
  *
  * @param   io.Stream stream
  * @param   int format default IMG_GD2_RAW one of the IMG_GD2_* constants
  */
 public function __construct($stream, $format = IMG_GD2_RAW)
 {
     parent::__construct($stream);
     $this->format = $format;
 }
 /**
  * Constructor
  *
  * @see     php://imagetruecolortopalette
  * @param   io.Stream stream
  * @param   bool dither default FALSE indicates if the image should be dithered
  * @param   int ncolors default 256 maximum # of colors retained in the palette
  */
 public function __construct($stream, $dither = FALSE, $ncolors = 256)
 {
     parent::__construct($stream);
     $this->dither = $dither;
     $this->ncolors = $ncolors;
 }
 /**
  * Constructor
  *
  * @param   io.Stream stream
  * @param   int quality default 75
  */
 public function __construct($stream, $quality = 75)
 {
     parent::__construct($stream);
     $this->quality = $quality;
 }