private function createImage($x, $y, $width, $height, $new_width, $new_height, $interlace = false) {

		$resource = imagecreatetruecolor($new_width, $new_height);

		if(false === imagesavealpha($resource, true)) {
			trigger_error('Could not set the flag to save full alpha channel', E_USER_ERROR);
		}

		if(false === imagealphablending($resource, false)) {
			trigger_error('Could not set the blending mode', E_USER_ERROR);
		}

		if(false === imagefill($resource, 0, 0, imagecolorallocate($resource, 255, 255, 255))) {
			trigger_error('Could not flood fill the image', E_USER_ERROR);
		}

		if(false === imagecopyresampled($resource, $this -> image, 0, 0, $x, $y, $new_width, $new_height, $width, $height)) {
			trigger_error('Could not copy and resize part of an image with resampling', E_USER_ERROR);
		}

		if((true === $interlace && imageinterlace($this -> image, true)) || false === $interlace) {
				
			$this -> image = $resource;
			return $this -> image;
		}

		return false;
	}