Skip to content

Releases: Mawi137/ngx-image-cropper

8.1.0

27 Oct 12:48
Compare
Choose a tag to compare
  • Removed hammerjs. Pinch is now handled by the component itself.
  • Services are no longer Injectable as they don't depend on other dependencies

8.0.0

16 May 18:02
Compare
Choose a tag to compare

Breaking changes:

  • Minimal Angular version 16.0.0
  • ImageCropperComponent is now standalone so it should be imported instead of the ImageCropperModule (which has been dropped).

7.2.0

05 Jan 19:24
Compare
Choose a tag to compare
  • Add support for SVG images

7.0.0

07 Jun 21:12
Compare
Choose a tag to compare

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

27 Jun 19:59
Compare
Choose a tag to compare

By setting allowMoveImage to true, you can drag the background image.
Set transform.translateUnit to px for the best experience (by default it's set to %).

6.0.2

18 Jan 19:56
Compare
Choose a tag to compare

Only Angular 13+ is supported starting from this version.

5.0.0

09 Oct 20:47
Compare
Choose a tag to compare
  • Dropped support for Angular 9
  • Prefixed css classes with ngx-ic- to avoid conflicts with external css classes.

4.0.0

01 Jul 21:57
Compare
Choose a tag to compare

Dropped support for Angular 8

3.0.0

20 Jan 20:28
e6d0e75
Compare
Choose a tag to compare

BREAKING CHANGES

  • The input outputType has been removed, imageCropped output will no longer have a file 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 called base64ToFile which can be called to create a new Blob based on the base64 image.
  • The rotateLeft, rotateRight, flipHorizontal, flipVertical and resetImage methods have been removed. The imageCropped 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 to canvasRotation, this will rotate the image within the canvas.
      • scale: Zoom in and out on the image (1 = normal size, 2 = 2x zoom)
      • flipH: Flip horizontally
      • flipV: Flip vertically

2.1.0

14 Jan 22:54
5c0d2db
Compare
Choose a tag to compare

New feature:

  • Keyboard access:
    • Use tab to set focus to cropper
    • Arrows move the cropper
    • Shift + Arrows makes the cropper larger
    • Shift + Alt + Arrows makes the cropper smaller
    • Number 1 - 9 change the step size (1px - 9px)