added support for canvas as source