You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
For the resize method it would be great if you are able to provide only one value (newWidth OR newHeight) and the other value is calculated based on the ratio of the orignal image.
The text was updated successfully, but these errors were encountered:
Usage
When keepAspectRatio is true then width + height parameters
become maxWidth + maxHeight parameters
Just add true as 4th parameter. It is optional and default value is false => without breaking changes.
letnewWidth=2048;letnewHeight=2048;letkeepAspectRatio=true;this.ng2PicaService.resize([someFile],newWidth,newHeight,keepAspectRatio).subscribe((result)=>{//all good, result is a fileconsole.info(result);},error=>{//something went wrong console.error(error);});
If you wanna try it right now, you can install it like this (temporary solution):
Just add to your package.json "ng2-pica": "git+https://github.com/bartholomej/ng2-pica.git#keep-aspect-ratio"
For the resize method it would be great if you are able to provide only one value (newWidth OR newHeight) and the other value is calculated based on the ratio of the orignal image.
The text was updated successfully, but these errors were encountered: