10/13/2023 0 Comments Angular image compress![]() In fact you can use the static version in the library and | maxHeight | number | Maximum height in pixels if you need to resize (optional, default: 0 - no resize) |ġ Ratio: "50" will decrease the resolution of each dimension by 2, i.e.: image of 2000 X 1500 pixels will become 1000 Xħ50 pixels, while the whole resolution will be reduced by 4.Ģ Quality: For more info about this parameter, read this guide How it works under the hood?We will use Renderer2, and transform the image using HTML canvas encrustation. | maxWidth | number | Maximum width in pixels if you need to resize (optional, default: 0 - no resize) | ![]() | quality | number | JPEG quality factor as a percentage (optional, default: 50) 2 | | ratio | number | Maximum scale factor as a percentage (optional, default: 50) 1 | | orientation | number | EXIF Orientation value using the DOC ORIENTATION enum value | | image | string | DataUrl (string) representing the image | compressFile() signature The signature of compressFile() is:ĬompressFile(image, orientation, ratio, quality, maxWidth, maxHeight) If you want the upload promise to reject in such case, please use: uploadFileOrReject() or uploadMultipleFilesOrReject() instead. Behavior if no files have been selectedWith uploadFile() and uploadMultipleFiles(), nothing will happen when the user is selecting nothing, close the file selection, and ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |