- Add
crop
support for all transformations.
- Improve type definitions.
- Remove undocumented
ctxToRawUint8Array
.
- Add
cjs
output.
- Remove
main
.
- Migrated everything to Typescript! Massive thanks to @erickjoestar for creating the types 🙌
- Add option to select background color on images with transparency for
ctxToRGBGrayscaleMatrix
.
- Change range of
ctxToRGBGrayscaleMatrix
to 0-255.
- Add
ctxToRGBGrayscaleMatrix
.
- Minor readme and package updates after the rename.
- New name! The package is now named
canvas-image-utils
as it not only supportbase64
images. - Methods new return promises.
- Methods were renamed
base64ImageToRGBArray
->imageToRGBArray
base64ImageToRGBMatrix
->imageToRGBMatrix
base64ImageToImageData
->imageToRawData
- The second argument
callback
is not needed anymore since they return a promise.
- Bugfix
- Removes the usage of spread syntax on arrays.
- Removes the heavy matrix extraction processing from the main thread, allowing the user to stay interactive with the page meanwhile. Thanks @josejbreijo !
- Changed
base64ImageToImageData
tobase64ImageToImageRawData
.
- Add
img
return tobase64ImageToImageData
as third parameter
- Add
base64ImageToImageData
- Better semver
- Add
options
parameter to functions, as an object in which you can sendwidth
ormaxWidth
.
- Add
a
channel tobase64ImageToRGBArray
.
- Add
base64ImageToRGBArray
method.