danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.6k forks source link

can not preview in original height/width ratio #1986

Open zealot2007 opened 7 years ago

zealot2007 commented 7 years ago

Hi danialfaird, I am using your lib to upload images, and I want to preview images in its original height/width ratio in a fixed div box. eg. I upload a image 2000 x 1800 pixels, so in my div box(style: width: 200px, height: 200px) ,the image should be 200x180. the longer between height and width should not be excess the div.
But I used ngf-size , ngf-resize and it seems not work. Is there any way to implement my requirement or the way I used before is wrong?
Thanks,