Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 500 Bytes

imagedata-to-blob.md

File metadata and controls

24 lines (19 loc) · 500 Bytes

Graphics

Convert module

imagedata-to-blob

This function converts ImageData to blob and returns it in callback function

	function (imageData, cb) { ... }

	cb = function (blob) { ... }

Example

This function converts imageData to Blob object. It will always pass Blob object, even if imageData is malformed.

	module.require([
		"convert :: convert",
	], function (convert) {
		convert.imageDataToBlob(imgData, function (blob) {
			//blob is a Blob object
		});
	});