function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1)
	{
		$bitmap_array = (is_resource($bitmap) ? $this->_processBitmapGd($bitmap) : $this->_processBitmap($bitmap));
		list($width, $height, $size, $data) = $bitmap_array; //$this->_processBitmap($bitmap);

		// Scale the frame of the image.
		$width  *= $scale_x;
		$height *= $scale_y;

		// Calculate the vertices of the image and write the OBJ record
		$this->_positionImage($col, $row, $x, $y, $width, $height);

		// Write the IMDATA record to store the bitmap data
		$record	  = 0x007f;
		$length	  = 8 + $size;
		$cf		  = 0x09;
		$env		 = 0x01;
		$lcb		 = $size;

		$header	  = pack("vvvvV", $record, $length, $cf, $env, $lcb);
		$this->_append($header.$data);
	}