accept canvas as input