Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have requirement where I want to scale image to fixed size. I am looking for an option to achieve that through angular client side instead from backend service. Please refer “Example #2 - Scale to a fixed size” from below link for the requirement which I want to achieve from Angular. https://www.codeproject.com/Articles/2941/Resizing-a-Photographic-image-with-GDI-for-NET
Please let me now if there’s anyone knows how to achieve it.

What I have tried:

I have tried c#.net approach which works but looking to implement through client side.
Posted
Updated 3-Dec-18 4:06am

1 solution

What you would want to do then is to find a package resizing in Angular, and then work in the fixed-size limits. Google has plenty of results if you search for them.

Resizing Images in the Browser in Angular With ng2-img-max[^]

Angular Directive – Setting image height and width without changing the image aspect ratio | mytechnetknowhows[^]

I have used "blue-imp" in other projects with success (in the code at first link)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900