function addJpegImage_common( &$data, $x, $y, $w = 0, $h = 0, $imageWidth, $imageHeight, $channels = 3 )
    {
        // note that this function is not to be called externally
        // it is just the common code between the GD and the file options
        $this->numImages++;
        $im = $this->numImages;
        $label = 'I'.$im;
        $this->numObj++;
        $this->o_image( $this->numObj, 'new', array( 'label' => $label,
                                                     'data' => $data,
                                                     'iw' => $imageWidth,
                                                     'ih' => $imageHeight,
                                                     'channels' => $channels ) );

        $this->objects[$this->currentContents]['c'] .= "\nq";
        $this->objects[$this->currentContents]['c'] .= "\n".sprintf('%.3F',$w)." 0 0 ".sprintf('%.3F',$h)." ".sprintf('%.3F',$x)." ".sprintf('%.3F',$y)." cm";
        $this->objects[$this->currentContents]['c'] .= "\n/".$label.' Do';
        $this->objects[$this->currentContents]['c'] .= "\nQ";
    }