The resize will keep the aspect ratio of the image so one of the width or height will be the value in the resize and the other one would be smaller unless the photo is exactly at the same aspect ratio as 5X2.
If you want to lose part of the image and center crop it you can do
ngf-resize="{width: 500, height:200, centerCrop: true}"
This will make the image of the exact size but will cut part of the image either horizontally or vertically.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.