Click here to Skip to main content
14,455,338 members
Rate this:
Please Sign up or sign in to vote.
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 5:06am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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)
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100