Skip to content

Releases: Mawi137/ngx-image-cropper

1.4.1

22 Jun 22:14
Compare
Choose a tag to compare

New options:

  • containWithinAspectRatio: adds padding around the image to make it fit the chosen aspectRatio
  • backgroundColor: adds a background color behind the resulting image

1.3.4

31 Dec 00:10
Compare
Choose a tag to compare

New features/improvements:

  • Rotate and flip images in the image cropper
  • Set a minimum width of the cropper (relative to the original image's size)
  • When resizing an image, the resulting image's quality has improved significantly

1.3.0

29 Dec 23:17
Compare
Choose a tag to compare
  • Added cropperReady output. If you wish to overwrite the cropper position, you should wait till after this event was fired. It also fixes issues with the cropper not initialising properly (e.g. in a animating modal)
  • Added imagePosition to the imageCropped output. These are the coordinates of the cropper relative to the original image's size

NOTE: When the imageLoaded event is fired, the image becomes visible in the cropper and you should make sure the image cropper becomes visible. However, that doesn't always mean that the cropper itself is ready, the cropperReady notifies you when it is, so you can overwrite the cropper's position for example.

1.2.0

08 Oct 20:17
Compare
Choose a tag to compare
  • Added outputType option which allows you to choose between base64, file and both. You may not need the file to be emitted, with this option it can be disabled and it will speed up the cropping significantly. (Defaults to both to avoid breaking changes).
  • Added autoCrop option. By default a new image is emitted each time the cropper's position or size is changed. By setting this option to false, you'll need to call the crop method yourself. To get access to the cropper use: @ViewChild(ImageCropperComponent) imageCropper: ImageCropperComponent. Then to trigger the cropper call: imageCropper.crop(); and the cropped image will be emitted by the Outputs.

1.1.0

07 Oct 23:12
Compare
Choose a tag to compare
  • New output imageCropped that emits both the base64 and file as well as the cropped image height & width and the cropper's position (more in the readme.md)
  • Deprecated imageCroppedBase64 and imageCroppedFile
  • Reset the cropper when changing the aspectRatio dynamically