Releases: Mawi137/ngx-image-cropper
Releases · Mawi137/ngx-image-cropper
8.1.0
8.0.0
7.2.0
7.0.0
BREAKING CHANGE: by default the output will be set to blob
. Using blob instead of a base64 should decrease the memory usage. If you wish to keep using base64, simply add output="base64"
to the <image-cropper>
tag.
When using blob
as output, an objectUrl
will also be provided which can be used to preview the image. However, you'll need to use the DomSanitizer to allow that url to be used in the HTML of your component.
this.croppedImageUrl = this.sanitizer.bypassSecurityTrustUrl(event.objectUrl);
6.2.1
6.0.2
5.0.0
4.0.0
3.0.0
BREAKING CHANGES
- The input
outputType
has been removed,imageCropped
output will no longer have afile
property. This is because the Blob is actually created from the base64. Calling toBlob on a canvas is slow and affects the performance. Instead this package provides a method calledbase64ToFile
which can be called to create a new Blob based on the base64 image. - The
rotateLeft
,rotateRight
,flipHorizontal
,flipVertical
andresetImage
methods have been removed. TheimageCropped
output will no longer contain the transformations that were made. Instead there are 2 new inputs:canvasRotation
: Rotates the entire canvas (1 = 90deg, 2 = 180 deg...)transform
: This object can contain 4 values:rotate
: Rotation in degrees. In contrast tocanvasRotation
, this will rotate the image within the canvas.scale
: Zoom in and out on the image (1 = normal size, 2 = 2x zoom)flipH
: Flip horizontallyflipV
: Flip vertically